]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bnxt_en: Centralize logic to reserve rings.
authorMichael Chan <michael.chan@broadcom.com>
Mon, 6 Feb 2017 21:55:38 +0000 (16:55 -0500)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 6 Mar 2017 21:35:33 +0000 (13:35 -0800)
commita6666a451ca1e32586345d5b469f81661ac77f7f
tree4c70c53c117f132172fe208a4c0f888dd142d2a4
parent2dae5e8f04c77748b1f571fa94cfda1fd18675c9
bnxt_en: Centralize logic to reserve rings.

Orabug: 25645429

Currently, bnxt_setup_tc() and bnxt_set_channels() have similar and
duplicated code to check and reserve rx and tx rings.  Add a new
function bnxt_reserve_rings() to centralize the logic.  This will
make it easier to add XDP_TX support which requires allocating a
new set of TX rings.

Also, the tx ring checking logic in bnxt_setup_msix() can be removed.
The rings have been reserved before hand.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit d1e7925e6d80ce5f9ef6deb8f3cec7526f5c443c)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c