Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/21605/?format=api
https://patches.dpdk.org/api/patches/21605/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1488966121-22853-7-git-send-email-olivier.matz@6wind.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": "<1488966121-22853-7-git-send-email-olivier.matz@6wind.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1488966121-22853-7-git-send-email-olivier.matz@6wind.com", "date": "2017-03-08T09:41:58", "name": "[dpdk-dev,6/9] mbuf: use 2 bytes for port and nb segments", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "cff857a851db5d040f08291d76af8bef76fc2f6f", "submitter": { "id": 8, "url": "https://patches.dpdk.org/api/people/8/?format=api", "name": "Olivier Matz", "email": "olivier.matz@6wind.com" }, "delegate": { "id": 1, "url": "https://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1488966121-22853-7-git-send-email-olivier.matz@6wind.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/21605/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/21605/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 DE0A4F60E;\n\tWed, 8 Mar 2017 10:43:17 +0100 (CET)", "from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com\n\t[62.23.145.76]) by dpdk.org (Postfix) with ESMTP id EFEF337A4\n\tfor <dev@dpdk.org>; Wed, 8 Mar 2017 10:42:23 +0100 (CET)", "from glumotte.dev.6wind.com (unknown [10.16.0.195])\n\tby proxy.6wind.com (Postfix) with ESMTP id 1BB3324D20;\n\tWed, 8 Mar 2017 10:42:18 +0100 (CET)" ], "From": "Olivier Matz <olivier.matz@6wind.com>", "To": "dev@dpdk.org", "Cc": "bruce.richardson@intel.com, konstantin.ananyev@intel.com,\n\tmb@smartsharesystems.com, andrey.chilikin@intel.com,\n\tjblunck@infradead.org, \n\tnelio.laranjeiro@6wind.com, arybchenko@solarflare.com", "Date": "Wed, 8 Mar 2017 10:41:58 +0100", "Message-Id": "<1488966121-22853-7-git-send-email-olivier.matz@6wind.com>", "X-Mailer": "git-send-email 2.8.1", "In-Reply-To": "<1488966121-22853-1-git-send-email-olivier.matz@6wind.com>", "References": "<1485271173-13408-1-git-send-email-olivier.matz@6wind.com>\n\t<1488966121-22853-1-git-send-email-olivier.matz@6wind.com>", "Subject": "[dpdk-dev] [PATCH 6/9] mbuf: use 2 bytes for port and nb segments", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <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": "Change the size of m->port and m->nb_segs to 16 bits. It is now possible\nto reference a port identifier larger than 256 and have a mbuf chain\nlarger than 256 segments.\n\nSigned-off-by: Olivier Matz <olivier.matz@6wind.com>\n---\n app/test-pmd/csumonly.c | 4 ++--\n .../linuxapp/eal/include/exec-env/rte_kni_common.h | 4 ++--\n lib/librte_mbuf/rte_mbuf.h | 12 +++++++-----\n 3 files changed, 11 insertions(+), 9 deletions(-)", "diff": "diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c\nindex 88cc842..5eaff9b 100644\n--- a/app/test-pmd/csumonly.c\n+++ b/app/test-pmd/csumonly.c\n@@ -583,7 +583,7 @@ pkt_copy_split(const struct rte_mbuf *pkt)\n \t\trc = mbuf_copy_split(pkt, md, seglen, nb_seg);\n \t\tif (rc < 0)\n \t\t\tRTE_LOG(ERR, USER1,\n-\t\t\t\t\"mbuf_copy_split for %p(len=%u, nb_seg=%hhu) \"\n+\t\t\t\t\"mbuf_copy_split for %p(len=%u, nb_seg=%u) \"\n \t\t\t\t\"into %u segments failed with error code: %d\\n\",\n \t\t\t\tpkt, pkt->pkt_len, pkt->nb_segs, nb_seg, rc);\n \n@@ -801,7 +801,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)\n \t\t\tchar buf[256];\n \n \t\t\tprintf(\"-----------------\\n\");\n-\t\t\tprintf(\"port=%u, mbuf=%p, pkt_len=%u, nb_segs=%hhu:\\n\",\n+\t\t\tprintf(\"port=%u, mbuf=%p, pkt_len=%u, nb_segs=%u:\\n\",\n \t\t\t\tfs->rx_port, m, m->pkt_len, m->nb_segs);\n \t\t\t/* dump rx parsed packet info */\n \t\t\trte_get_rx_ol_flag_list(rx_ol_flags, buf, sizeof(buf));\ndiff --git a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h\nindex f24f79f..2ac879f 100644\n--- a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h\n+++ b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h\n@@ -118,8 +118,8 @@ struct rte_kni_mbuf {\n \tuint64_t buf_physaddr;\n \tuint16_t data_off; /**< Start address of data in segment buffer. */\n \tchar pad1[2];\n-\tuint8_t nb_segs; /**< Number of segments. */\n-\tchar pad4[3];\n+\tuint16_t nb_segs; /**< Number of segments. */\n+\tchar pad4[2];\n \tuint64_t ol_flags; /**< Offload features. */\n \tchar pad2[4];\n \tuint32_t pkt_len; /**< Total pkt len: sum of all segment data_len. */\ndiff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h\nindex 4dc9a20..45cd6b9 100644\n--- a/lib/librte_mbuf/rte_mbuf.h\n+++ b/lib/librte_mbuf/rte_mbuf.h\n@@ -393,12 +393,13 @@ struct rte_mbuf {\n \tvoid *buf_addr; /**< Virtual address of segment buffer. */\n \tphys_addr_t buf_physaddr; /**< Physical address of segment buffer. */\n \n-\t/* next 6 bytes are initialised on RX descriptor rearm */\n+\t/* next 8 bytes are initialised on RX descriptor rearm */\n \tMARKER64 rearm_data;\n \tuint16_t data_off;\n \n \t/**\n-\t * 16-bit Reference counter.\n+\t * Reference counter. Its size should at least equal to the size\n+\t * of port field (16 bits), to support zero-copy broadcast.\n \t * It should only be accessed using the following functions:\n \t * rte_mbuf_refcnt_update(), rte_mbuf_refcnt_read(), and\n \t * rte_mbuf_refcnt_set(). The functionality of these functions (atomic,\n@@ -410,9 +411,10 @@ struct rte_mbuf {\n \t\trte_atomic16_t refcnt_atomic; /**< Atomically accessed refcnt */\n \t\tuint16_t refcnt; /**< Non-atomically accessed refcnt */\n \t};\n-\tuint8_t nb_segs; /**< Number of segments. */\n-\tuint8_t port; /**< Input port. */\n-\tuint16_t pad; /**< 2B pad for naturally aligned ol_flags */\n+\tuint16_t nb_segs; /**< Number of segments. */\n+\n+\t/** Input port (16 bits to support more than 256 virtual ports). */\n+\tuint16_t port;\n \n \tuint64_t ol_flags; /**< Offload features. */\n \n", "prefixes": [ "dpdk-dev", "6/9" ] }{ "id": 21605, "url": "