Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/3507/?format=api
https://patches.dpdk.org/api/patches/3507/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1424366779-14256-2-git-send-email-michalx.k.jastrzebski@intel.com/", "project": { "id": 1, "url": "https://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": "<1424366779-14256-2-git-send-email-michalx.k.jastrzebski@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1424366779-14256-2-git-send-email-michalx.k.jastrzebski@intel.com", "date": "2015-02-19T17:26:14", "name": "[dpdk-dev,v3,1/6] net: changed arp_hdr struct declaration", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "fdd48689dbd4346731c0e6a58707beeef22e6a0f", "submitter": { "id": 74, "url": "https://patches.dpdk.org/api/people/74/?format=api", "name": "Michal Jastrzebski", "email": "michalx.k.jastrzebski@intel.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1424366779-14256-2-git-send-email-michalx.k.jastrzebski@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/3507/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/3507/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 4192EB6DF;\n\tThu, 19 Feb 2015 18:28:08 +0100 (CET)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id 75832B6C9\n\tfor <dev@dpdk.org>; Thu, 19 Feb 2015 18:28:07 +0100 (CET)", "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga103.jf.intel.com with ESMTP; 19 Feb 2015 09:22:35 -0800", "from unknown (HELO Sent) ([10.217.248.178])\n\tby orsmga002.jf.intel.com with SMTP; 19 Feb 2015 09:27:58 -0800", "by Sent (sSMTP sendmail emulation); Thu, 19 Feb 2015 18:27:15 +0200" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.09,609,1418112000\"; d=\"scan'208\";a=\"688000019\"", "From": "Michal Jastrzebski <michalx.k.jastrzebski@intel.com>", "To": "dev@dpdk.org", "Date": "Thu, 19 Feb 2015 18:26:14 +0100", "Message-Id": "<1424366779-14256-2-git-send-email-michalx.k.jastrzebski@intel.com>", "X-Mailer": "git-send-email 2.1.1", "In-Reply-To": "<1424366779-14256-1-git-send-email-michalx.k.jastrzebski@intel.com>", "References": "<1423840570-6452-1-git-send-email-michalx.k.jastrzebski@intel.com>\n\t<1424366779-14256-1-git-send-email-michalx.k.jastrzebski@intel.com>", "Subject": "[dpdk-dev] [PATCH v3 1/6] net: changed arp_hdr struct declaration", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/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: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>\n\nChanged MAC address type from uint8_t[6] to struct ether_addr and IP\naddress type from uint8_t[4] to uint32_t. Also removed union from\narp_hdr struct. Updated test-pmd to match new arp_hdr version.\n\nSigned-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>\n---\n app/test-pmd/icmpecho.c | 27 ++++++++++-----------------\n lib/librte_net/rte_arp.h | 13 ++++++-------\n 2 files changed, 16 insertions(+), 24 deletions(-)", "diff": "diff --git a/app/test-pmd/icmpecho.c b/app/test-pmd/icmpecho.c\nindex 08ea01d..010c5a9 100644\n--- a/app/test-pmd/icmpecho.c\n+++ b/app/test-pmd/icmpecho.c\n@@ -371,18 +371,14 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\tif (verbose_level > 0) {\n-\t\t\t\tmemcpy(ð_addr,\n-\t\t\t\t arp_h->arp_data.arp_ip.arp_sha, 6);\n+\t\t\t\tether_addr_copy(&arp_h->arp_data.arp_sha, ð_addr);\n \t\t\t\tether_addr_dump(\" sha=\", ð_addr);\n-\t\t\t\tmemcpy(&ip_addr,\n-\t\t\t\t arp_h->arp_data.arp_ip.arp_sip, 4);\n+\t\t\t\tip_addr = arp_h->arp_data.arp_sip;\n \t\t\t\tipv4_addr_dump(\" sip=\", ip_addr);\n \t\t\t\tprintf(\"\\n\");\n-\t\t\t\tmemcpy(ð_addr,\n-\t\t\t\t arp_h->arp_data.arp_ip.arp_tha, 6);\n+\t\t\t\tether_addr_copy(&arp_h->arp_data.arp_tha, ð_addr);\n \t\t\t\tether_addr_dump(\" tha=\", ð_addr);\n-\t\t\t\tmemcpy(&ip_addr,\n-\t\t\t\t arp_h->arp_data.arp_ip.arp_tip, 4);\n+\t\t\t\tip_addr = arp_h->arp_data.arp_tip;\n \t\t\t\tipv4_addr_dump(\" tip=\", ip_addr);\n \t\t\t\tprintf(\"\\n\");\n \t\t\t}\n@@ -402,17 +398,14 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)\n \t\t\t\t\tð_h->s_addr);\n \n \t\t\tarp_h->arp_op = rte_cpu_to_be_16(ARP_OP_REPLY);\n-\t\t\tmemcpy(ð_addr, arp_h->arp_data.arp_ip.arp_tha, 6);\n-\t\t\tmemcpy(arp_h->arp_data.arp_ip.arp_tha,\n-\t\t\t arp_h->arp_data.arp_ip.arp_sha, 6);\n-\t\t\tmemcpy(arp_h->arp_data.arp_ip.arp_sha,\n-\t\t\t ð_h->s_addr, 6);\n+\t\t\tether_addr_copy(&arp_h->arp_data.arp_tha, ð_addr);\n+\t\t\tether_addr_copy(&arp_h->arp_data.arp_sha, &arp_h->arp_data.arp_tha);\n+\t\t\tether_addr_copy(ð_addr, &arp_h->arp_data.arp_sha);\n \n \t\t\t/* Swap IP addresses in ARP payload */\n-\t\t\tmemcpy(&ip_addr, arp_h->arp_data.arp_ip.arp_sip, 4);\n-\t\t\tmemcpy(arp_h->arp_data.arp_ip.arp_sip,\n-\t\t\t arp_h->arp_data.arp_ip.arp_tip, 4);\n-\t\t\tmemcpy(arp_h->arp_data.arp_ip.arp_tip, &ip_addr, 4);\n+\t\t\tip_addr = arp_h->arp_data.arp_sip;\n+\t\t\tarp_h->arp_data.arp_sip = arp_h->arp_data.arp_tip;\n+\t\t\tarp_h->arp_data.arp_tip = ip_addr;\n \t\t\tpkts_burst[nb_replies++] = pkt;\n \t\t\tcontinue;\n \t\t}\ndiff --git a/lib/librte_net/rte_arp.h b/lib/librte_net/rte_arp.h\nindex c7b0e51..72108a1 100644\n--- a/lib/librte_net/rte_arp.h\n+++ b/lib/librte_net/rte_arp.h\n@@ -39,6 +39,7 @@\n */\n \n #include <stdint.h>\n+#include <rte_ether.h>\n \n #ifdef __cplusplus\n extern \"C\" {\n@@ -48,10 +49,10 @@ extern \"C\" {\n * ARP header IPv4 payload.\n */\n struct arp_ipv4 {\n-\tuint8_t arp_sha[6]; /* sender hardware address */\n-\tuint8_t arp_sip[4]; /* sender IP address */\n-\tuint8_t arp_tha[6]; /* target hardware address */\n-\tuint8_t arp_tip[4]; /* target IP address */\n+\tstruct ether_addr arp_sha;\t/* sender hardware address */\n+\tuint32_t arp_sip;\t\t\t/* sender IP address */\n+\tstruct ether_addr arp_tha;\t/* target hardware address */\n+\tuint32_t arp_tip;\t\t\t/* target IP address */\n } __attribute__((__packed__));\n \n /**\n@@ -72,9 +73,7 @@ struct arp_hdr {\n #define\tARP_OP_INVREQUEST 8 /* request to identify peer */\n #define\tARP_OP_INVREPLY 9 /* response identifying peer */\n \n-\tunion {\n-\t\tstruct arp_ipv4 arp_ip;\n-\t} arp_data;\n+\tstruct arp_ipv4 arp_data;\n } __attribute__((__packed__));\n \n #ifdef __cplusplus\n", "prefixes": [ "dpdk-dev", "v3", "1/6" ] }{ "id": 3507, "url": "