diff options
author | Michael Chan <michael.chan@broadcom.com> | 2017-08-24 01:34:03 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-24 07:42:42 +0200 |
commit | 87e9b3778c94694c9e098c91a0cc05725f0e017f (patch) | |
tree | e9641bd0a24dd3d588ef27100beb3f71863592aa /drivers | |
parent | nfp: TX time stamp packets before HW doorbell is rung (diff) | |
download | linux-87e9b3778c94694c9e098c91a0cc05725f0e017f.tar.xz linux-87e9b3778c94694c9e098c91a0cc05725f0e017f.zip |
bnxt_en: Fix .ndo_setup_tc() to include XDP rings.
When the number of TX rings is changed in bnxt_setup_tc(), we need to
include the XDP rings in the total TX ring count.
Fixes: 38413406277f ("bnxt_en: Add support for XDP_TX action.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index e7c8539cbddf..f2f2bbfa8a7f 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -7152,6 +7152,7 @@ int bnxt_setup_mq_tc(struct net_device *dev, u8 tc) bp->tx_nr_rings = bp->tx_nr_rings_per_tc; netdev_reset_tc(dev); } + bp->tx_nr_rings += bp->tx_nr_rings_xdp; bp->cp_nr_rings = sh ? max_t(int, bp->tx_nr_rings, bp->rx_nr_rings) : bp->tx_nr_rings + bp->rx_nr_rings; bp->num_stat_ctxs = bp->cp_nr_rings; |