FAILED: patch "[PATCH] i40e: improve VF MAC filters accounting" failed to apply to 5.15-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x b99dd77076bd3fddac6f7f1cbfa081c38fde17f5
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2025092901-doorpost-cure-351c@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From b99dd77076bd3fddac6f7f1cbfa081c38fde17f5 Mon Sep 17 00:00:00 2001
From: Lukasz Czapnik <[email protected]>
Date: Wed, 13 Aug 2025 12:45:18 +0200
Subject: [PATCH] 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.
drivers/net/ethernet/intel/i40e/i40e.h +2 -1
@@ -1278,7 +1278,8 @@ struct i40e_mac_filter *i40e_add_mac_filter(struct i40e_vsi *vsi, const u8 *macaddr);int i40e_del_mac_filter (struct i40e_vsi *vsi,const u8 *macaddr);bool i40e_is_vsi_in_vlan (struct i40e_vsi *vsi); -int i40e_count_filters (struct i40e_vsi *vsi); +int i40e_count_all_filters (struct i40e_vsi *vsi); +int i40e_count_active_filters (struct i40e_vsi *vsi);struct i40e_mac_filter *i40e_find_mac (struct i40e_vsi *vsi,const u8 *macaddr);void i40e_vlan_stripping_enable (struct i40e_vsi *vsi);static inline bool i40e_is_sw_dcb (struct i40e_pf *pf)
drivers/net/ethernet/intel/i40e/i40e_main.c +22 -4
@@ -1243,12 +1243,30 @@ void i40e_update_stats(struct i40e_vsi *vsi) }/** -* i40e_count_filters - counts VSI mac filters +* i40e_count_all_filters - counts VSI MAC filters * @vsi: the VSI to be searched * -* Returns count of mac filters -**/ -int i40e_count_filters (struct i40e_vsi *vsi) +* Return: count of MAC filters in any state. +*/ +int i40e_count_all_filters (struct i40e_vsi *vsi) +{ +struct i40e_mac_filter *f; +struct hlist_node *h; +int bkt, cnt =0 ; + +hash_for_each_safe (vsi->mac_filter_hash, bkt, h, f, hlist) + cnt++; + +return cnt; +} + +/** +* i40e_count_active_filters - counts VSI MAC filters +* @vsi: the VSI to be searched +* +* Return: count of active MAC filters. +*/ +int i40e_count_active_filters (struct i40e_vsi *vsi) {struct i40e_mac_filter *f;struct hlist_node *h;
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +26 -39
96 lines not on this page · raw message