Commit 18c7015c authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller

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: default avatarJakub Kicinski <kuba@kernel.org>
Reviewed-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d44a919a
...@@ -12086,7 +12086,10 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -12086,7 +12086,10 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
goto init_err_pci_clean; goto init_err_pci_clean;
} }
} }
bnxt_init_tc(bp); rc = bnxt_init_tc(bp);
if (rc)
netdev_err(dev, "Failed to initialize TC flower offload, err = %d.\n",
rc);
} }
bnxt_dl_register(bp); bnxt_dl_register(bp);
......
...@@ -2000,11 +2000,8 @@ int bnxt_init_tc(struct bnxt *bp) ...@@ -2000,11 +2000,8 @@ int bnxt_init_tc(struct bnxt *bp)
struct bnxt_tc_info *tc_info; struct bnxt_tc_info *tc_info;
int rc; int rc;
if (bp->hwrm_spec_code < 0x10803) { if (bp->hwrm_spec_code < 0x10803)
netdev_warn(bp->dev, return 0;
"Firmware does not support TC flower offload.\n");
return -ENOTSUPP;
}
tc_info = kzalloc(sizeof(*tc_info), GFP_KERNEL); tc_info = kzalloc(sizeof(*tc_info), GFP_KERNEL);
if (!tc_info) if (!tc_info)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment