> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf Of 
> Marcin Szycik
> Sent: 02 July 2026 16:00
> To: [email protected]
> Cc: [email protected]; Penigalapati, Sandeep 
> <[email protected]>; S, Ananth <[email protected]>; 
> [email protected]; Nguyen, Anthony L <[email protected]>; 
> Marcin Szycik <[email protected]>; Cao, Chinh T 
> <[email protected]>; Loktionov, Aleksandr <[email protected]>
> Subject: [Intel-wired-lan] [PATCH iwl-next v5 03/12] ice: initialize ACL table
>
> From: Real Valiquette <[email protected]>
>
> E8xx hardware provides a Ternary Classifier block for implementing functions 
> such as ACL (Access Control List). In this series it's simply referred to as 
> "ACL".
>
> ACL filtering can be utilized to expand support of ntuple rules by allowing 
> mask values to be specified for redirect to queue or drop.
>
> Begin implementation of ACL filters by setting up structures, AdminQ 
> commands, and allocation of the ACL table in the hardware.
>
> Co-developed-by: Chinh Cao <[email protected]>
> Signed-off-by: Chinh Cao <[email protected]>
> Signed-off-by: Real Valiquette <[email protected]>
> Co-developed-by: Tony Nguyen <[email protected]>
> Signed-off-by: Tony Nguyen <[email protected]>
> Co-developed-by: Marcin Szycik <[email protected]>
> Signed-off-by: Marcin Szycik <[email protected]>
> Reviewed-by: Aleksandr Loktionov <[email protected]>
> ---
> v5:
> * Commit message: remove example ethtool filters, as the feature is not
>   fully implemented at this point in the patchset. Moved this part to
>   the commit that finalizes functional implementation
> * ice_acl_create_tbl():
>   * fill num_dependent_alloc_ids with actual value, not always
>    ICE_AQC_MAX_CONCURRENT_ACL_TBL
>   * fill remaining alloc_ids with ICE_AQC_CONCURR_ID_INVALID (was unused
>    in previous versions and remaining alloc_ids left with 0)
>   * struct ice_acl_tbl_params has a new member num_dep_tbls for tracking
>    the number of dependent tables. This new member is explicitly set to
>    0 in the only caller, for clarity.
>   * Note that the only caller (ice_init_acl()) doesn't use concurrent
>     tables, so this specific configuration is currently unused
> * ice_acl_create_tbl(): move alloc_id check against ICE_AQC_ALLOC_ID_4K
>   to the success path, as the AQ command might complete successfully
>   with alloc_id set to below this value to indicate allocation failure.
>   Also, the AQ command might fail in a way that leaves the response
>   buffer invalid. IOW - the check was meaningless
> * ice_acl_create_tbl(): add unroll of ice_aq_alloc_acl_tbl() -
>   ice_aq_dealloc_acl_tbl()
> * ice_init_features(): remove ICE_FLAG_FD_ENA flag dependency on ACL
>   init. ACL should not be blocked by fdir being disabled
> * Add ice_acl_create_hw(). For now it's just called from ice_init_acl(),
>   but will be reused in the rebuild path in the future
> v2:
> * Return -ERANGE in one branch in ice_aq_alloc_acl_tbl() to differenciate 
> error
>   codes
> * Use GENMASK() for ICE_AQ_VSI_ACL_DEF_RX_*_M
> * Use plain alloc/kfree for hw->acl_tbl
> * Call ice_deinit_acl() unconditionally because ICE_FLAG_FD_ENA can be
>   disabled during operation
> * ice_acl_init_tbl(): remove first/last variables
> * Merge ice_aq_acl_entry() into ice_aq_program_acl_entry() and
>    ice_aq_actpair_p_q() into ice_aq_program_actpair() - wrappers with one user
>   make no sense
> * Rename ICE_AQC_ALLOC_ID_LESS_THAN_4K to more sensible ICE_AQC_ALLOC_ID_4K
> * Reorder members of struct ice_acl_tbl to minimize holes
> * Remove ICE_AQ_VSI_ACL_DEF_RX_*_S - will be unused after switching to
>   FIELD_PREP() in "ice: program ACL entry"
> * Replace memset() with = {} in ice_init_acl()
> ---
> drivers/net/ethernet/intel/ice/Makefile       |   2 +
> drivers/net/ethernet/intel/ice/ice.h          |   3 +
> drivers/net/ethernet/intel/ice/ice_acl.h      | 118 +++++++
> .../net/ethernet/intel/ice/ice_adminq_cmd.h   | 208 +++++++++++-
> drivers/net/ethernet/intel/ice/ice_type.h     |   3 +
> drivers/net/ethernet/intel/ice/ice_acl.c      | 136 ++++++++
> drivers/net/ethernet/intel/ice/ice_acl_ctrl.c | 316 ++++++++++++++++++
> drivers/net/ethernet/intel/ice/ice_main.c     |  59 ++++
> 8 files changed, 843 insertions(+), 2 deletions(-)  create mode 100644 
> drivers/net/ethernet/intel/ice/ice_acl.h
> create mode 100644 drivers/net/ethernet/intel/ice/ice_acl.c
> create mode 100644 drivers/net/ethernet/intel/ice/ice_acl_ctrl.c
>

Tested-by: Rinitha S <[email protected]> (A Contingent worker at Intel)


Reply via email to