Commit 744d197
ice: add flag to distinguish reset from .ndo_bpf in XDP rings config
Commit 6624e78 ("ice: split ice_vsi_setup into smaller functions")
has placed ice_vsi_free_q_vectors() after ice_destroy_xdp_rings() in
the rebuild process. The behaviour of the XDP rings config functions is
context-dependent, so the change of order has led to
ice_destroy_xdp_rings() doing additional work and removing XDP prog, when
it was supposed to be preserved.
Also, dependency on the PF state reset flags creates an additional,
fortunately less common problem:
* PFR is requested e.g. by tx_timeout handler
* .ndo_bpf() is asked to delete the program, calls ice_destroy_xdp_rings(),
but reset flag is set, so rings are destroyed without deleting the
program
* ice_vsi_rebuild tries to delete non-existent XDP rings, because the
program is still on the VSI
* system crashes
With a similar race, when requested to attach a program,
ice_prepare_xdp_rings() can actually skip setting the program in the VSI
and nevertheless report success.
Instead of reverting to the old order of function calls, add an enum
argument to both ice_prepare_xdp_rings() and ice_destroy_xdp_rings() in
order to distinguish between calls from rebuild and .ndo_bpf().
Fixes: efc2214 ("ice: Add support for XDP")
Reviewed-by: Igor Bagnucki <igor.bagnucki@intel.com>
Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Chandan Kumar Rout <chandanx.rout@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://lore.kernel.org/r/20240603-net-2024-05-30-intel-net-fixes-v2-4-e3563aa89b0c@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent adbf5a4 commit 744d197
3 files changed
+24
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
930 | 930 | | |
931 | 931 | | |
932 | 932 | | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
933 | 939 | | |
934 | | - | |
935 | | - | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
936 | 943 | | |
937 | 944 | | |
938 | 945 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2285 | 2285 | | |
2286 | 2286 | | |
2287 | 2287 | | |
2288 | | - | |
| 2288 | + | |
| 2289 | + | |
2289 | 2290 | | |
2290 | 2291 | | |
2291 | 2292 | | |
| |||
2429 | 2430 | | |
2430 | 2431 | | |
2431 | 2432 | | |
2432 | | - | |
| 2433 | + | |
2433 | 2434 | | |
2434 | 2435 | | |
2435 | 2436 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2711 | 2711 | | |
2712 | 2712 | | |
2713 | 2713 | | |
| 2714 | + | |
2714 | 2715 | | |
2715 | 2716 | | |
2716 | 2717 | | |
2717 | | - | |
| 2718 | + | |
| 2719 | + | |
2718 | 2720 | | |
2719 | 2721 | | |
2720 | 2722 | | |
| |||
2790 | 2792 | | |
2791 | 2793 | | |
2792 | 2794 | | |
2793 | | - | |
| 2795 | + | |
2794 | 2796 | | |
2795 | 2797 | | |
2796 | 2798 | | |
| |||
2842 | 2844 | | |
2843 | 2845 | | |
2844 | 2846 | | |
| 2847 | + | |
2845 | 2848 | | |
2846 | 2849 | | |
2847 | 2850 | | |
2848 | 2851 | | |
2849 | | - | |
| 2852 | + | |
2850 | 2853 | | |
2851 | 2854 | | |
2852 | 2855 | | |
2853 | 2856 | | |
2854 | 2857 | | |
2855 | 2858 | | |
2856 | | - | |
2857 | | - | |
2858 | | - | |
| 2859 | + | |
2859 | 2860 | | |
2860 | | - | |
| 2861 | + | |
2861 | 2862 | | |
2862 | 2863 | | |
2863 | 2864 | | |
| |||
2898 | 2899 | | |
2899 | 2900 | | |
2900 | 2901 | | |
2901 | | - | |
| 2902 | + | |
2902 | 2903 | | |
2903 | 2904 | | |
2904 | 2905 | | |
| |||
3009 | 3010 | | |
3010 | 3011 | | |
3011 | 3012 | | |
3012 | | - | |
| 3013 | + | |
| 3014 | + | |
3013 | 3015 | | |
3014 | 3016 | | |
3015 | 3017 | | |
| |||
3020 | 3022 | | |
3021 | 3023 | | |
3022 | 3024 | | |
3023 | | - | |
| 3025 | + | |
3024 | 3026 | | |
3025 | 3027 | | |
3026 | 3028 | | |
| |||
0 commit comments