[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <SJ0PR11MB5865EB931EB133A5C2987ECE8FA92@SJ0PR11MB5865.namprd11.prod.outlook.com>
Date: Tue, 23 Jul 2024 07:59:26 +0000
From: "Romanowski, Rafal" <rafal.romanowski@...el.com>
To: "Zaki, Ahmed" <ahmed.zaki@...el.com>, "intel-wired-lan@...ts.osuosl.org"
<intel-wired-lan@...ts.osuosl.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>, "Zaki, Ahmed"
<ahmed.zaki@...el.com>, Marcin Szycik <marcin.szycik@...ux.intel.com>,
"Nguyen, Anthony L" <anthony.l.nguyen@...el.com>, "Keller, Jacob E"
<jacob.e.keller@...el.com>, "Guo, Junfeng" <junfeng.guo@...el.com>
Subject: RE: [Intel-wired-lan] [PATCH iwl-next v2 06/13] ice: support turning
on/off the parser's double vlan mode
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of
> Ahmed Zaki
> Sent: Monday, May 27, 2024 8:58 PM
> To: intel-wired-lan@...ts.osuosl.org
> Cc: netdev@...r.kernel.org; Zaki, Ahmed <ahmed.zaki@...el.com>; Marcin
> Szycik <marcin.szycik@...ux.intel.com>; Nguyen, Anthony L
> <anthony.l.nguyen@...el.com>; Keller, Jacob E <jacob.e.keller@...el.com>; Guo,
> Junfeng <junfeng.guo@...el.com>
> Subject: [Intel-wired-lan] [PATCH iwl-next v2 06/13] ice: support turning on/off
> the parser's double vlan mode
>
> From: Junfeng Guo <junfeng.guo@...el.com>
>
> Add API ice_parser_dvm_set() to support turning on/off the parser's double vlan
> mode.
>
> Reviewed-by: Marcin Szycik <marcin.szycik@...ux.intel.com>
> Signed-off-by: Qi Zhang <qi.z.zhang@...el.com>
> Signed-off-by: Junfeng Guo <junfeng.guo@...el.com>
> Co-developed-by: Ahmed Zaki <ahmed.zaki@...el.com>
> Signed-off-by: Ahmed Zaki <ahmed.zaki@...el.com>
> ---
> 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 <rafal.romanowski@...el.com>
Powered by blists - more mailing lists