diff options
author | Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> | 2018-08-09 06:29:49 -0700 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2018-08-28 10:29:38 -0700 |
commit | 80d144c9ac82fd07436c02c830b2af03c471db8a (patch) | |
tree | 2618a8395c0f7a6148c06de9ccc0e49b2fd6e8e5 /drivers/net/ethernet/intel/ice/ice_type.h | |
parent | ice: Code optimization for ice_fill_sw_rule() (diff) | |
download | linux-dev-80d144c9ac82fd07436c02c830b2af03c471db8a.tar.xz linux-dev-80d144c9ac82fd07436c02c830b2af03c471db8a.zip |
ice: Refactor switch rule management structures and functions
This patch is an adaptation of the work originally done by Grishma
Kotecha <grishma.kotecha@intel.com> that in summary refactors the
switch filtering logic in the driver. More specifically,
- Update the recipe structure to also store list of rules
- Update the existing code for recipes like MAC, VLAN, ethtype etc to
use list head that is attached to switch recipe structure
- Add a common function to search for a rule entry and add a new rule
entry. Update the code to use this new function.
- Refactor the rem_handle_vsi_list function to simplify the logic
CC: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/ethernet/intel/ice/ice_type.h | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_type.h b/drivers/net/ethernet/intel/ice/ice_type.h index adfe131bd3f3..473d82fdb570 100644 --- a/drivers/net/ethernet/intel/ice/ice_type.h +++ b/drivers/net/ethernet/intel/ice/ice_type.h @@ -253,19 +253,8 @@ struct ice_port_info { }; struct ice_switch_info { - /* Switch VSI lists to MAC/VLAN translation */ - struct mutex mac_list_lock; /* protect MAC list */ - struct list_head mac_list_head; - struct mutex vlan_list_lock; /* protect VLAN list */ - struct list_head vlan_list_head; - struct mutex eth_m_list_lock; /* protect ethtype list */ - struct list_head eth_m_list_head; - struct mutex promisc_list_lock; /* protect promisc mode list */ - struct list_head promisc_list_head; - struct mutex mac_vlan_list_lock; /* protect MAC-VLAN list */ - struct list_head mac_vlan_list_head; - struct list_head vsi_list_map_head; + struct ice_sw_recipe *recp_list; }; /* Port hardware description */ |