Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/53491/?format=api
http://patches.dpdk.org/api/patches/53491/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190516180427.17270-2-stephen@networkplumber.org/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/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", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20190516180427.17270-2-stephen@networkplumber.org>", "list_archive_url": "https://inbox.dpdk.org/dev/20190516180427.17270-2-stephen@networkplumber.org", "date": "2019-05-16T18:04:21", "name": "[v2,1/7] ether: mark ethernet addresses as being 2-byte aligned", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "3c5f143152213552e7dfc901be5358e0b53b9870", "submitter": { "id": 27, "url": "http://patches.dpdk.org/api/people/27/?format=api", "name": "Stephen Hemminger", "email": "stephen@networkplumber.org" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190516180427.17270-2-stephen@networkplumber.org/mbox/", "series": [ { "id": 4699, "url": "http://patches.dpdk.org/api/series/4699/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4699", "date": "2019-05-16T18:04:20", "name": "ether: improvements and optimizations", "version": 2, "mbox": "http://patches.dpdk.org/series/4699/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/53491/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/53491/checks/", "tags": {}, "related": [], "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 3BBF8D195;\n\tThu, 16 May 2019 20:04:40 +0200 (CEST)", "from mail-pl1-f193.google.com (mail-pl1-f193.google.com\n\t[209.85.214.193]) by dpdk.org (Postfix) with ESMTP id 3608FD16D\n\tfor <dev@dpdk.org>; Thu, 16 May 2019 20:04:38 +0200 (CEST)", "by mail-pl1-f193.google.com with SMTP id f97so2001780plb.5\n\tfor <dev@dpdk.org>; Thu, 16 May 2019 11:04:37 -0700 (PDT)", "from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127])\n\tby smtp.gmail.com with ESMTPSA id\n\td67sm9376657pfa.35.2019.05.16.11.04.35\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 16 May 2019 11:04:35 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=networkplumber-org.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=lUUPGQiPXmD2nflMT0cY25tNA/8yBe9D8LYITGgxvy8=;\n\tb=XX0wHgbxfYTp0O7kG/Ryu3CK8DJ6ESBtDqGqjLPcuA5DCJUY2lkoQP/0bhSzNxmmMX\n\tH54JPjWzuuvqAZoEyjnpeGjRdvS5rgxDWAZn1FNJ6g3PfUQoUL9NUYTVKrgttz0kMqKT\n\tjI3kzxHbSpJ3/jhIF9LwCryy6RfiFUdq+RRPgvP0hc4h8YtJGw/KBULhe8LbC9PIUCMv\n\tPx7HnO574FBmeIELqxlf33kSiuj9+DAaMbelUGSZoDuh6N/Ho97BPy11ZH7v29wpBc8P\n\t18vFu2rV1q8PTXRlj0j3TPrVQOou9oc2Iiz4NXLKzYQJvfelZy6hmMWM2H7kqfu2BNkh\n\tZcAQ==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=lUUPGQiPXmD2nflMT0cY25tNA/8yBe9D8LYITGgxvy8=;\n\tb=VkwxKrfXHxXq0BaUqBkTB790ccH1ZwBwT97FyWMQfH05mp8um+uVxoXbSq1waN8/ll\n\t8ZKGlVlDzR0qvP50O2Nbhu5q+VSZsatZxGn11soCySMgcpvUmMHgYgoS0TAhZ5szQl0+\n\twUfSwBdvLsjK3ZQ4H/aXIn3QzAcjl9SzGexDXv/44B8EkHsg3BsZ2DdZDyl7oYLdbNWC\n\td22KXueA8313T6w3RxRFHYb3iOXbCjlMf7f211qlX2wlIWUNvLcTsKHbo0yumM4P49qH\n\t7ScUgELhWin8+fDsy2Nh6pQ8IyjbCCjkm4oTS80IVcD8XfCFCss3XZUmiENTMAvunwh6\n\tksRA==", "X-Gm-Message-State": "APjAAAUeD9ZuY20bVck9iQDr2PLaNUmcEr4ex1BdYAfbeu73/Wmr+RHe\n\t5RsWdQyuJ/urxR1q0PvIE74YphBqeIM=", "X-Google-Smtp-Source": "APXvYqx5zrGn6G1yBoYOZd6cHGSVs/y3B0QLZDl+naNj233MSHDMq2QRxi53c9YvTRHOs+JJZ23TFw==", "X-Received": "by 2002:a17:902:184:: with SMTP id\n\tb4mr25506127plb.2.1558029877030; \n\tThu, 16 May 2019 11:04:37 -0700 (PDT)", "From": "Stephen Hemminger <stephen@networkplumber.org>", "To": "dev@dpdk.org", "Cc": "Bruce Richardson <bruce.richardson@intel.com>,\n\tStephen Hemminger <stephen@networkplumber.org>", "Date": "Thu, 16 May 2019 11:04:21 -0700", "Message-Id": "<20190516180427.17270-2-stephen@networkplumber.org>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20190516180427.17270-1-stephen@networkplumber.org>", "References": "<20190516180427.17270-1-stephen@networkplumber.org>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v2 1/7] ether: mark ethernet addresses as being\n\t2-byte aligned", "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": "From: Bruce Richardson <bruce.richardson@intel.com>\n\nWhen including the rte_ether.h header in applications with warnings\nenabled, a warning was given because of the assumption of 2-byte alignment\nof ethernet addresses when processing them.\n\n.../include/rte_ether.h:149:2: warning: converting a packed ‘const\n struct ether_addr’ pointer (alignment 1) to a ‘unaligned_uint16_t’\n {aka ‘const short unsigned int’} pointer (alignment 2) may result in\n an unaligned pointer value [-Waddress-of-packed-member]\n149 | const unaligned_uint16_t *ea_words = (const unaligned_uint16_t *)ea;\n | ^~~~~\n\nSince ethernet addresses should always be aligned on a two-byte boundary,\nwe can just inform the compiler of this assumption to remove the warnings\nand allow us to always access the addresses using 16-bit operations.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n lib/librte_net/rte_ether.h | 5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)", "diff": "diff --git a/lib/librte_net/rte_ether.h b/lib/librte_net/rte_ether.h\nindex 3a87ff184900..ac8897681aca 100644\n--- a/lib/librte_net/rte_ether.h\n+++ b/lib/librte_net/rte_ether.h\n@@ -55,7 +55,8 @@ extern \"C\" {\n * See http://standards.ieee.org/regauth/groupmac/tutorial.html\n */\n struct ether_addr {\n-\tuint8_t addr_bytes[ETHER_ADDR_LEN]; /**< Addr bytes in tx order */\n+\t/** Addr bytes in tx order */\n+\tuint8_t addr_bytes[ETHER_ADDR_LEN] __rte_aligned(2);\n } __attribute__((__packed__));\n \n #define ETHER_LOCAL_ADMIN_ADDR 0x02 /**< Locally assigned Eth. address. */\n@@ -146,7 +147,7 @@ static inline int is_multicast_ether_addr(const struct ether_addr *ea)\n */\n static inline int is_broadcast_ether_addr(const struct ether_addr *ea)\n {\n-\tconst unaligned_uint16_t *ea_words = (const unaligned_uint16_t *)ea;\n+\tconst uint16_t *ea_words = (const uint16_t *)ea;\n \n \treturn (ea_words[0] == 0xFFFF && ea_words[1] == 0xFFFF &&\n \t\tea_words[2] == 0xFFFF);\n", "prefixes": [ "v2", "1/7" ] }{ "id": 53491, "url": "