Skip to content

Commit a230490

Browse files
Vasundhara Volamdavem330
authored andcommitted
bnxt_en: Log a message, if enabling NTUPLE filtering fails.
If there are not enough resources to enable ntuple filtering, log a warning message. v2: Use single message and add missing newline. Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent a54c4d7 commit a230490

File tree

1 file changed

+6
-2
lines changed
  • drivers/net/ethernet/broadcom/bnxt

1 file changed

+6
-2
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5790,8 +5790,12 @@ static bool bnxt_rfs_capable(struct bnxt *bp)
57905790
return false;
57915791

57925792
vnics = 1 + bp->rx_nr_rings;
5793-
if (vnics > pf->max_rsscos_ctxs || vnics > pf->max_vnics)
5793+
if (vnics > pf->max_rsscos_ctxs || vnics > pf->max_vnics) {
5794+
netdev_warn(bp->dev,
5795+
"Not enough resources to support NTUPLE filters, enough resources for up to %d rx rings\n",
5796+
min(pf->max_rsscos_ctxs - 1, pf->max_vnics - 1));
57945797
return false;
5798+
}
57955799

57965800
return true;
57975801
#else
@@ -5804,7 +5808,7 @@ static netdev_features_t bnxt_fix_features(struct net_device *dev,
58045808
{
58055809
struct bnxt *bp = netdev_priv(dev);
58065810

5807-
if (!bnxt_rfs_capable(bp))
5811+
if ((features & NETIF_F_NTUPLE) && !bnxt_rfs_capable(bp))
58085812
features &= ~NETIF_F_NTUPLE;
58095813

58105814
/* Both CTAG and STAG VLAN accelaration on the RX side have to be

0 commit comments

Comments
 (0)