]> git.droids-corp.org - dpdk.git/commit
net/bnxt: fix tunnel stateless offloads
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Wed, 27 Apr 2022 14:58:09 +0000 (20:28 +0530)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Tue, 10 May 2022 05:10:56 +0000 (07:10 +0200)
commitc0278f6e52399f7612f9f1a9d52434071ac49921
treeed98c8a2f603d02719a9f837f10231603a6e7099
parent0a90c56eacd5e345b42c7f152d33ca4c39343a52
net/bnxt: fix tunnel stateless offloads

The HW only supports tunnel header parsing globally for supported tunnel
types. When a function uses one default VNIC to receive both the tunnel
and non-tunnel packets, applying the same stateless offload operation to
both tunnel and non-tunnel packets can cause problems in certain scenarios.
To workaround these problems, the firmware advertises no tunnel header
parsing capabilities to the driver using the HWRM_FUNC_QCAPS.
The driver must check this flag setting and accordingly not advertise
tunnel packet stateless offload capabilities to the stack.

If the device supports VXLAN, GRE, IPIP and GENEVE tunnel parsing,
then reports RX_OFFLOAD_OUTER_IPV4_CKSUM, RX_OFFLOAD_OUTER_UDP_CKSUM
and TX_OFFLOAD_OUTER_IPV4_CKSUM in the Rx/Tx offload capabilities of
the device.
Also, advertise tunnel TSO capabilities based on FW support.

Fixes: 0a6d2a720078 ("net/bnxt: get device infos")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
drivers/net/bnxt/bnxt.h
drivers/net/bnxt/bnxt_hwrm.c
drivers/net/bnxt/bnxt_hwrm.h
drivers/net/bnxt/bnxt_rxq.c
drivers/net/bnxt/bnxt_txq.c