[Intel-wired-lan] [PATCH iwl-next v6] ice: Add support for switch recipe reusing feature

Przemek Kitszel przemyslaw.kitszel at intel.com
Tue Sep 26 08:11:30 UTC 2023


On 9/26/23 05:12, Steven Zou wrote:
> If E810 firmware supports the corresponding functionality, the driver
> allows PFs to subscribe the same switch recipes. Then when the PF is done
> with a switch recipes, the PF can ask firmware to free that switch recipe.
> 
> When users configure a rule to PFn into E810 switch component, if there is
> no existing recipe matching this rule's pattern, the driver will request
> firmware to allocate and return a new recipe resource for the rule by
> calling ice_add_sw_recipe() and ice_alloc_recipe(). If there is an existing
> recipe matching this rule's pattern with different key value, or this is a
> same second rule to PFm into switch component, the driver checks out this
> recipe by calling ice_find_recp(), the driver will tell firmware to share
> using this same recipe resource by calling ice_subscribable_recp_shared()
> and ice_subscribe_recipe().
> 
> When firmware detects that all subscribing PFs have freed the switch
> recipe, firmware will free the switch recipe so that it can be reused.
> 
> This feature also fixes a problem where all switch recipes would eventually
> be exhausted because switch recipes could not be freed, as freeing a shared
> recipe could potentially break other PFs that were using it.
> 
> Signed-off-by: Steven Zou <steven.zou at intel.com>
> ---
> v2:
> - fix nvm version detection for the feature (Thanks to Przemek)
> - fix more small commit message Reviewed-by Przemek
> 
> v3: refactor ice_alloc_recipe to support both legacy and new methods
> 
> v4:
> - a small change in ice_subscribe_recipe, sw_resp instead of flu_resp
> - move ice_subscribe_recipe() and ice_subscribable_recp_shared() definitions
> down to before ice_add_adv_recipe()
> - add commit message for new function of ice_subscribe_recipe()
> 
> v5:
> - refactor ice_init_chk_subscribable_recipe_support() and replace it to
> ice_init_chk_recipe_reuse_support()
> - add a newline before 'return' in ice_init_hw()
> - remove redundant cast of u8
> - make u8 and u16 to u32 in the subfunctions
> 
> v6:
> - fix AdminQ data type from/to FW and casting for bitmap type issue
> - fix hole padding with adding new member in ice_hw structure
> - fix setting the flag of recp_created issue
> - fix redundant lable
> - change bit traversal method
> ---
>   .../net/ethernet/intel/ice/ice_adminq_cmd.h   |   4 +-
>   drivers/net/ethernet/intel/ice/ice_common.c   |   2 +
>   drivers/net/ethernet/intel/ice/ice_lag.c      |   4 +-
>   drivers/net/ethernet/intel/ice/ice_switch.c   | 247 +++++++++++++++---
>   drivers/net/ethernet/intel/ice/ice_switch.h   |   5 +-
>   drivers/net/ethernet/intel/ice/ice_type.h     |   2 +
>   6 files changed, 229 insertions(+), 35 deletions(-)

Hi, we are not yet done with our pre-IWL (e1000) review.

General rule is to have Reviewed-by: tag prior to posting here.
And public submission versioning should start with v1, without the 
changelog from e1000.

Normally one should also CC netdev, which you have not.



More information about the Intel-wired-lan mailing list