From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EC713A0508; Wed, 13 Apr 2022 09:22:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D7EE7410E1; Wed, 13 Apr 2022 09:22:45 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id BFDB44068B; Wed, 13 Apr 2022 09:22:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649834564; x=1681370564; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=uaD7XfG3YVTbnUCphkEK3xn+ix3EL4utgI7lahLizkI=; b=cAxSDNcmPWWCIqofNr49KJ/HhFqA01cwm6SsC3YhwpPHQLrsYxMwlEMW J2HkmS5oO7/3BkQFHFux9veWI/BpWk+8NQAhkW/R7agKhkcVUE0nT8Zvu LhnO99wSdQeA6MA+Uefix8ihXUo5Ab/HJ00Giy82YAMiuWgVDaJiv39Jn diu8qsggYQuU7My1IXqKoQiFFZBky9NoKU5Ehu7j08yOaDHXkAdcGW/6f 0Ls0HEwAoStVJ+ctB17wwWnwWKJL2IRVyZNsakXlb7OsH6OV/FAI8BQ8j AsZWa1L2Sjrc+Zu5Tw7M9tEWDT8YfMg+9DS/Kb2hAelPIUUw97Ikkh1HC A==; X-IronPort-AV: E=McAfee;i="6400,9594,10315"; a="323040406" X-IronPort-AV: E=Sophos;i="5.90,256,1643702400"; d="scan'208";a="323040406" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2022 00:22:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,256,1643702400"; d="scan'208";a="526371134" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga002.jf.intel.com with ESMTP; 13 Apr 2022 00:22:40 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 13 Apr 2022 00:22:40 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 13 Apr 2022 00:22:39 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Wed, 13 Apr 2022 00:22:39 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.177) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Wed, 13 Apr 2022 00:22:39 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SwPshghbpBSu+YnzfKEZYYuGPV1sSIufJW7pxmVr0/nTQf+ZVtKIfL91wZqIy2iEuTc9i+9x2Qgsr0CVnlcpU+x8t0LpQgphk8Z9m8bGmpgT70Y0D9hXpZT0sv/+lZ0y5/k0Uv5TmSeEz/9Ez1EKQWk8ETQOJkF1JWjJ/TLhMpTS/bj4kM+Rfe8iLTWC8Vow8ljT9DnlginXHOOHRgiCTYxrz2O0tunDMwP7KAFfvdSxhPvv9dl88PGhISSXTg6jk8iHeRM5NbGzmMwh6bbKmEpqX/jUPwjHxeHCbT4NrnHHwewt9aJJfdlfXspDm+CMPD6WN5nxSXTWhCbyLrXZkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4sqjBJSRQH4HlQDV2gmNj8+fSFmMbcx3FdiDmAmo6e8=; b=UBmL6XBB9k91wQCW5FuJwkBP29aD59f2vnjST7Rg9xlqm+9bd4G6aEhFWjXhaS5XuWGpvkF8zBejlmVTaqwsHSPQVYH+rskzhPr5s0ui2prNa81Jbr7AXRSY03n0ovVY2dL9um67KngE5/D3PhXFjZ4R3h2OOZrkpDT0g7PH7nWmCS3YW7LkBhguaNfsXf5ZjsLlEXwAsK4VbFeFbizJWN5SUQrt2t2IL0et2tE7smQ03IGmqaf7RZLEaUzI/8GJSnmfDUQldipcTy/7udlhmc3dD6IS4r/RF+E97kHPdUlS5Jm62I8FZvR69pfVtcCkdjhWoGBIPkqvV2iXlXPmCg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from BL0PR11MB3250.namprd11.prod.outlook.com (2603:10b6:208:63::13) by SJ0PR11MB4926.namprd11.prod.outlook.com (2603:10b6:a03:2d7::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5164.18; Wed, 13 Apr 2022 07:22:38 +0000 Received: from BL0PR11MB3250.namprd11.prod.outlook.com ([fe80::8988:8334:f481:338c]) by BL0PR11MB3250.namprd11.prod.outlook.com ([fe80::8988:8334:f481:338c%4]) with mapi id 15.20.5144.030; Wed, 13 Apr 2022 07:22:38 +0000 From: "Xu, Ting" To: "Zhang, Qi Z" , "Guo, Junfeng" CC: "dev@dpdk.org" , "Yang, Qiming" , "stable@dpdk.org" Subject: RE: [PATCH v3] net/ice: refact parser API usage Thread-Topic: [PATCH v3] net/ice: refact parser API usage Thread-Index: AQHYSlWTMWITNTeVg0Gnzg0w7NL0sqztebNA Date: Wed, 13 Apr 2022 07:22:37 +0000 Message-ID: References: <20220407160614.886439-1-qi.z.zhang@intel.com> In-Reply-To: <20220407160614.886439-1-qi.z.zhang@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 28c406c5-d314-47d8-40e3-08da1d1e636d x-ms-traffictypediagnostic: SJ0PR11MB4926:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: tDyG+opSFG8BfJAeDHM+X/9bEWrRUgI9h52Rk/9rIMcMBZA2ETD2rQ54xkIREgTq70gYwIt7XT1ZBP0EUC1UEDqzSXLD5O0j84tKeUbMK7R60LXmdNyE9CSzkiCafKq/knHXzEZz0GnNcJaqI+KzwamRBZSd+C3y7LspEQpznWpRSmDSx2ymCgbEBaMLsdpMagiJhnb8ZLsEqLQvyiDDwveZbB3p4SO67xreP5w+bHx9w2rbTi0w/lPuiq70tZfUNEcJ3jqHNhFqu6kAqDUE7Dx/PIvQo7JAtbPuHfK37bPi3a3CUSTa8VWwLuualFZZKyw6SvEX3BtwCub+4D2XPVMljLZSK5PJt0uToxcK3/kPwVQJShy8B93JGV9tPK5YEeSzJh6CZZjxliGNXfRlI4JnhugY4qKI0Cf/TE61VOWhb30nOHXdWSHfgU4blcsfuqJcq0Swm8Kb6llE8y7yjpkdfc+t6sGgIx0/TyqrA/4sbDGNDHfBBZdgsINM3SCWvXlmWQfZjScuIXMclh7LS3WUqfnZ8+BjN8t1p8zsLxtamVdWZuiCPzPGTVVLSMUVcGFkJ7rmT5hn0MiOfL1kc/IwX41TPz6ATOfjJppt+pjP/sBqKOWBeWGN+pjHx/2btScbSHFc2caaME+z/H6lIk/EqZJL4tc0JoTrHAJV+RRyjHefw1UB8dCPDNiubIFQEgcDt6bINQpB6SnLm4uCfA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL0PR11MB3250.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(5660300002)(8936002)(66946007)(76116006)(110136005)(38100700002)(52536014)(82960400001)(2906002)(122000001)(66476007)(64756008)(53546011)(86362001)(33656002)(9686003)(8676002)(4326008)(26005)(186003)(55016003)(450100002)(66446008)(66556008)(316002)(83380400001)(6506007)(6636002)(54906003)(7696005)(508600001)(38070700005)(71200400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?lIpYefm476D3vSDErkiFCX4dQvhH9NWFXhTepqzN80vWbmu2aWSyo8bvbGZa?= =?us-ascii?Q?Hm0AhjlYh6EtBVjZFVBCFi63wPoURK8jtx7P7c5+zzWibRHyAcVM7XJogBW5?= =?us-ascii?Q?T2rf0qG5SKd6YPHrMSo2C8BG2CNEqdy+ifwNX/Ic76t4jIwClRvCaSniYtO1?= =?us-ascii?Q?Khs6sR/NVHqxqoAYbQ7k6y9R61ZFJmcTnx2q10ataksZpFHcLeJk+aqj8RiT?= =?us-ascii?Q?w8iLQcgXzKuDd9UoAli5bU0ydq8ZDPbF+URyWDFI4tJk3eRUzx8kiuO4OJr7?= =?us-ascii?Q?Hbddp25NNEOZfERnd9spHBHpdw3dF4Id7D9BypPohtSEUaCJSewE9eCrbWKX?= =?us-ascii?Q?RP6f8h5vpJLcTFPDFgsvQstPeVinN7hSd3PKcRlSvAgmsLFL7MbK3nJbnA8d?= =?us-ascii?Q?33qgrRclpVoc5rkhL7B4MxExeOOIuvDq0CtKABfBtGm5sL1ONLIO2ZA7aGOL?= =?us-ascii?Q?mPyGGaJv9uB7M43FT6ZMupqxny46aGVVvPquFqDLiNeeeOeeINcmWcuuPOCW?= =?us-ascii?Q?NTvjM/64QR0gBO8e0lOM0D3etq7xF8QnjX4FhmfhkTXIvmZaY4JROdbKbc4P?= =?us-ascii?Q?D1AZjWEYx4pjN6rfExDJjDMX2B4QrGZzEmBDklfoc898NwbfLR+Wj5bRbcyK?= =?us-ascii?Q?tUQxEkaqJZwNl0vhrF3CqJua2gzqBtm2X68axj3/2Mn5OVEX1UFVtAbJlCec?= =?us-ascii?Q?PTQEc+Hp72lFQLQrOELDTGvci+ljtIWds+Dq1LHpZFPTy/fx4fCaSVOrcL6u?= =?us-ascii?Q?TZRQFKqr8fM4j68NMyL1qSeA+4w9K1dWkh0HZ/WJCSRf1Y79Eb50/LsrE+t+?= =?us-ascii?Q?XJ/jO/xB8EoMu5xg1zEVqOZ00y+d49lbg+EXFycsfw2P49DVsg9L4Vndxnlg?= =?us-ascii?Q?wzoX0cUUS7MPtGnGpNXoNdWTdQLQKd1KQg88HSBdd7sBGWTem6hLGv2hef8m?= =?us-ascii?Q?rA7sXNjnPwUmVh+ODvlLDwyNgD/bVzpmvuCu2LqFv63H3n7jNKKO0mzKxP8e?= =?us-ascii?Q?VLoEYzQ81ca1FnVFkddDm7V6cIoY0+sdnaJ9guxY6kMHl2VShtvLuz5AByz/?= =?us-ascii?Q?3yr6LEj4LBmTwY+sTt+wLl14zfcWDCQk+LiZQ0Ipj6ZVTiq7/PsrpwefA6er?= =?us-ascii?Q?JEC/LVucic1qQk9NYCO1wOBoTJfcgZlBTFP1TJehaYFq8dP1Mc3kfjKy0363?= =?us-ascii?Q?vS7UlqbUY0QYs9W5UKsE8loHv1CQdHjdrYzDQYU1tLH3vnoasz1grADpa3N+?= =?us-ascii?Q?qiwVuYBsaM37CK1EPBHJE2GakUa4+drr0JudHAvlsuVvkFJ7cPwlOGuE6NNf?= =?us-ascii?Q?ukihF3rVAqbuXrpu7EUkdUyQjtMZu2WHTvqRsvyk288KY+vMRSJ7wfuzSIw/?= =?us-ascii?Q?ncpz1Q2ZuN0nTQ8cic5BYlD7zi3Bvd4Etx4qgUu9CMkwUrW+HmiK7XiqGS/L?= =?us-ascii?Q?8oyckbtYpm1X2sXSQl4miOLnsda5ldjFZxAndOBdBOwFAsVSEVyWd0gZ3LY9?= =?us-ascii?Q?NrA/u1pZWmWQ7SfeU7MBszeZLT/3tf8pZSutsUOECtUOthikcFGmQ4THW2n4?= =?us-ascii?Q?hQys5TXryEysuLi3ZaGJTYdSJBvFrDRJM4Wd7XhtUOv+YswcJ6uXYj/Vb73V?= =?us-ascii?Q?6bEhyJ2w1avu877fRsC45EGLjFkfxgNLamc/VIoF9Wl8FrZr43yisnpzQ6FO?= =?us-ascii?Q?H946otxK1zRGMeoYyueXQXXQNLTVhtWziyCRd6JcZdfTpXqr1wxYgo/6JZ/E?= =?us-ascii?Q?crtFPNqbAg=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BL0PR11MB3250.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 28c406c5-d314-47d8-40e3-08da1d1e636d X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Apr 2022 07:22:37.6769 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 4Zw9nIigBokV0tjtyV4v7ZEtymsFdMyo/q3mPu+R7Xycl8MC1w/M2oHHL/JPXX2iALVj4KY3Q7GqXWpbDNH5cg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB4926 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > -----Original Message----- > From: Zhang, Qi Z > Sent: Friday, April 8, 2022 12:06 AM > To: Guo, Junfeng ; Xu, Ting > Cc: dev@dpdk.org; Yang, Qiming ; Zhang, Qi Z > ; stable@dpdk.org > Subject: [PATCH v3] net/ice: refact parser API usage >=20 > Not necessary to create / destroy a parser instance for every raw packet = rule. > A global parser instance will be created in ice_flow_init and be destroye= d in > ice_flow_uninit. >=20 > Also, ice_dev_udp_tunnel_port_add has been hooked to perform > corresponding parser configure. This also fix the issue that RSS engine c= an't > support VXLAN inner through raw packet filter. >=20 > Fixes: 1b9c68120a1c ("net/ice: enable protocol agnostic flow offloading i= n > RSS") > Cc: stable@dpdk.org >=20 > Signed-off-by: Qi Zhang > --- >=20 > v3: > - add missing refact in ice_hash.c >=20 > v2: > - typo fix. >=20 > drivers/net/ice/ice_ethdev.c | 10 ++++++++++ > drivers/net/ice/ice_ethdev.h | 1 + > drivers/net/ice/ice_fdir_filter.c | 14 ++++---------- > drivers/net/ice/ice_generic_flow.c | 8 ++++++++ > drivers/net/ice/ice_hash.c | 9 ++++----- > 5 files changed, 27 insertions(+), 15 deletions(-) >=20 > diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c = index > 73e550f5fb..8bb34b874b 100644 > --- a/drivers/net/ice/ice_ethdev.c > +++ b/drivers/net/ice/ice_ethdev.c > @@ -5621,6 +5621,8 @@ ice_dev_udp_tunnel_port_add(struct rte_eth_dev > *dev, { > int ret =3D 0; > struct ice_hw *hw =3D ICE_DEV_PRIVATE_TO_HW(dev->data- > >dev_private); > + struct ice_adapter *ad =3D > + ICE_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); >=20 > if (udp_tunnel =3D=3D NULL) > return -EINVAL; > @@ -5628,6 +5630,9 @@ ice_dev_udp_tunnel_port_add(struct rte_eth_dev > *dev, > switch (udp_tunnel->prot_type) { > case RTE_ETH_TUNNEL_TYPE_VXLAN: > ret =3D ice_create_tunnel(hw, TNL_VXLAN, udp_tunnel- > >udp_port); > + if (!ret && ad->psr !=3D NULL) > + ice_parser_vxlan_tunnel_set(ad->psr, > + udp_tunnel->udp_port, true); > break; > default: > PMD_DRV_LOG(ERR, "Invalid tunnel type"); @@ -5645,6 > +5650,8 @@ ice_dev_udp_tunnel_port_del(struct rte_eth_dev *dev, { > int ret =3D 0; > struct ice_hw *hw =3D ICE_DEV_PRIVATE_TO_HW(dev->data- > >dev_private); > + struct ice_adapter *ad =3D > + ICE_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); >=20 > if (udp_tunnel =3D=3D NULL) > return -EINVAL; > @@ -5652,6 +5659,9 @@ ice_dev_udp_tunnel_port_del(struct rte_eth_dev > *dev, > switch (udp_tunnel->prot_type) { > case RTE_ETH_TUNNEL_TYPE_VXLAN: > ret =3D ice_destroy_tunnel(hw, udp_tunnel->udp_port, 0); > + if (!ret && ad->psr !=3D NULL) > + ice_parser_vxlan_tunnel_set(ad->psr, > + udp_tunnel->udp_port, false); > break; > default: > PMD_DRV_LOG(ERR, "Invalid tunnel type"); diff --git > a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h index > 3ab310628f..3d8427225f 100644 > --- a/drivers/net/ice/ice_ethdev.h > +++ b/drivers/net/ice/ice_ethdev.h > @@ -561,6 +561,7 @@ struct ice_adapter { > struct ice_rss_prof_info rss_prof_info[ICE_MAX_PTGS]; > /* True if DCF state of the associated PF is on */ > bool dcf_state_on; > + struct ice_parser *psr; > #ifdef RTE_ARCH_X86 > bool rx_use_avx2; > bool rx_use_avx512; > diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir= _filter.c > index 7954c6d8ea..0982478feb 100644 > --- a/drivers/net/ice/ice_fdir_filter.c > +++ b/drivers/net/ice/ice_fdir_filter.c > @@ -1826,7 +1826,6 @@ ice_fdir_parse_pattern(__rte_unused struct > ice_adapter *ad, > struct ice_fdir_v4 *p_v4 =3D NULL; > struct ice_fdir_v6 *p_v6 =3D NULL; > struct ice_parser_result rslt; > - struct ice_parser *psr; > uint8_t item_num =3D 0; >=20 > for (item =3D pattern; item->type !=3D RTE_FLOW_ITEM_TYPE_END; > item++) { @@ -1861,6 +1860,9 @@ ice_fdir_parse_pattern(__rte_unused > struct ice_adapter *ad, >=20 > switch (item_type) { > case RTE_FLOW_ITEM_TYPE_RAW: { > + if (ad->psr =3D=3D NULL) > + return -rte_errno; > + > raw_spec =3D item->spec; > raw_mask =3D item->mask; >=20 > @@ -1872,7 +1874,6 @@ ice_fdir_parse_pattern(__rte_unused struct > ice_adapter *ad, > (uint8_t *)(uintptr_t)raw_spec->pattern; > unsigned char *tmp_mask =3D > (uint8_t *)(uintptr_t)raw_mask->pattern; > - uint16_t udp_port =3D 0; > uint16_t tmp_val =3D 0; > uint8_t pkt_len =3D 0; > uint8_t tmp =3D 0; > @@ -1921,15 +1922,8 @@ ice_fdir_parse_pattern(__rte_unused struct > ice_adapter *ad, >=20 > pkt_len /=3D 2; >=20 > - if (ice_parser_create(&ad->hw, &psr)) > - return -rte_errno; > - if (ice_get_open_tunnel_port(&ad->hw, TNL_VXLAN, > - &udp_port)) > - ice_parser_vxlan_tunnel_set(psr, udp_port, > - true); > - if (ice_parser_run(psr, tmp_spec, pkt_len, &rslt)) > + if (ice_parser_run(ad->psr, tmp_spec, pkt_len, &rslt)) > return -rte_errno; > - ice_parser_destroy(psr); >=20 > if (!tmp_mask) > return -rte_errno; > diff --git a/drivers/net/ice/ice_generic_flow.c > b/drivers/net/ice/ice_generic_flow.c > index 53b1c0b69a..57eb002bde 100644 > --- a/drivers/net/ice/ice_generic_flow.c > +++ b/drivers/net/ice/ice_generic_flow.c > @@ -1831,6 +1831,9 @@ ice_flow_init(struct ice_adapter *ad) > TAILQ_INIT(&pf->dist_parser_list); > rte_spinlock_init(&pf->flow_ops_lock); >=20 > + if (ice_parser_create(&ad->hw, &ad->psr) !=3D ICE_SUCCESS) > + PMD_INIT_LOG(WARNING, "Failed to initialize DDP parser, > raw packet > +filter will not be supported"); > + > RTE_TAILQ_FOREACH_SAFE(engine, &engine_list, node, temp) { > if (engine->init =3D=3D NULL) { > PMD_INIT_LOG(ERR, "Invalid engine type (%d)", @@ > -1885,6 +1888,11 @@ ice_flow_uninit(struct ice_adapter *ad) > TAILQ_REMOVE(&pf->dist_parser_list, p_parser, node); > rte_free(p_parser); > } > + > + if (ad->psr !=3D NULL) { > + ice_parser_destroy(ad->psr); > + ad->psr =3D NULL; > + } > } >=20 > static struct ice_parser_list * > diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c inde= x > afbb357fa3..f35727856e 100644 > --- a/drivers/net/ice/ice_hash.c > +++ b/drivers/net/ice/ice_hash.c > @@ -653,13 +653,15 @@ ice_hash_parse_raw_pattern(struct ice_adapter > *ad, > const struct rte_flow_item_raw *raw_spec, *raw_mask; > struct ice_parser_profile prof; > struct ice_parser_result rslt; > - struct ice_parser *psr; > uint8_t *pkt_buf, *msk_buf; > uint8_t spec_len, pkt_len; > uint8_t tmp_val =3D 0; > uint8_t tmp_c =3D 0; > int i, j; >=20 > + if (ad->psr =3D=3D NULL) > + return -rte_errno; > + > raw_spec =3D item->spec; > raw_mask =3D item->mask; >=20 > @@ -713,11 +715,8 @@ ice_hash_parse_raw_pattern(struct ice_adapter > *ad, > msk_buf[j] =3D tmp_val * 16 + tmp_c - '0'; > } >=20 > - if (ice_parser_create(&ad->hw, &psr)) > - return -rte_errno; > - if (ice_parser_run(psr, pkt_buf, pkt_len, &rslt)) > + if (ice_parser_run(ad->psr, pkt_buf, pkt_len, &rslt)) > return -rte_errno; > - ice_parser_destroy(psr); >=20 > if (ice_parser_profile_init(&rslt, pkt_buf, msk_buf, > pkt_len, ICE_BLK_RSS, true, &prof)) > -- > 2.31.1 Acked-by: Xu Ting