[dpdk-dev] [PATCH 1/2] app/testpmd: fix csumonly mode when run without outer chksum

Nithin Dabilpuram nithind1988 at gmail.com
Tue Aug 17 12:58:36 CEST 2021


On Tue, Aug 17, 2021 at 01:43:27AM +0000, Li, Xiaoyun wrote:
> 
> 
> > -----Original Message-----
> > From: Nithin Dabilpuram <nithind1988 at gmail.com>
> > Sent: Monday, August 16, 2021 18:56
> > To: Li, Xiaoyun <xiaoyun.li at intel.com>
> > Cc: jerinj at marvell.com; dev at dpdk.org; jia.guo at intel.com; stable at dpdk.org
> > Subject: Re: [dpdk-dev] [PATCH 1/2] app/testpmd: fix csumonly mode when run
> > without outer chksum
> > 
> > On Mon, Aug 16, 2021 at 08:48:20AM +0000, Li, Xiaoyun wrote:
> > > Hi
> > >
> > > > -----Original Message-----
> > > > From: Nithin Dabilpuram <ndabilpuram at marvell.com>
> > > > Sent: Monday, August 16, 2021 15:10
> > > > To: Li, Xiaoyun <xiaoyun.li at intel.com>
> > > > Cc: jerinj at marvell.com; dev at dpdk.org; Nithin Dabilpuram
> > > > <ndabilpuram at marvell.com>; jia.guo at intel.com; stable at dpdk.org
> > > > Subject: [PATCH 1/2] app/testpmd: fix csumonly mode when run without
> > > > outer chksum
> > > >
> > > > Donot use outer metadata when neither outer ip checksum nor outer
> > > > udp checksum is enabled. PMD's will ignore the outer_l2_len and
> > > > outer_l3_len in cases where none of the outer checksum is enabled
> > > > and hence only l2_len and l3_len will be used to calculate the offsets for L2
> > or L3 header.
> > >
> > > I don't understand.
> > > In process_outer_chksum, only PKT_TX_OUTER_IPV6 Will be set if it's ipv6
> > packets.
> > > So PKT_TX_OUTER_IPV6 means this packet is tunnel ipv6 packet. So it actually
> > needs outer l2 len and outer l3 len put them to hw.
> > > At least i40e needs outer l2 len and outer l3 len as far as I know.
> > 
> > Ok, do you mean m->outer_l2_len and m->outer_l3_len will be referred in i40e
> > driver even when both DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM and
> > DEV_TX_OFFLOAD_OUTER_UDP_CKSUM are not enabled in ethdev Tx offloads ?
> > 
> > I thought as per spec, those fields will only be used when the Outer offloads are
> > enabled.
> 
> Checked again. You're right. Tx offloads are enough.

Ack, thanks.
> 
> > 
> > >
> > > >
> > > > Fixes: 3c32113a1aac ("app/testpmd: fix IPv6 tunnel checksum")
> > > > Cc: jia.guo at intel.com
> > > > Cc: stable at dpdk.org
> > > >
> > > > Signed-off-by: Nithin Dabilpuram <ndabilpuram at marvell.com>
> > > > ---
> > > >  app/test-pmd/csumonly.c | 3 +--
> > > >  1 file changed, 1 insertion(+), 2 deletions(-)
> > > >
> > > > diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index
> > > > 607c889..38cc256 100644
> > > > --- a/app/test-pmd/csumonly.c
> > > > +++ b/app/test-pmd/csumonly.c
> > > > @@ -961,8 +961,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
> > > >  			    (tx_offloads &
> > > >  			     DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) ||
> > > >  			    (tx_offloads &
> > > > -			     DEV_TX_OFFLOAD_OUTER_UDP_CKSUM) ||
> > > > -			    (tx_ol_flags & PKT_TX_OUTER_IPV6)) {
> > > > +			     DEV_TX_OFFLOAD_OUTER_UDP_CKSUM)) {
> > > >  				m->outer_l2_len = info.outer_l2_len;
> > > >  				m->outer_l3_len = info.outer_l3_len;
> > > >  				m->l2_len = info.l2_len;
> > > > --
> > > > 2.8.4
> > >


More information about the dev mailing list