From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by dpdk.org (Postfix) with ESMTP id CE7372B92 for ; Mon, 19 Nov 2018 13:26:02 +0100 (CET) Received: by mail-wm1-f47.google.com with SMTP id s11so5066251wmh.1 for ; Mon, 19 Nov 2018 04:26:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iqMh3tkL3BolR3NNo+U/tL69e2BcAmFb/3xMW3EmnXg=; b=BKGl0BHBEhp/yfhaA0kiIBlXiM1TVYxRncAPPiksVz+crBTGJiMeU3mSn9WgRlpYeC c0pyz1WBKwMYzD3NYzlGYFM4woeRDGANW0QMEyLQqtRji3cm5ItJYYCV+H0h0vvXiESu lEpO/JqNDh1CkdbkvaJ/1E8Jf/uSVBG/vxEn3Vd00dqLscx27MIRJWOVE+neCPaxN9Kk 9gLRwj2JSti7kU8Qe9dGdELk+XwZtXBWGxxfKuaqgnlqloXkofaXY4JIlNQMRlOQdDbL tOb38dwJsOa+Ph38LbT2Tv88Oj7qbJ1yEpoG5oX3lPcOpp2ZYgEjMBXkMXcRGSoIMbmr Pr4g== X-Gm-Message-State: AGRZ1gInxUClJWkI5tLKo8q60/hQUPWLyPdbqWtSA/g76Myrz9IZsUSC HGhJTzc8zptf0m7NT7vmJ+mSDi4a X-Google-Smtp-Source: AFSGD/Xy5SOg6x7BZEK0XvRJ7AUMpmQup7aWI37hnaSploGSBZfbytQja4vlV4mdcaYn5tjsRpITVA== X-Received: by 2002:a1c:7911:: with SMTP id l17mr6545430wme.57.1542630362369; Mon, 19 Nov 2018 04:26:02 -0800 (PST) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id v189-v6sm30209199wmd.40.2018.11.19.04.26.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Nov 2018 04:26:01 -0800 (PST) From: Luca Boccassi To: Raslan Darawsheh Cc: Ophir Munk , Ferruh Yigit , dpdk stable Date: Mon, 19 Nov 2018 12:25:29 +0000 Message-Id: <20181119122538.14207-12-bluca@debian.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119122538.14207-1-bluca@debian.org> References: <20181108180111.25873-1-bluca@debian.org> <20181119122538.14207-1-bluca@debian.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'app/testpmd: fix L4 length for UDP checksum' has been queued to LTS release 16.11.9 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Nov 2018 12:26:03 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/21/18. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Luca Boccassi --- >>From c677fe3abc31668c8069f2d7f4259265c4afbe84 Mon Sep 17 00:00:00 2001 From: Raslan Darawsheh Date: Sun, 11 Nov 2018 15:31:37 +0000 Subject: [PATCH] app/testpmd: fix L4 length for UDP checksum [ upstream commit 2b5651c026d8d1a687a8f7a210b1b8f13f906911 ] testpmd only sets the L4 len in case of TCP packets. some PMD's like tap rely on mbuf meta data to calculate csum This will set the L4 len for UDP packets same as TCP Fixes: 160c3dc9458c ("app/testpmd: introduce IP parsing functions in csum fwd engine") Signed-off-by: Raslan Darawsheh Signed-off-by: Ophir Munk Reviewed-by: Ferruh Yigit --- app/test-pmd/csumonly.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index 57e6ae276..3bf07a42e 100644 --- a/app/test-pmd/csumonly.c +++ b/app/test-pmd/csumonly.c @@ -142,7 +142,9 @@ parse_ipv4(struct ipv4_hdr *ipv4_hdr, struct testpmd_offload_info *info) if (info->l4_proto == IPPROTO_TCP) { tcp_hdr = (struct tcp_hdr *)((char *)ipv4_hdr + info->l3_len); info->l4_len = (tcp_hdr->data_off & 0xf0) >> 2; - } else + } else if (info->l4_proto == IPPROTO_UDP) + info->l4_len = sizeof(struct udp_hdr); + else info->l4_len = 0; } @@ -159,7 +161,9 @@ parse_ipv6(struct ipv6_hdr *ipv6_hdr, struct testpmd_offload_info *info) if (info->l4_proto == IPPROTO_TCP) { tcp_hdr = (struct tcp_hdr *)((char *)ipv6_hdr + info->l3_len); info->l4_len = (tcp_hdr->data_off & 0xf0) >> 2; - } else + } else if (info->l4_proto == IPPROTO_UDP) + info->l4_len = sizeof(struct udp_hdr); + else info->l4_len = 0; } -- 2.19.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-19 12:15:18.358096815 +0000 +++ 0012-app-testpmd-fix-L4-length-for-UDP-checksum.patch 2018-11-19 12:15:18.099611432 +0000 @@ -1,15 +1,16 @@ -From 2b5651c026d8d1a687a8f7a210b1b8f13f906911 Mon Sep 17 00:00:00 2001 +From c677fe3abc31668c8069f2d7f4259265c4afbe84 Mon Sep 17 00:00:00 2001 From: Raslan Darawsheh Date: Sun, 11 Nov 2018 15:31:37 +0000 Subject: [PATCH] app/testpmd: fix L4 length for UDP checksum +[ upstream commit 2b5651c026d8d1a687a8f7a210b1b8f13f906911 ] + testpmd only sets the L4 len in case of TCP packets. some PMD's like tap rely on mbuf meta data to calculate csum This will set the L4 len for UDP packets same as TCP Fixes: 160c3dc9458c ("app/testpmd: introduce IP parsing functions in csum fwd engine") -CC: stable@dpdk.org Signed-off-by: Raslan Darawsheh Signed-off-by: Ophir Munk @@ -19,10 +20,10 @@ 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c -index dce4b9be7..ffeee2051 100644 +index 57e6ae276..3bf07a42e 100644 --- a/app/test-pmd/csumonly.c +++ b/app/test-pmd/csumonly.c -@@ -111,7 +111,9 @@ parse_ipv4(struct ipv4_hdr *ipv4_hdr, struct testpmd_offload_info *info) +@@ -142,7 +142,9 @@ parse_ipv4(struct ipv4_hdr *ipv4_hdr, struct testpmd_offload_info *info) if (info->l4_proto == IPPROTO_TCP) { tcp_hdr = (struct tcp_hdr *)((char *)ipv4_hdr + info->l3_len); info->l4_len = (tcp_hdr->data_off & 0xf0) >> 2; @@ -33,7 +34,7 @@ info->l4_len = 0; } -@@ -128,7 +130,9 @@ parse_ipv6(struct ipv6_hdr *ipv6_hdr, struct testpmd_offload_info *info) +@@ -159,7 +161,9 @@ parse_ipv6(struct ipv6_hdr *ipv6_hdr, struct testpmd_offload_info *info) if (info->l4_proto == IPPROTO_TCP) { tcp_hdr = (struct tcp_hdr *)((char *)ipv6_hdr + info->l3_len); info->l4_len = (tcp_hdr->data_off & 0xf0) >> 2;