Skip to content

Commit ecd6418

Browse files
TaeheeYoointel-lab-lkp
authored andcommitted
eth: bnxt: do not use BNXT_VNIC_NTUPLE unconditionally in queue restart logic
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. Fixes: b9d2956 ("bnxt_en: stop packet flow during bnxt_queue_stop/start") Signed-off-by: Taehee Yoo <[email protected]>
1 parent 0f9e355 commit ecd6418

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -15635,7 +15635,7 @@ static int bnxt_queue_start(struct net_device *dev, void *qmem, int idx)
1563515635
cpr = &rxr->bnapi->cp_ring;
1563615636
cpr->sw_stats->rx.rx_resets++;
1563715637

15638-
for (i = 0; i <= BNXT_VNIC_NTUPLE; i++) {
15638+
for (i = 0; i <= bp->nr_vnics; i++) {
1563915639
vnic = &bp->vnic_info[i];
1564015640

1564115641
rc = bnxt_hwrm_vnic_set_rss_p5(bp, vnic, true);
@@ -15663,7 +15663,7 @@ static int bnxt_queue_stop(struct net_device *dev, void *qmem, int idx)
1566315663
struct bnxt_vnic_info *vnic;
1566415664
int i;
1566515665

15666-
for (i = 0; i <= BNXT_VNIC_NTUPLE; i++) {
15666+
for (i = 0; i <= bp->nr_vnics; i++) {
1566715667
vnic = &bp->vnic_info[i];
1566815668
vnic->mru = 0;
1566915669
bnxt_hwrm_vnic_update(bp, vnic,

0 commit comments

Comments
 (0)