]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
bnxt_en: Fix .ndo_setup_tc() to include XDP rings.
authorMichael Chan <michael.chan@broadcom.com>
Wed, 23 Aug 2017 23:34:03 +0000 (19:34 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 24 Aug 2017 05:42:42 +0000 (22:42 -0700)
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>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index e7c8539cbddf6704720a4a11f5e09aebec066066..f2f2bbfa8a7fd2dbbb2ad50ebf8d4d201b204259 100644 (file)
@@ -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;