[ Upstream commit b0757491a118ae5727cf9f1c3a11544397d46596 ]
The driver does not check if hw-tc-offload is enabled for the device
before offloading a flow in the context of indirect block callback.
Fix this by checking NETIF_F_HW_TC in the features flag and rejecting
the offload request. This will avoid unnecessary dmesg error logs when
hw-tc-offload is disabled, such as these:
bnxt_en 0000:19:00.1 eno2np1: dev(ifindex=294) not on same switch
bnxt_en 0000:19:00.1 eno2np1: Error: bnxt_tc_add_flow: cookie=0xffff8dace1c88000 error=-22
bnxt_en 0000:19:00.0 eno1np0: dev(ifindex=294) not on same switch
bnxt_en 0000:19:00.0 eno1np0: Error: bnxt_tc_add_flow: cookie=0xffff8dace1c88000 error=-22
Reported-by: Marcelo Ricardo Leitner <mleitner@redhat.com>
Fixes:
|
||
|---|---|---|
| .. | ||
| Makefile | ||
| bnxt.c | ||
| bnxt.h | ||
| bnxt_coredump.h | ||
| bnxt_dcb.c | ||
| bnxt_dcb.h | ||
| bnxt_debugfs.c | ||
| bnxt_debugfs.h | ||
| bnxt_devlink.c | ||
| bnxt_devlink.h | ||
| bnxt_dim.c | ||
| bnxt_ethtool.c | ||
| bnxt_ethtool.h | ||
| bnxt_fw_hdr.h | ||
| bnxt_hsi.h | ||
| bnxt_nvm_defs.h | ||
| bnxt_sriov.c | ||
| bnxt_sriov.h | ||
| bnxt_tc.c | ||
| bnxt_tc.h | ||
| bnxt_ulp.c | ||
| bnxt_ulp.h | ||
| bnxt_vfr.c | ||
| bnxt_vfr.h | ||
| bnxt_xdp.c | ||
| bnxt_xdp.h | ||