Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/92258/?format=api
http://patchwork.dpdk.org/api/patches/92258/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210427135755.927-3-olivier.matz@6wind.com/", "project": { "id": 1, "url": "http://patchwork.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": "<20210427135755.927-3-olivier.matz@6wind.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210427135755.927-3-olivier.matz@6wind.com", "date": "2021-04-27T13:57:53", "name": "[2/4] net/tap: fix Rx cksum flags on TCP packets", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "dffe57dd64a7999fae4d4f3508bc6fa49fa6a498", "submitter": { "id": 8, "url": "http://patchwork.dpdk.org/api/people/8/?format=api", "name": "Olivier Matz", "email": "olivier.matz@6wind.com" }, "delegate": { "id": 3961, "url": "http://patchwork.dpdk.org/api/users/3961/?format=api", "username": "arybchenko", "first_name": "Andrew", "last_name": "Rybchenko", "email": "andrew.rybchenko@oktetlabs.ru" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20210427135755.927-3-olivier.matz@6wind.com/mbox/", "series": [ { "id": 16703, "url": "http://patchwork.dpdk.org/api/series/16703/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=16703", "date": "2021-04-27T13:57:51", "name": "net/tap: fix Rx cksum", "version": 1, "mbox": "http://patchwork.dpdk.org/series/16703/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/92258/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/92258/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 03840A0A02;\n\tTue, 27 Apr 2021 15:58:38 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6C6D641266;\n\tTue, 27 Apr 2021 15:58:27 +0200 (CEST)", "from mail-wm1-f48.google.com (mail-wm1-f48.google.com\n [209.85.128.48]) by mails.dpdk.org (Postfix) with ESMTP id 9159D41243\n for <dev@dpdk.org>; Tue, 27 Apr 2021 15:58:24 +0200 (CEST)", "by mail-wm1-f48.google.com with SMTP id i129so4926664wma.3\n for <dev@dpdk.org>; Tue, 27 Apr 2021 06:58:24 -0700 (PDT)", "from gojira.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com.\n [62.23.145.78])\n by smtp.gmail.com with ESMTPSA id h9sm21072213wmb.35.2021.04.27.06.58.23\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 27 Apr 2021 06:58:24 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=yWA5ktoUNnaZAuLRrsuiTyEQoYhVA/XUN6xF47YxwOY=;\n b=Rh84MnLqJWTCgM3WaftKrOxPzKMDEfYOEkd4wC98JfmVfZLpJ+CQqvRjAVxVn9pXnx\n kZijZRGy+xxhf/uFckqwa+lCwD7FG6KSkF4n48xb4+Ncw6pbvHrIP9n58T9DMbwxZqzL\n glHNJEZPgrOBxr3NlSm0XKLjn/9yPIiQokemXZ1Mlp5KUz/WHp0XVX7ekWsZ2nEKMcme\n gw5HZKOuReFlu2Rep3PjWI0wPzIlAyFIDl4AMPbdbqeIhjpTPgGCYXsMXjIIbDhKsEU0\n fHryJWk6ihJcYi30EX6nTCXIwSk9jArtB4rvf9KGuKAFm0UaSZ+CAqMcfFjx78Ndy5Ly\n p50g==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=yWA5ktoUNnaZAuLRrsuiTyEQoYhVA/XUN6xF47YxwOY=;\n b=h6a9a9jzKgSAxFMGtHCPsOcbtMvg65CoWNfHe2evXfpED8+h26oYPBXqtYsmFZ8Z5P\n BdIokWL5pu/kyffYbwkDRAYi8q8nEIdVbCx6cFUfIDUFoMDUt/b8LsUOPeY4ZlvQD944\n QmG7IotFMrh0Tf6YT9RF4WqXde5Jjwzq+m7TWTvKcQfqd4kOqevWc8O9F8zIDMG2Z+Oc\n hDUfwTJLmYkyqESNiKiOoqSiAMqHQSf4PXQ7ZoqCdbLKp2YS/M8ht5W/yp94fumeBEG/\n 6zOfjijb6CEdzxYHW7aTfE2Rw9rTYG5nwGldNShbiw50PTZQlSdYbscxTigdriTZVqUF\n Hs6w==", "X-Gm-Message-State": "AOAM533QseAFvC/LQEz610jUHQuxEyIhm5LWDIXB51y7AHJUz6ceQSal\n m37zAmV0v8dN+tZ/yLnTa4Q4R0p0nJnblA==", "X-Google-Smtp-Source": "\n ABdhPJym2bUtTpsMOpXoANZVDpa/50qFMGr40yfqg43kcyxTz8m6rnZBTfmbSRlCKeluepGG6SJewQ==", "X-Received": "by 2002:a05:600c:48a8:: with SMTP id\n j40mr7375054wmp.114.1619531904383;\n Tue, 27 Apr 2021 06:58:24 -0700 (PDT)", "From": "Olivier Matz <olivier.matz@6wind.com>", "To": "dev@dpdk.org", "Cc": "Keith Wiles <keith.wiles@intel.com>, Hongzhi Guo <guohongzhi1@huawei.com>,\n\t=?utf-8?q?Morten_Br=C3=B8rup?= <mb@smartsharesystems.com>,\n Thomas Monjalon <thomas@monjalon.net>, stable@dpdk.org", "Date": "Tue, 27 Apr 2021 15:57:53 +0200", "Message-Id": "<20210427135755.927-3-olivier.matz@6wind.com>", "X-Mailer": "git-send-email 2.29.2", "In-Reply-To": "<20210427135755.927-1-olivier.matz@6wind.com>", "References": "<20210427135755.927-1-olivier.matz@6wind.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH 2/4] net/tap: fix Rx cksum flags on TCP packets", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <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 <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Since commit d5df2ae0428a (\"net: fix unneeded replacement of TCP\nchecksum 0\"), the functions rte_ipv4_udptcp_cksum() or\nrte_ipv6_udptcp_cksum() can return either 0x0000 or 0xffff when used to\nverify a packet containing a valid checksum.\n\nThis new behavior broke the checksum verification in tap driver for TCP\npackets: these packets are marked with PKT_RX_L4_CKSUM_BAD.\n\nFix this by checking the 2 possible values. A next commit will introduce\na checksum verification helper to simplify this a bit.\n\nFixes: d5df2ae0428a (\"net: fix unneeded replacement of TCP checksum 0\")\nCc: stable@dpdk.org\n\nSigned-off-by: Olivier Matz <olivier.matz@6wind.com>\n---\n drivers/net/tap/rte_eth_tap.c | 12 +++++++-----\n 1 file changed, 7 insertions(+), 5 deletions(-)", "diff": "diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c\nindex e7b185a4b5..71282e8065 100644\n--- a/drivers/net/tap/rte_eth_tap.c\n+++ b/drivers/net/tap/rte_eth_tap.c\n@@ -346,6 +346,8 @@ tap_verify_csum(struct rte_mbuf *mbuf)\n \t\treturn;\n \t}\n \tif (l4 == RTE_PTYPE_L4_UDP || l4 == RTE_PTYPE_L4_TCP) {\n+\t\tint cksum_ok;\n+\n \t\tl4_hdr = rte_pktmbuf_mtod_offset(mbuf, void *, l2_len + l3_len);\n \t\t/* Don't verify checksum for multi-segment packets. */\n \t\tif (mbuf->nb_segs > 1)\n@@ -363,13 +365,13 @@ tap_verify_csum(struct rte_mbuf *mbuf)\n \t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t}\n-\t\t\tcksum = ~rte_ipv4_udptcp_cksum(l3_hdr, l4_hdr);\n+\t\t\tcksum = rte_ipv4_udptcp_cksum(l3_hdr, l4_hdr);\n \t\t} else { /* l3 == RTE_PTYPE_L3_IPV6, checked above */\n-\t\t\tcksum = ~rte_ipv6_udptcp_cksum(l3_hdr, l4_hdr);\n+\t\t\tcksum = rte_ipv6_udptcp_cksum(l3_hdr, l4_hdr);\n \t\t}\n-\t\tmbuf->ol_flags |= cksum ?\n-\t\t\tPKT_RX_L4_CKSUM_BAD :\n-\t\t\tPKT_RX_L4_CKSUM_GOOD;\n+\t\tcksum_ok = (cksum == 0) || (cksum == 0xffff);\n+\t\tmbuf->ol_flags |= cksum_ok ?\n+\t\t\tPKT_RX_L4_CKSUM_GOOD : PKT_RX_L4_CKSUM_BAD;\n \t}\n }\n \n", "prefixes": [ "2/4" ] }{ "id": 92258, "url": "