Commit 37b61cd
committed
bnxt: don't handle XDP in netpoll
Similarly to other recently fixed drivers make sure we don't
try to access XDP or page pool APIs when NAPI budget is 0.
NAPI budget of 0 may mean that we are in netpoll.
This may result in running software IRQs in hard IRQ context,
leading to deadlocks or crashes.
To make sure bnapi->tx_pkts don't get wiped without handling
the events, move clearing the field into the handler itself.
Remember to clear tx_pkts after reset (bnxt_enable_napi())
as it's technically possible that netpoll will accumulate
some tx_pkts and then a reset will happen, leaving tx_pkts
out of sync with reality.
Fixes: 322b87c ("bnxt_en: add page_pool support")
Reviewed-by: Andy Gospodarek <gospo@broadcom.com>
Reviewed-by: Michael Chan <michael.chan@broadcom.com>
Link: https://lore.kernel.org/r/20230728205020.2784844-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 4b31fd4 commit 37b61cd
File tree
4 files changed
+24
-14
lines changed- drivers/net/ethernet/broadcom/bnxt
4 files changed
+24
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
633 | 633 | | |
634 | 634 | | |
635 | 635 | | |
636 | | - | |
| 636 | + | |
637 | 637 | | |
638 | 638 | | |
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
| 642 | + | |
642 | 643 | | |
643 | 644 | | |
644 | 645 | | |
| |||
688 | 689 | | |
689 | 690 | | |
690 | 691 | | |
| 692 | + | |
691 | 693 | | |
692 | 694 | | |
693 | 695 | | |
| |||
2569 | 2571 | | |
2570 | 2572 | | |
2571 | 2573 | | |
2572 | | - | |
| 2574 | + | |
| 2575 | + | |
2573 | 2576 | | |
2574 | | - | |
2575 | | - | |
2576 | | - | |
2577 | | - | |
| 2577 | + | |
| 2578 | + | |
2578 | 2579 | | |
2579 | 2580 | | |
2580 | 2581 | | |
| |||
2603 | 2604 | | |
2604 | 2605 | | |
2605 | 2606 | | |
2606 | | - | |
| 2607 | + | |
2607 | 2608 | | |
2608 | 2609 | | |
2609 | 2610 | | |
| |||
2734 | 2735 | | |
2735 | 2736 | | |
2736 | 2737 | | |
2737 | | - | |
| 2738 | + | |
2738 | 2739 | | |
2739 | 2740 | | |
2740 | 2741 | | |
| |||
2750 | 2751 | | |
2751 | 2752 | | |
2752 | 2753 | | |
2753 | | - | |
| 2754 | + | |
2754 | 2755 | | |
2755 | 2756 | | |
2756 | 2757 | | |
| |||
2780 | 2781 | | |
2781 | 2782 | | |
2782 | 2783 | | |
2783 | | - | |
| 2784 | + | |
| 2785 | + | |
2784 | 2786 | | |
2785 | 2787 | | |
2786 | 2788 | | |
| |||
2810 | 2812 | | |
2811 | 2813 | | |
2812 | 2814 | | |
2813 | | - | |
| 2815 | + | |
2814 | 2816 | | |
2815 | 2817 | | |
2816 | 2818 | | |
| |||
9429 | 9431 | | |
9430 | 9432 | | |
9431 | 9433 | | |
| 9434 | + | |
| 9435 | + | |
9432 | 9436 | | |
9433 | 9437 | | |
9434 | 9438 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1005 | 1005 | | |
1006 | 1006 | | |
1007 | 1007 | | |
1008 | | - | |
| 1008 | + | |
1009 | 1009 | | |
1010 | 1010 | | |
1011 | 1011 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
138 | 142 | | |
139 | 143 | | |
140 | 144 | | |
| |||
161 | 165 | | |
162 | 166 | | |
163 | 167 | | |
| 168 | + | |
| 169 | + | |
164 | 170 | | |
165 | 171 | | |
166 | 172 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
0 commit comments