<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div class="moz-cite-prefix">On 3/11/2022 1:42 PM, Liu, KevinX
wrote:<br>
</div>
<blockquote type="cite" cite="mid:DM6PR11MB3673A76C845EA94CBFECAE8A960C9@DM6PR11MB3673.namprd11.prod.outlook.com">
<pre class="moz-quote-pre" wrap="">
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">-----Original Message-----
From: Singh, Aman Deep <a class="moz-txt-link-rfc2396E" href="mailto:aman.deep.singh@intel.com"><aman.deep.singh@intel.com></a>
Sent: 2022年3月11日 16:02
To: Liu, KevinX <a class="moz-txt-link-rfc2396E" href="mailto:kevinx.liu@intel.com"><kevinx.liu@intel.com></a>; Zhang, Qi Z <a class="moz-txt-link-rfc2396E" href="mailto:qi.z.zhang@intel.com"><qi.z.zhang@intel.com></a>;
dev <a class="moz-txt-link-rfc2396E" href="mailto:dev@dpdk.org"><dev@dpdk.org></a>; Yigit, Ferruh <a class="moz-txt-link-rfc2396E" href="mailto:ferruh.yigit@intel.com"><ferruh.yigit@intel.com></a>
Cc: Yang, Qiming <a class="moz-txt-link-rfc2396E" href="mailto:qiming.yang@intel.com"><qiming.yang@intel.com></a>; Yang, SteveX
<a class="moz-txt-link-rfc2396E" href="mailto:stevex.yang@intel.com"><stevex.yang@intel.com></a>; Xing, Beilei <a class="moz-txt-link-rfc2396E" href="mailto:beilei.xing@intel.com"><beilei.xing@intel.com></a>; Li, Xiaoyun
<a class="moz-txt-link-rfc2396E" href="mailto:xiaoyun.li@intel.com"><xiaoyun.li@intel.com></a>; dpdk stable <a class="moz-txt-link-rfc2396E" href="mailto:stable@dpdk.org"><stable@dpdk.org></a>; Zhang, Yuying
<a class="moz-txt-link-rfc2396E" href="mailto:yuying.zhang@intel.com"><yuying.zhang@intel.com></a>
Subject: Re: [PATCH v2 2/2] app/testpmd: fix SW L4 checksum in multi-
segments
Hi Kevin,
On 3/11/2022 12:34 PM, Liu, KevinX wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">Hi, Ferruh
Yuying has already reviewed it days ago.
If you can, I hope you can change the status as soon as possible and try to
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">merge the code in RC4.
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">Thank you.
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">-----Original Message-----
From: Zhang, Yuying <a class="moz-txt-link-rfc2396E" href="mailto:yuying.zhang@intel.com"><yuying.zhang@intel.com></a>
Sent: 2022年3月3日 14:30
To: Zhang, Qi Z <a class="moz-txt-link-rfc2396E" href="mailto:qi.z.zhang@intel.com"><qi.z.zhang@intel.com></a>; Liu, KevinX
<a class="moz-txt-link-rfc2396E" href="mailto:kevinx.liu@intel.com"><kevinx.liu@intel.com></a>; dev <a class="moz-txt-link-rfc2396E" href="mailto:dev@dpdk.org"><dev@dpdk.org></a>
Cc: Yang, Qiming <a class="moz-txt-link-rfc2396E" href="mailto:qiming.yang@intel.com"><qiming.yang@intel.com></a>; Yang, SteveX
<a class="moz-txt-link-rfc2396E" href="mailto:stevex.yang@intel.com"><stevex.yang@intel.com></a>; Yigit, Ferruh <a class="moz-txt-link-rfc2396E" href="mailto:ferruh.yigit@intel.com"><ferruh.yigit@intel.com></a>;
Xing, Beilei <a class="moz-txt-link-rfc2396E" href="mailto:beilei.xing@intel.com"><beilei.xing@intel.com></a>; Li, Xiaoyun
<a class="moz-txt-link-rfc2396E" href="mailto:xiaoyun.li@intel.com"><xiaoyun.li@intel.com></a>; dpdk stable <a class="moz-txt-link-rfc2396E" href="mailto:stable@dpdk.org"><stable@dpdk.org></a>
Subject: RE: [PATCH v2 2/2] app/testpmd: fix SW L4 checksum in multi-
segments
LGTM.
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">-----Original Message-----
From: Liu, KevinX <a class="moz-txt-link-rfc2396E" href="mailto:kevinx.liu@intel.com"><kevinx.liu@intel.com></a>
Sent: Wednesday, December 29, 2021 5:37 PM
To: <a class="moz-txt-link-abbreviated" href="mailto:dev@dpdk.org">dev@dpdk.org</a>
Cc: Yang, Qiming <a class="moz-txt-link-rfc2396E" href="mailto:qiming.yang@intel.com"><qiming.yang@intel.com></a>; Zhang, Qi Z
<a class="moz-txt-link-rfc2396E" href="mailto:qi.z.zhang@intel.com"><qi.z.zhang@intel.com></a>; Yang, SteveX <a class="moz-txt-link-rfc2396E" href="mailto:stevex.yang@intel.com"><stevex.yang@intel.com></a>;
Yigit, Ferruh <a class="moz-txt-link-rfc2396E" href="mailto:ferruh.yigit@intel.com"><ferruh.yigit@intel.com></a>; Liu, KevinX
<a class="moz-txt-link-rfc2396E" href="mailto:kevinx.liu@intel.com"><kevinx.liu@intel.com></a>; <a class="moz-txt-link-abbreviated" href="mailto:stable@dpdk.org">stable@dpdk.org</a>
Subject: [PATCH v2 2/2] app/testpmd: fix SW L4 checksum in
multi-segments
Testpmd forwards packets in checksum mode that it needs to
calculate the checksum of each layer's protocol.
In process_inner_cksums, when parsing tunnel packets, inner L4
offset should be outer_l2_len + outer_l3_len + l2_len + l3_len.
In process_outer_cksums, when parsing tunnel packets, outer L4
offset should be outer_l2_len + outer_l3_len.
Fixes: e6b9d6411e91 ("app/testpmd: add SW L4 checksum in multi-
segments")
Cc: <a class="moz-txt-link-abbreviated" href="mailto:stable@dpdk.org">stable@dpdk.org</a>
Signed-off-by: Kevin Liu <a class="moz-txt-link-rfc2396E" href="mailto:kevinx.liu@intel.com"><kevinx.liu@intel.com></a>
</pre>
</blockquote>
</blockquote>
<pre class="moz-quote-pre" wrap="">Acked-by: Yuying Zhang <a class="moz-txt-link-rfc2396E" href="mailto:yuying.zhang@intel.com"><yuying.zhang@intel.com></a></pre>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<br>
<pre><span class="acked-by" style="box-sizing: border-box; color: rgb(45, 69, 102);">Acked-by: Aman Singh <a class="moz-txt-link-rfc2396E" href="mailto:aman.deep.singh@intel.com"><aman.deep.singh@intel.com></a></span></pre>
<blockquote type="cite" cite="mid:DM6PR11MB3673A76C845EA94CBFECAE8A960C9@DM6PR11MB3673.namprd11.prod.outlook.com">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">---
app/test-pmd/csumonly.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index
02bc3929c7..c235456e58 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">@@ -513,7 +513,7 @@ process_inner_cksums(void *l3_hdr, const
</pre>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<pre class="moz-quote-pre" wrap="">struct
</pre>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">testpmd_offload_info *info, ol_flags |=
</pre>
</blockquote>
</blockquote>
<pre class="moz-quote-pre" wrap="">RTE_MBUF_F_TX_UDP_CKSUM; }
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">else { if (info->is_tunnel) -l4_off = info->l2_len +
+l4_off = info->outer_l2_len +
info->outer_l3_len +
info->l2_len + info->l3_len;
</pre>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<pre class="moz-quote-pre" wrap="">This seems OK. A similar miss is present for TCP case also.
Can you please do the same for that. Line 537
</pre>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<pre class="moz-quote-pre" wrap=""> else
@@ -536,7 +536,7 @@ process_inner_cksums(void *l3_hdr, const
</pre>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<pre class="moz-quote-pre" wrap="">struct
</pre>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">testpmd_offload_info *info, ol_flags |=
</pre>
</blockquote>
</blockquote>
<pre class="moz-quote-pre" wrap="">RTE_MBUF_F_TX_TCP_CKSUM; }
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">else { if (info->is_tunnel) -l4_off = info->l2_len +
info->outer_l3_len +
+l4_off = info->outer_l2_len + info-
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">outer_l3_len +
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap=""> info->l2_len + info->l3_len;
else
l4_off = info->l2_len + info->l3_len; @@ -
</pre>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<pre class="moz-quote-pre" wrap="">This change might not be required. As for normal packet (non-tunnel case)
l4_off = info->l2_len + info->l3_len; should be valid.
Please re-check.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">I don't understand what you mean. I fix the code under the tunnel case, and I didn't modify the code for the non-tunnel case.</pre>
</blockquote>
Sorry, my bad.<br>
<blockquote type="cite" cite="mid:DM6PR11MB3673A76C845EA94CBFECAE8A960C9@DM6PR11MB3673.namprd11.prod.outlook.com">
<pre class="moz-quote-pre" wrap="">
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">
</pre>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">625,7 +625,7 @@ process_outer_cksums(void *outer_l3_hdr, struct
testpmd_offload_info *info, if (udp_hdr->dgram_cksum != 0) {
udp_hdr->dgram_cksum = 0; udp_hdr->dgram_cksum =
get_udptcp_checksum(m, outer_l3_hdr,
-info->l2_len + info->outer_l3_len,
+info->outer_l2_len + info-
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">outer_l3_len,
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap=""> info->outer_ethertype);
}
--
2.33.1
</pre>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</body>
</html>