Commit b99dd77
i40e: improve VF MAC filters accounting
When adding new VM MAC, driver checks only *active* filters in
vsi->mac_filter_hash. Each MAC, even in non-active state is using resources.
To determine number of MACs VM uses, count VSI filters in *any* state.
Add i40e_count_all_filters() to simply count all filters, and rename
i40e_count_filters() to i40e_count_active_filters() to avoid ambiguity.
Fixes: cfb1d57 ("i40e: Add ensurance of MacVlan resources for every trusted VF")
Cc: stable@vger.kernel.org
Signed-off-by: Lukasz Czapnik <lukasz.czapnik@intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>1 parent eac0442 commit b99dd77
3 files changed
Lines changed: 50 additions & 44 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1278 | 1278 | | |
1279 | 1279 | | |
1280 | 1280 | | |
1281 | | - | |
| 1281 | + | |
| 1282 | + | |
1282 | 1283 | | |
1283 | 1284 | | |
1284 | 1285 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1243 | 1243 | | |
1244 | 1244 | | |
1245 | 1245 | | |
1246 | | - | |
| 1246 | + | |
1247 | 1247 | | |
1248 | 1248 | | |
1249 | | - | |
1250 | | - | |
1251 | | - | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
1252 | 1270 | | |
1253 | 1271 | | |
1254 | 1272 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2862 | 2862 | | |
2863 | 2863 | | |
2864 | 2864 | | |
2865 | | - | |
2866 | | - | |
2867 | | - | |
2868 | | - | |
2869 | | - | |
2870 | | - | |
2871 | | - | |
2872 | | - | |
2873 | | - | |
2874 | | - | |
2875 | | - | |
2876 | | - | |
2877 | | - | |
2878 | | - | |
2879 | | - | |
2880 | | - | |
2881 | | - | |
2882 | | - | |
2883 | 2865 | | |
2884 | 2866 | | |
2885 | 2867 | | |
| |||
2918 | 2900 | | |
2919 | 2901 | | |
2920 | 2902 | | |
2921 | | - | |
2922 | | - | |
| 2903 | + | |
| 2904 | + | |
| 2905 | + | |
| 2906 | + | |
2923 | 2907 | | |
2924 | 2908 | | |
2925 | 2909 | | |
| |||
2939 | 2923 | | |
2940 | 2924 | | |
2941 | 2925 | | |
2942 | | - | |
2943 | | - | |
2944 | | - | |
| 2926 | + | |
| 2927 | + | |
2945 | 2928 | | |
2946 | 2929 | | |
2947 | 2930 | | |
| |||
2950 | 2933 | | |
2951 | 2934 | | |
2952 | 2935 | | |
2953 | | - | |
| 2936 | + | |
2954 | 2937 | | |
2955 | 2938 | | |
2956 | 2939 | | |
2957 | | - | |
2958 | | - | |
2959 | | - | |
2960 | | - | |
2961 | | - | |
2962 | | - | |
2963 | | - | |
2964 | | - | |
2965 | | - | |
2966 | | - | |
2967 | | - | |
| 2940 | + | |
| 2941 | + | |
| 2942 | + | |
2968 | 2943 | | |
2969 | 2944 | | |
2970 | 2945 | | |
2971 | 2946 | | |
2972 | | - | |
2973 | | - | |
2974 | | - | |
2975 | | - | |
| 2947 | + | |
| 2948 | + | |
| 2949 | + | |
| 2950 | + | |
| 2951 | + | |
| 2952 | + | |
| 2953 | + | |
| 2954 | + | |
| 2955 | + | |
| 2956 | + | |
| 2957 | + | |
| 2958 | + | |
| 2959 | + | |
| 2960 | + | |
| 2961 | + | |
| 2962 | + | |
2976 | 2963 | | |
2977 | 2964 | | |
2978 | 2965 | | |
| |||
0 commit comments