Skip to content

Commit a660471

Browse files
TaeheeYoogregkh
authored andcommitted
eth: bnxt: do not use BNXT_VNIC_NTUPLE unconditionally in queue restart logic
[ Upstream commit 6619585 ] When a queue is restarted, it sets MRU to 0 for stopping packet flow. MRU variable is a member of vnic_info[], the first vnic_info is default and the second is ntuple. Only when ntuple is enabled(ethtool -K eth0 ntuple on), vnic_info for ntuple is allocated in init logic. The bp->nr_vnics indicates how many vnic_info are allocated. However bnxt_queue_{start | stop}() accesses vnic_info[BNXT_VNIC_NTUPLE] regardless of ntuple state. Reviewed-by: Somnath Kotur <[email protected]> Fixes: b9d2956 ("bnxt_en: stop packet flow during bnxt_queue_stop/start") Signed-off-by: Taehee Yoo <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 14eb5f0 commit a660471

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15287,7 +15287,7 @@ static int bnxt_queue_start(struct net_device *dev, void *qmem, int idx)
1528715287
cpr = &rxr->bnapi->cp_ring;
1528815288
cpr->sw_stats->rx.rx_resets++;
1528915289

15290-
for (i = 0; i <= BNXT_VNIC_NTUPLE; i++) {
15290+
for (i = 0; i <= bp->nr_vnics; i++) {
1529115291
vnic = &bp->vnic_info[i];
1529215292

1529315293
rc = bnxt_hwrm_vnic_set_rss_p5(bp, vnic, true);
@@ -15315,7 +15315,7 @@ static int bnxt_queue_stop(struct net_device *dev, void *qmem, int idx)
1531515315
struct bnxt_vnic_info *vnic;
1531615316
int i;
1531715317

15318-
for (i = 0; i <= BNXT_VNIC_NTUPLE; i++) {
15318+
for (i = 0; i <= bp->nr_vnics; i++) {
1531915319
vnic = &bp->vnic_info[i];
1532015320
vnic->mru = 0;
1532115321
bnxt_hwrm_vnic_update(bp, vnic,

0 commit comments

Comments
 (0)