> -----Original Message-----
> From: Singh, Aman Deep <aman.deep.si...@intel.com>
> Sent: 2022年3月11日 16:02
> To: Liu, KevinX <kevinx....@intel.com>; Zhang, Qi Z <qi.z.zh...@intel.com>;
> dev <dev@dpdk.org>; Yigit, Ferruh <ferruh.yi...@intel.com>
> Cc: Yang, Qiming <qiming.y...@intel.com>; Yang, SteveX
> <stevex.y...@intel.com>; Xing, Beilei <beilei.x...@intel.com>; Li, Xiaoyun
> <xiaoyun...@intel.com>; dpdk stable <sta...@dpdk.org>; Zhang, Yuying
> <yuying.zh...@intel.com>
> 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:
> > 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
> merge the code in RC4.
> > Thank you.
> >
> >> -----Original Message-----
> >> From: Zhang, Yuying <yuying.zh...@intel.com>
> >> Sent: 2022年3月3日 14:30
> >> To: Zhang, Qi Z <qi.z.zh...@intel.com>; Liu, KevinX
> >> <kevinx....@intel.com>; dev <dev@dpdk.org>
> >> Cc: Yang, Qiming <qiming.y...@intel.com>; Yang, SteveX
> >> <stevex.y...@intel.com>; Yigit, Ferruh <ferruh.yi...@intel.com>;
> >> Xing, Beilei <beilei.x...@intel.com>; Li, Xiaoyun
> >> <xiaoyun...@intel.com>; dpdk stable <sta...@dpdk.org>
> >> Subject: RE: [PATCH v2 2/2] app/testpmd: fix SW L4 checksum in multi-
> >> segments
> >>
> >> LGTM.
> >>
> >>>> -----Original Message-----
> >>>> From: Liu, KevinX <kevinx....@intel.com>
> >>>> Sent: Wednesday, December 29, 2021 5:37 PM
> >>>> To: dev@dpdk.org
> >>>> Cc: Yang, Qiming <qiming.y...@intel.com>; Zhang, Qi Z
> >>>> <qi.z.zh...@intel.com>; Yang, SteveX <stevex.y...@intel.com>;
> >>>> Yigit, Ferruh <ferruh.yi...@intel.com>; Liu, KevinX
> >>>> <kevinx....@intel.com>; sta...@dpdk.org
> >>>> 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: sta...@dpdk.org
> >>>>
> >>>> Signed-off-by: Kevin Liu <kevinx....@intel.com>
> >> Acked-by: Yuying Zhang <yuying.zh...@intel.com>
> >>
> >>>> ---
> >>>> 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
> >>>
> >>>> @@ -513,7 +513,7 @@ process_inner_cksums(void *l3_hdr, const
> struct
> >>>> testpmd_offload_info *info, ol_flags |=
> >> RTE_MBUF_F_TX_UDP_CKSUM; }
> >>>> 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;
> This seems OK. A similar miss is present for TCP case also.
> Can you please do the same for that. Line 537
> >>>> else
> >>>> @@ -536,7 +536,7 @@ process_inner_cksums(void *l3_hdr, const
> struct
> >>>> testpmd_offload_info *info, ol_flags |=
> >> RTE_MBUF_F_TX_TCP_CKSUM; }
> >>>> else { if (info->is_tunnel) -l4_off = info->l2_len +
> >>>> info->outer_l3_len +
> >>>> +l4_off = info->outer_l2_len + info-
> >>>>> outer_l3_len +
> >>>> info->l2_len + info->l3_len;
> >>>> else
> >>>> l4_off = info->l2_len + info->l3_len; @@ -
> 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.
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.
>
>
> >>>> 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-
> >>>>> outer_l3_len,
> >>>> info->outer_ethertype);
> >>>> }
> >>>>
> >>>> --
> >>>> 2.33.1