Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/17228/?format=api
https://patches.dpdk.org/api/patches/17228/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1479977798-13417-1-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": "<1479977798-13417-1-git-send-email-olivier.matz@6wind.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1479977798-13417-1-git-send-email-olivier.matz@6wind.com", "date": "2016-11-24T08:56:33", "name": "[dpdk-dev,0/5] virtio/mbuf: fix virtio tso with shared mbufs", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": true, "hash": "75520fd8551cd6caad5dab39337468772a1be0ff", "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/1479977798-13417-1-git-send-email-olivier.matz@6wind.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/17228/comments/", "check": "warning", "checks": "https://patches.dpdk.org/api/patches/17228/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 17FF3567A;\n\tThu, 24 Nov 2016 09:57:59 +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 9046E4CE6\n\tfor <dev@dpdk.org>; Thu, 24 Nov 2016 09:57:01 +0100 (CET)", "from glumotte.dev.6wind.com (unknown [10.16.0.195])\n\tby proxy.6wind.com (Postfix) with ESMTP id 3F343258DE;\n\tThu, 24 Nov 2016 09:56:52 +0100 (CET)" ], "From": "Olivier Matz <olivier.matz@6wind.com>", "To": "dev@dpdk.org,\n\tyuanhan.liu@linux.intel.com", "Cc": "maxime.coquelin@redhat.com, huawei.xie@intel.com,\n\tstephen@networkplumber.org", "Date": "Thu, 24 Nov 2016 09:56:33 +0100", "Message-Id": "<1479977798-13417-1-git-send-email-olivier.matz@6wind.com>", "X-Mailer": "git-send-email 2.8.1", "Subject": "[dpdk-dev] [PATCH 0/5] virtio/mbuf: fix virtio tso with shared mbufs", "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": "This patchset fixes the transmission of cloned mbufs when using\nvirtio + TSO. The problem is we need to fix the L4 checksum in the\npacket, but it should be considered as read-only, as pointed-out\nby Stephen here:\nhttp://dpdk.org/ml/archives/dev/2016-October/048873.html\n\nUnfortunatly the patchset is quite big, but I did not manage to\nfind a shorter solution. The first patches add some mbuf helpers\nthat are used in virtio in the last patch.\n\nThis last patch adds a zone for each tx ring entry where headers\ncan be copied, patched, and referenced by virtio descriptors in\ncase the mbuf is read-only. If its not the case, the mbuf is\nmodified as before.\n\nI tested with the same test plan than the one described in\nhttp://dpdk.org/ml/archives/dev/2016-October/048092.html\n(only the TSO test case).\n\nI also replayed the test with the following patches to validate\nthe code path for:\n\n- segmented packets (it forces a local copy in virtio_tso_fix_cksum)\n\n\n\nOlivier Matz (5):\n mbuf: remove const attribute in mbuf read function\n mbuf: new helper to check if a mbuf is shared\n mbuf: new helper to write data in a mbuf chain\n mbuf: new helper to copy data from a mbuf\n net/virtio: fix Tso when mbuf is shared\n\n app/test/test_mbuf.c | 62 +++++++++++++-\n drivers/net/virtio/virtio_rxtx.c | 119 ++++++++++++++++++--------\n drivers/net/virtio/virtqueue.h | 2 +\n lib/librte_mbuf/rte_mbuf.c | 46 +++++++++-\n lib/librte_mbuf/rte_mbuf.h | 157 ++++++++++++++++++++++++++++++++++-\n lib/librte_mbuf/rte_mbuf_version.map | 6 ++\n 6 files changed, 347 insertions(+), 45 deletions(-)", "diff": "--- a/lib/librte_mbuf/rte_mbuf.c\n+++ b/lib/librte_mbuf/rte_mbuf.c\n@@ -279,7 +279,7 @@ void *__rte_pktmbuf_read(const struct rte_mbuf *m, uint32_t off,\n seg = seg->next;\n }\n \n- if (off + len <= rte_pktmbuf_data_len(seg))\n+ if (0 && off + len <= rte_pktmbuf_data_len(seg))\n return rte_pktmbuf_mtod_offset(seg, char *, off);\n \n /* rare case: header is split among several segments */\ndiff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h\nindex 9dc6f10..5a4312a 100644\n--- a/lib/librte_mbuf/rte_mbuf.h\n+++ b/lib/librte_mbuf/rte_mbuf.h\n@@ -1671,7 +1671,7 @@ void *__rte_pktmbuf_read(const struct rte_mbuf *m, uint32_t off,\n static inline void *rte_pktmbuf_read(const struct rte_mbuf *m,\n uint32_t off, uint32_t len, void *buf)\n {\n- if (likely(off + len <= rte_pktmbuf_data_len(m)))\n+ if (likely(0 && off + len <= rte_pktmbuf_data_len(m)))\n return rte_pktmbuf_mtod_offset(m, char *, off);\n else\n return __rte_pktmbuf_read(m, off, len, buf);\n\n- and for shared mbuf (force to use the buffer in virtio tx ring)\n\n--- a/drivers/net/virtio/virtio_rxtx.c\n+++ b/drivers/net/virtio/virtio_rxtx.c\n@@ -225,7 +225,7 @@ virtio_tso_fix_cksum(struct rte_mbuf *m, char *hdr, size_t hdr_sz)\n int shared = 0;\n \n /* mbuf is write-only, we need to copy the headers in a linear buffer */\n- if (unlikely(rte_pktmbuf_data_is_shared(m, 0, hdrlen))) {\n+ if (unlikely(1 || rte_pktmbuf_data_is_shared(m, 0, hdrlen))) {\n shared = 1;\n \n /* network headers are too big, there's nothing we can do */\n", "prefixes": [ "dpdk-dev", "0/5" ] }{ "id": 17228, "url": "