Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.0/patches/61347/?format=api
http://patchwork.dpdk.org/api/1.0/patches/61347/?format=api", "project": { "id": 1, "url": "http://patchwork.dpdk.org/api/1.0/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk" }, "msgid": "<20191017071931.12680-1-alialnu@mellanox.com>", "date": "2019-10-17T07:19:31", "name": "[v2] net/mlx5: fix build with strict alignment enabled", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "99130a4aa1d632c92432726cf48a23a997decc9f", "submitter": { "id": 969, "url": "http://patchwork.dpdk.org/api/1.0/people/969/?format=api", "name": "Ali Alnubani", "email": "alialnu@mellanox.com" }, "delegate": { "id": 3268, "url": "http://patchwork.dpdk.org/api/1.0/users/3268/?format=api", "username": "rasland", "first_name": "Raslan", "last_name": "Darawsheh", "email": "rasland@nvidia.com" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20191017071931.12680-1-alialnu@mellanox.com/mbox/", "series": [ { "id": 6894, "url": "http://patchwork.dpdk.org/api/1.0/series/6894/?format=api", "date": "2019-10-17T07:19:31", "name": "[v2] net/mlx5: fix build with strict alignment enabled", "version": 2, "mbox": "http://patchwork.dpdk.org/series/6894/mbox/" } ], "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/61347/checks/", "tags": {}, "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 075E31E565;\n\tThu, 17 Oct 2019 09:20:08 +0200 (CEST)", "from git-send-mailer.rdmz.labs.mlnx (unknown [37.142.13.130])\n\tby dpdk.org (Postfix) with ESMTP id 44E201E558\n\tfor <dev@dpdk.org>; Thu, 17 Oct 2019 09:20:07 +0200 (CEST)" ], "From": "Ali Alnubani <alialnu@mellanox.com>", "To": "dev@dpdk.org", "Cc": "Jeremy Plsek <jplsek@iol.unh.edu>,\n\tViacheslav Ovsiienko <viacheslavo@mellanox.com>", "Date": "Thu, 17 Oct 2019 10:19:31 +0300", "Message-Id": "<20191017071931.12680-1-alialnu@mellanox.com>", "X-Mailer": "git-send-email 2.23.0", "In-Reply-To": "<20191015145508.19625-1-alialnu@mellanox.com>", "References": "<20191015145508.19625-1-alialnu@mellanox.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v2] net/mlx5: fix build with strict alignment\n\tenabled", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "This patch converts some of the casts to unaligned integer types.\nThe memcpy call is replaced with explicit copying because it\nmay require type qualifiers in some environments.\n\nFixes: 18a1c20044c0 (\"net/mlx5: implement Tx burst template\")\n\nReported-by: Jeremy Plsek <jplsek@iol.unh.edu>\nSigned-off-by: Ali Alnubani <alialnu@mellanox.com>\nAcked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>\n---\n drivers/net/mlx5/mlx5_rxtx.c | 18 ++++++++++++------\n 1 file changed, 12 insertions(+), 6 deletions(-)", "diff": "diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c\nindex 10d0ca116..d6a5106c5 100644\n--- a/drivers/net/mlx5/mlx5_rxtx.c\n+++ b/drivers/net/mlx5/mlx5_rxtx.c\n@@ -2747,27 +2747,33 @@ mlx5_tx_dseg_iptr(struct mlx5_txq_data *restrict txq,\n \t/* Unrolled implementation of generic rte_memcpy. */\n \tdst = (uintptr_t)&dseg->inline_data[0];\n \tsrc = (uintptr_t)buf;\n+\tif (len & 0x08) {\n #ifdef RTE_ARCH_STRICT_ALIGN\n-\tmemcpy(dst, src, len);\n+\t\tassert(dst == RTE_PTR_ALIGN(dst, sizeof(uint32_t)));\n+\t\t*(uint32_t *)dst = *(unaligned_uint32_t *)src;\n+\t\tdst += sizeof(uint32_t);\n+\t\tsrc += sizeof(uint32_t);\n+\t\t*(uint32_t *)dst = *(unaligned_uint32_t *)src;\n+\t\tdst += sizeof(uint32_t);\n+\t\tsrc += sizeof(uint32_t);\n #else\n-\tif (len & 0x08) {\n-\t\t*(uint64_t *)dst = *(uint64_t *)src;\n+\t\t*(uint64_t *)dst = *(unaligned_uint64_t *)src;\n \t\tdst += sizeof(uint64_t);\n \t\tsrc += sizeof(uint64_t);\n+#endif\n \t}\n \tif (len & 0x04) {\n-\t\t*(uint32_t *)dst = *(uint32_t *)src;\n+\t\t*(uint32_t *)dst = *(unaligned_uint32_t *)src;\n \t\tdst += sizeof(uint32_t);\n \t\tsrc += sizeof(uint32_t);\n \t}\n \tif (len & 0x02) {\n-\t\t*(uint16_t *)dst = *(uint16_t *)src;\n+\t\t*(uint16_t *)dst = *(unaligned_uint16_t *)src;\n \t\tdst += sizeof(uint16_t);\n \t\tsrc += sizeof(uint16_t);\n \t}\n \tif (len & 0x01)\n \t\t*(uint8_t *)dst = *(uint8_t *)src;\n-#endif\n }\n \n /**\n", "prefixes": [ "v2" ] }{ "id": 61347, "url": "