[dpdk-dev] [PATCH] app/testpmd: fix failing to enable SW checksum calculation

Hu, Jiayu jiayu.hu at intel.com
Thu Jan 25 04:04:57 CET 2018


Hi Wenzhuo,

> -----Original Message-----
> From: Lu, Wenzhuo
> Sent: Thursday, January 25, 2018 10:58 AM
> To: Hu, Jiayu <jiayu.hu at intel.com>; dev at dpdk.org
> Cc: shahafs at mellanox.com; Yao, Lei A <lei.a.yao at intel.com>
> Subject: RE: [PATCH] app/testpmd: fix failing to enable SW checksum
> calculation
> 
> Hi Jiayu,
> 
> 
> > -----Original Message-----
> > From: Hu, Jiayu
> > Sent: Thursday, January 25, 2018 10:14 AM
> > To: dev at dpdk.org
> > Cc: shahafs at mellanox.com; Lu, Wenzhuo <wenzhuo.lu at intel.com>; Yao,
> Lei
> > A <lei.a.yao at intel.com>; Hu, Jiayu <jiayu.hu at intel.com>
> > Subject: [PATCH] app/testpmd: fix failing to enable SW checksum
> calculation
> >
> > In current design, we can't enable SW checksum calculation for the devices
> > which don't have checksum offloading abilities via the command "csum set
> > ip|tcp|udp|sctp|outer-ip sw <port_id>".
> Confused, you mean it's an issue or the expected behavior?
> 
> > But SW checksum calculation shouldn't depend on HW offloading abilities.
> > This patch is to fix this issue.
> >
> > Fixes: 3926dd2b6668 ("app/testpmd: enforce offload capabilities check")
> > Signed-off-by: Jiayu Hu <jiayu.hu at intel.com>
> > ---
> >  app/test-pmd/cmdline.c | 20 ++++++++++----------
> >  1 file changed, 10 insertions(+), 10 deletions(-)
> >
> > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index
> > 9f12c0f..a2db9b7 100644
> > --- a/app/test-pmd/cmdline.c
> > +++ b/app/test-pmd/cmdline.c
> > @@ -3706,40 +3706,40 @@ cmd_csum_parsed(void *parsed_result,
> >  			hw = 1;
> >
> >  		if (!strcmp(res->proto, "ip")) {
> > -			if (dev_info.tx_offload_capa &
> > -
> > 	DEV_TX_OFFLOAD_IPV4_CKSUM) {
> > +			if (hw == 0 || (dev_info.tx_offload_capa &
> You mean SW can support the capability anyway, not need to check anything,
> right?
Yes, it's the csum forwarding engine to calculate checksums. This SW ability should
supports all devices.

Thanks,
Jiayu


More information about the dev mailing list