[dpdk-stable] [PATCH v1] net/ixgbe: adjust error for UDP with zero checksum

Wang, Haiyue haiyue.wang at intel.com
Tue Feb 2 13:54:48 CET 2021


> -----Original Message-----
> From: David Marchand <david.marchand at redhat.com>
> Sent: Tuesday, February 2, 2021 17:45
> To: Wang, Haiyue <haiyue.wang at intel.com>
> Cc: dev <dev at dpdk.org>; pvalerio at redhat.com; Aaron Conole <aconole at redhat.com>; Zhang, Qi Z
> <qi.z.zhang at intel.com>; Rong, Leyi <leyi.rong at intel.com>; Tu, Lijuan <lijuan.tu at intel.com>; dpdk
> stable <stable at dpdk.org>; Guo, Jia <jia.guo at intel.com>; Richardson, Bruce <bruce.richardson at intel.com>;
> Ananyev, Konstantin <konstantin.ananyev at intel.com>; Jerin Jacob Kollanukkaran <jerinj at marvell.com>;
> Ruifeng Wang (Arm Technology China) <ruifeng.wang at arm.com>
> Subject: Re: [PATCH v1] net/ixgbe: adjust error for UDP with zero checksum
> 


> 
> If the driver/hw can't report a valid checksum hint, it should
> announce it does not know if the checksum is valid (neither bad, nor
> good).
> 
> So the workaround for udp packets (on this hw model) would be to
> report PKT_RX_L4_CKSUM_UNKNOWN.
> The sw application will then have to recompute the checksum itself if needed.
> 

Looks like this workaround will make OVS performance drop a lot, since
every UDP packet needs to do checksum by SW:

            bool  hwol_good_l4_csum = dp_packet_l4_checksum_valid(pkt)
                                      || dp_packet_hwol_tx_l4_checksum(pkt);
            /* Validate the checksum only when hwol is not supported. */
            if (extract_l4(&ctx->key, l4, dp_packet_l4_size(pkt),
                           &ctx->icmp_related, l3, !hwol_good_l4_csum,
                           NULL)) {
                ctx->hash = conn_key_hash(&ctx->key, ct->hash_basis);
                return true;
            }

The lesser of the two rights, marking as good seems a little better.

> 
> --
> David Marchand



More information about the stable mailing list