Skip to content

Commit

Permalink
bnxt_en: Log a message, if enabling NTUPLE filtering fails.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vasundhara Volam authored and David S. Miller committed Jul 26, 2016
1 parent a54c4d7 commit a230490
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/net/ethernet/broadcom/bnxt/bnxt.c
Original file line number Diff line number Diff line change
Expand Up @@ -5790,8 +5790,12 @@ static bool bnxt_rfs_capable(struct bnxt *bp)
return false;

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

return true;
#else
Expand All @@ -5804,7 +5808,7 @@ static netdev_features_t bnxt_fix_features(struct net_device *dev,
{
struct bnxt *bp = netdev_priv(dev);

if (!bnxt_rfs_capable(bp))
if ((features & NETIF_F_NTUPLE) && !bnxt_rfs_capable(bp))
features &= ~NETIF_F_NTUPLE;

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

0 comments on commit a230490

Please sign in to comment.