OSDN Git Service

net: bnxt: don't complain if TC flower can't be supported
authorJakub Kicinski <kuba@kernel.org>
Fri, 17 Jul 2020 20:59:58 +0000 (13:59 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 18 Jul 2020 01:26:20 +0000 (18:26 -0700)
commit18c7015cc65ab62a161291b863225db5cfc717a4
treea70192dce8cc746b33fca7d698986a8d0d3c5014
parentd44a919a5c1974e1d22b8affad2e92c912671dbd
net: bnxt: don't complain if TC flower can't be supported

The fact that NETIF_F_HW_TC is not set should be a sufficient
indication to the user that TC offloads are not supported.
No need to bother users of older firmware versions with
pointless warnings on every boot.

Also, since the support is optional, bnxt_init_tc() should not
return an error in case FW is old, similarly to how error
is not returned when CONFIG_BNXT_FLOWER_OFFLOAD is not set.

With that we can add an error message to the caller, to warn
about actual unexpected failures.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c