> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf Of
> Ahmed Zaki
> Sent: Monday, May 27, 2024 8:58 PM
> To: [email protected]
> Cc: [email protected]; Zaki, Ahmed <[email protected]>; Marcin
> Szycik <[email protected]>; Nguyen, Anthony L
> <[email protected]>; Keller, Jacob E <[email protected]>; Guo,
> Junfeng <[email protected]>
> Subject: [Intel-wired-lan] [PATCH iwl-next v2 06/13] ice: support turning 
> on/off
> the parser's double vlan mode
> 
> From: Junfeng Guo <[email protected]>
> 
> Add API ice_parser_dvm_set() to support turning on/off the parser's double 
> vlan
> mode.
> 
> Reviewed-by: Marcin Szycik <[email protected]>
> Signed-off-by: Qi Zhang <[email protected]>
> Signed-off-by: Junfeng Guo <[email protected]>
> Co-developed-by: Ahmed Zaki <[email protected]>
> Signed-off-by: Ahmed Zaki <[email protected]>
> ---
>  drivers/net/ethernet/intel/ice/ice_parser.c | 77 ++++++++++++++++++++-
> drivers/net/ethernet/intel/ice/ice_parser.h | 18 +++++
>  2 files changed, 92 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_parser.c
> b/drivers/net/ethernet/intel/ice/ice_parser.c
> index eacf332df0a7..c490bff94355 100644
> --- a/drivers/net/ethernet/intel/ice/ice_parser.c
> +++ b/drivers/net/ethernet/intel/ice/ice_parser.c
> @@ -601,6 +601,31 @@ static struct ice_metainit_item
> *ice_metainit_table_get(struct ice_hw *hw)
>                                       ice_metainit_parse_item, false);
>  }
> 
> +/**
> + * ice_bst_tcam_search - find a TCAM item with specific type
> + * @tcam_table: the TCAM table
> + * @lbl_table: the lbl table to search
> + * @type: the type we need to match against
> + * @start: start searching from this index
> + *
> + */
> +struct ice_bst_tcam_item *
> +ice_bst_tcam_search(struct ice_bst_tcam_item *tcam_table,
> +                 struct ice_lbl_item *lbl_table,
> +                 enum ice_lbl_type type, u16 *start) {
> +     u16 i = *start;
> +
> +     for (; i < ICE_BST_TCAM_TABLE_SIZE; i++) {
> +             if (lbl_table[i].type == type) {
> +                     *start = i;
> +                     return &tcam_table[lbl_table[i].idx];
> +             }
> +     }
> +
> +     return NULL;
> +}
> +
>  /*** ICE_SID_RXPARSER_CAM, ICE_SID_RXPARSER_PG_SPILL,
>   *    ICE_SID_RXPARSER_NOMATCH_CAM and
> ICE_SID_RXPARSER_NOMATCH_CAM
>   *    sections ***/
> @@ -1147,6 +1172,7 @@ static void ice_lbl_dump(struct ice_hw *hw, struct


Tested-by: Rafal Romanowski <[email protected]>


Reply via email to