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 417F3A04FD; Mon, 23 May 2022 04:45:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0DBAA4014F; Mon, 23 May 2022 04:45:02 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id EC29E40040 for ; Mon, 23 May 2022 04:44:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653273900; x=1684809900; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=ys4XftQRbNtqZatqHQYhkktJFFX3mPNzQfYjrNSKBRA=; b=b+6lKpU0vl3Mrkgd9l5gz+9U3Rp2OJgiYudaaSnGklhSUF+1ertfEG18 /oehILs4dFM2FmbwoO4el+jP05Vp7+LmJO1RYSozU/ZAiuhfq0J62hpQl lR7yjRB1kOhVnZT0+fLJSF+ghtRZNLe1KjVvLsQlXXGjICJ/hlzDLGaWl k0TsK0Jcah3qYMf8AMQnvlycqIdH0/QJhqS7IYlnxi/wFkTYY9wS/usCQ U5TMoN8K1qMxDaRj1J1IrtZCX5OHvlSBnmLhRgnRLChOtUSV2Mu+qmVZ8 yf2PmF/ZrsbjgvvJB1HRxZ/RjEGXUkeJ3W9LzaqjLo8sH32zRVpJH8uR1 g==; X-IronPort-AV: E=McAfee;i="6400,9594,10355"; a="272802333" X-IronPort-AV: E=Sophos;i="5.91,245,1647327600"; d="scan'208";a="272802333" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2022 19:44:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,245,1647327600"; d="scan'208";a="702769319" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga004.jf.intel.com with ESMTP; 22 May 2022 19:44:56 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Sun, 22 May 2022 19:44:56 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Sun, 22 May 2022 19:44:56 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.45) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Sun, 22 May 2022 19:44:56 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DTb2qLoLeR7eE28MUmx1QE1PY6a+gjA8+24MkMxovqW5Hx5+4j/Hs9050DyVGct3wrgS2Zlvw93RGllwaYkBZ+IgSurPi/y6W5c3ese0Pyl39pmMqWVFputcTrI/jGM+HknXTF/G+ZvkyGOTnsprsNK+mx1cpA9TYz4SC2lY3Tpajoo3WmvGxRTKrMAPei1Gv5yRf2d9mBBdZBk1TfYk2xSDeeVl6cpQZMzzMNtyX762Krlic6UU4Ahb6JQp5KzgnU70lE7PlojoPdpnZcL4ODh8feRgll4ewqvCe1oHCEY0E3SkEj+OhQOMjHiCJWX4RY8A9pLvljzbv19taAIieg== 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=poutYEbSmAwXtNjOYGnTxwm3ONBrmKrkuv9j+4nkYKw=; b=GBrzd+ETpQBUrIUSMFwUn8L/Cx5u+pAy/TLDz1rhXGkNsgBfcYgsdHeAK/MNwpL8b5GCgI3fRTQGguOq+yf6BIkEAxasvs5HITuvCscpywhCl7IlyHocVQFvkMmRXh+yYLAtwxp/EAaBoKGtbbnjSy9BTaTO7bNZxVJ62iPQzWCW0Xlq9ZfQ6GwBdULwRXPS6AHGeJ5ULfP4SrYNeByh1TBLunqwWH9sjObEG2peeTrmoD1VVn5SyCaMOylz/4B7D7gSIbUIe61bbf/xMR/YO3LoCNbcfEnIXbh7b7n304wAZiZkVKdMwUmhnPY/2a+D3mLrO/TeHm5g3N+et4kYPA== 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 DM6PR11MB3723.namprd11.prod.outlook.com (2603:10b6:5:13f::25) by SN6PR11MB3118.namprd11.prod.outlook.com (2603:10b6:805:dc::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.14; Mon, 23 May 2022 02:44:54 +0000 Received: from DM6PR11MB3723.namprd11.prod.outlook.com ([fe80::3589:6c9d:b262:5187]) by DM6PR11MB3723.namprd11.prod.outlook.com ([fe80::3589:6c9d:b262:5187%4]) with mapi id 15.20.5273.022; Mon, 23 May 2022 02:44:54 +0000 From: "Guo, Junfeng" To: "Zhang, Qi Z" , "Wu, Jingjing" , "Xing, Beilei" CC: "dev@dpdk.org" , "Xu, Ting" Subject: RE: [PATCH 1/2] net/iavf: enable Protocol Agnostic Flow Offloading FDIR Thread-Topic: [PATCH 1/2] net/iavf: enable Protocol Agnostic Flow Offloading FDIR Thread-Index: AQHYbk0zkCXgTGfT8EeQJTJVSCL3iq0rwTCg Date: Mon, 23 May 2022 02:44:54 +0000 Message-ID: References: <20220520091648.3524540-2-junfeng.guo@intel.com> <20220523023138.3777313-1-junfeng.guo@intel.com> <20220523023138.3777313-3-junfeng.guo@intel.com> In-Reply-To: <20220523023138.3777313-3-junfeng.guo@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.401.20 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: 8f478357-c263-45ef-6ec9-08da3c663771 x-ms-traffictypediagnostic: SN6PR11MB3118:EE_ 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: S05gJ4rygjhDLdpMPhcKt+Luw7v+q1OoosTg7Ybt2gh8qq9jMacrXTKM/m+iHt9SqoAhbtA+jHvVfRnfcpkC6qZ+fGBz0FvHaqoOkiRGUgFQPnEwh9tyJIPtYzEKvmSrtdt7T15e92enhqiJc2+dij3XtkUnpteDcRU4tiCftT7aA4ZIKGcGj5qWRElKu6DfO/aE3ip6RrW3JwFiGJuGp25RLIOYk0FfmHtPQEClTh2XLYGEFMOz+nl/ehLSrm5PI/vd/XZFBU6PQRyZEH6E6VtOH3K/KeneGHrYHmS/U1z+aaG9e4yFA/jOVwnrkxl7PkxECZpSB/tlQB+4HLWntw6VMZ7r1G4/AWT6/+3njgT2RUGSJ8obdqpfPBZRpzT1cVX4N8HUEBjVWF867IdWP50VfF9tEvvoFmBnt1U3/cWp8knWLseTb3RpOCRamzjJq8qfNdntQMhmmDNmATCKDEpcNPvaOJnYLjViHhW4BnDPYwqNND665N0/32wfTJ6lmFIIhtJs01ykr07aNFMm5wW126OI+EkxAjorLN1fR1E8M/hZrHQFrt3t8BTmnFUHh/q15oJkxv6pHk4r/cY6vkPXILyD3gjxVLJYhTUjS3MriFfqNoEZhl3UeMXLnm4NS37xrDo3Ar0tyOrHc3OXojTxh9U1bnOewPu+pBKcHa7XjgM2jRWSCEWdc5KSIRYNhu7XVEjksG4SFRt1BTG2Tg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB3723.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(122000001)(186003)(2906002)(5660300002)(38100700002)(6636002)(82960400001)(55016003)(8936002)(33656002)(71200400001)(107886003)(9686003)(26005)(76116006)(52536014)(316002)(6506007)(4326008)(8676002)(66946007)(64756008)(66476007)(7696005)(66446008)(66556008)(86362001)(110136005)(54906003)(53546011)(83380400001)(38070700005)(508600001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?zP3RzLYztcoUZQhITQ3pOyhsyH2C9LoO/N4GP3SERDQZy0bb/5CRF6OwDaUu?= =?us-ascii?Q?IDk6O6yukJo/1Dh4r5mHnAaips4O7z7zlb9qDmJ0067peDFL/OzJcIYqstc/?= =?us-ascii?Q?4vxGKa4gG0Tg2AkiwbR/mzo6ftKtxU98EHhIOQu/HMwHx4e9UQbyGoCeoHsI?= =?us-ascii?Q?yZZS+g+8PkH1NAX0CMnO/Q3Q36ij/cku/i8f+PECE2iBHi61DQRMzh2QOKa3?= =?us-ascii?Q?nXd8aUi8+acVrJ53Jxp0ER6qWUfxNygTAxYZx8GmUS/p5hKaIsJEY2oEwK+b?= =?us-ascii?Q?wPqx/dLY1ooBGMqGNQljRLV2OLOawe7xNJouEh+8KsFceyl79fGLlwoavPr5?= =?us-ascii?Q?IUI23NhgDsCIsYeAcvQn+Z2/qxLoTJeMZju6X30hUjYEjBrf/3SslQZIate7?= =?us-ascii?Q?23tbSTldZj4Y1S1wYvfQnQkRX9QkmyB41uku2jvDtmdD3QoQnP14jcN3kltS?= =?us-ascii?Q?cbRPxS+hfEfqHTtU/reWt+Qu4Ga4Uu4Z+Q4yMOOCkMCIjqD1L0/yq5ETDGb6?= =?us-ascii?Q?OOMKEe08ZcknsWGNUAxBRsHwX8BMKAOqyTDeJdqoQNZvdM0XSLEU6gLo/TjX?= =?us-ascii?Q?e671XL2PYIv2LbVDtlDOdbLGbe3tPEmdmD3k36rTEGWrL+J+67j8SKeW7Hec?= =?us-ascii?Q?BNOGa/Q/vU/whlEXFtLW8bRo+j89cQLoyB0HZTkTPWi00G7V2SgMsr/EITUm?= =?us-ascii?Q?pyDQsRInT8fUYGA5MjccUI37OrWt8MhTzcummfdYkw0qNcK9QDhwnacA99n/?= =?us-ascii?Q?jRlTZn5I5wi6JCNG4TsHOgpL0L3Ij8uBWvHe4/rpFnf/ptuO/4YshLox7I8V?= =?us-ascii?Q?rrTvZz3/S3ROqsFVaN5mxUcNTfwB4WfEwX8h3ao7pX8ecA9bZDIx55p4Ihqz?= =?us-ascii?Q?kib3dk24KXX62yPeVUBtYLovvbUvccS2OuxUsdvQ1Bd2+Kk54IyWpzJbJPGv?= =?us-ascii?Q?F9aEuGuyQe5f+fkBo9MAs610CZ9hjTwwci8O/wk0vAU29tea52Xq+CRHPjkU?= =?us-ascii?Q?Xg0WHysoiUvF3F5AxODxF+wJtFHEqeeU6qJr4TjK/MzCjq9ulPVOtvZZ9DP0?= =?us-ascii?Q?hgXoKgkFZVE/1y4gIFFkS+0o+KKFebaN1RsPMeObqo0ief95nIFrBY0sO07u?= =?us-ascii?Q?0aP3OBmuAue+VVb9VCDS8WXlPhcQCia6kzKuI8Cot5myt1DEm+p/RC2baVpu?= =?us-ascii?Q?Y+oYcNTZta2TbM9m2d63HXHHwhvpRymp6XJLHsZpsg2OVF1hDn9tOP+ITBGd?= =?us-ascii?Q?eGoohokCxAxQv2zcIXpm0C/kyu+z9le92+HURgprk8OSiWiKt00rUIFvSxOg?= =?us-ascii?Q?yHzSOy3ZBLYs37wtIfaMb2nbnV5VYkXW20SeibdHbCT2w5CObdclNaFAgPzU?= =?us-ascii?Q?N2ev4YuYdNQgD50slRzFP5fQcb16fzpezqXSaK7DJPdvcQoD/ftMTRZJudfu?= =?us-ascii?Q?9EPGr/WyFtfIsGlyxhk2xBt/ciqWkLQqW4bIPSnzVIoRWhc3lFVNifBRnMZo?= =?us-ascii?Q?KAnZNWNBnRSPUbnknNWBClACVcfbjalSc2vjGxHyYvgzu3blbox+uuyw54kJ?= =?us-ascii?Q?4vD1eFthpKnKkC/nj43Id6ajrGJsBl9BjeFB9hnFgoWoehNFpiwmvj/C5KwN?= =?us-ascii?Q?aSvws7RFTPKEgzsWToYhw5PQXzjdC0f2Q9OL3YdtqGt92iYUCkudfaEiYSMb?= =?us-ascii?Q?8Tq5pwO2IpmK6l34lRRmWZ98TwBHlRNAnNXe7GMI3/2coBfFfko5Q7tflWtQ?= =?us-ascii?Q?hiK0LBRh9w=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: DM6PR11MB3723.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8f478357-c263-45ef-6ec9-08da3c663771 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 May 2022 02:44:54.0701 (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: s1QuC3nqU56xA3d1L0XFP5/d2m9qMUyahRr805eGCOGr+LG5MFTkWuEDLtzbIqJlkALxE1sKjp85orq+9p/ciA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3118 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 Sorry to send this commit by mistake. Please drop this one. Thanks! > -----Original Message----- > From: Guo, Junfeng > Sent: Monday, May 23, 2022 10:32 > To: Zhang, Qi Z ; Wu, Jingjing > ; Xing, Beilei > Cc: dev@dpdk.org; Xu, Ting ; Guo, Junfeng > > Subject: [PATCH 1/2] net/iavf: enable Protocol Agnostic Flow Offloading > FDIR >=20 > This patch enabled Protocol Agnostic Flow (raw flow) Offloading Flow > Director (FDIR) in AVF, based on the Parser Library feature and the > existing rte_flow `raw` API. >=20 > The input spec and mask of raw pattern are first parsed via the > Parser Library, and then passed to the kernel driver to create the > flow rule. >=20 > Similar as PF FDIR, each raw flow requires: > 1. A byte string of raw target packet bits. > 2. A byte string contains mask of target packet. >=20 > Here is an example: > FDIR matching ipv4 dst addr with 1.2.3.4 and redirect to queue 3: >=20 > flow create 0 ingress pattern raw \ > pattern spec \ > 000000000000000000000000080045000014000040004010000000000000 > 01020304 \ > pattern mask \ > 000000000000000000000000000000000000000000000000000000000000 > ffffffff \ > / end actions queue index 3 / mark id 3 / end >=20 > Note that mask of some key bits (e.g., 0x0800 to indicate ipv4 proto) > is optional in our cases. To avoid redundancy, we just omit the mask > of 0x0800 (with 0xFFFF) in the mask byte string example. The prefix > '0x' for the spec and mask byte (hex) strings are also omitted here. >=20 > Signed-off-by: Junfeng Guo > --- > doc/guides/rel_notes/release_22_07.rst | 1 + > drivers/net/iavf/iavf_fdir.c | 67 ++++++++++++++++++++++++++ > drivers/net/iavf/iavf_generic_flow.c | 6 +++ > drivers/net/iavf/iavf_generic_flow.h | 3 ++ > 4 files changed, 77 insertions(+) >=20 > diff --git a/doc/guides/rel_notes/release_22_07.rst > b/doc/guides/rel_notes/release_22_07.rst > index a0eb6ab61b..829fa6047e 100644 > --- a/doc/guides/rel_notes/release_22_07.rst > +++ b/doc/guides/rel_notes/release_22_07.rst > @@ -65,6 +65,7 @@ New Features > * Added Tx QoS queue rate limitation support. > * Added quanta size configuration support. > * Added ``DEV_RX_OFFLOAD_TIMESTAMP`` support. > + * Added Protocol Agnostic Flow Offloading support in AVF FDIR and RSS. >=20 > * **Updated Intel ice driver.** >=20 > diff --git a/drivers/net/iavf/iavf_fdir.c b/drivers/net/iavf/iavf_fdir.c > index e9a3566c0d..f236260502 100644 > --- a/drivers/net/iavf/iavf_fdir.c > +++ b/drivers/net/iavf/iavf_fdir.c > @@ -194,6 +194,7 @@ > IAVF_INSET_TUN_TCP_DST_PORT) >=20 > static struct iavf_pattern_match_item iavf_fdir_pattern[] =3D { > + {iavf_pattern_raw, IAVF_INSET_NONE, > IAVF_INSET_NONE}, > {iavf_pattern_ethertype, IAVF_FDIR_INSET_ETH, > IAVF_INSET_NONE}, > {iavf_pattern_eth_ipv4, > IAVF_FDIR_INSET_ETH_IPV4, IAVF_INSET_NONE}, > {iavf_pattern_eth_ipv4_udp, > IAVF_FDIR_INSET_ETH_IPV4_UDP, IAVF_INSET_NONE}, > @@ -720,6 +721,7 @@ iavf_fdir_parse_pattern(__rte_unused struct > iavf_adapter *ad, > struct virtchnl_proto_hdrs *hdrs =3D > &filter->add_fltr.rule_cfg.proto_hdrs; > enum rte_flow_item_type l3 =3D RTE_FLOW_ITEM_TYPE_END; > + const struct rte_flow_item_raw *raw_spec, *raw_mask; > const struct rte_flow_item_eth *eth_spec, *eth_mask; > const struct rte_flow_item_ipv4 *ipv4_spec, *ipv4_last, > *ipv4_mask; > const struct rte_flow_item_ipv6 *ipv6_spec, *ipv6_mask; > @@ -746,6 +748,7 @@ iavf_fdir_parse_pattern(__rte_unused struct > iavf_adapter *ad, > enum rte_flow_item_type next_type; > uint8_t tun_inner =3D 0; > uint16_t ether_type, flags_version; > + uint8_t item_num =3D 0; > int layer =3D 0; >=20 > uint8_t ipv6_addr_mask[16] =3D { > @@ -763,8 +766,72 @@ iavf_fdir_parse_pattern(__rte_unused struct > iavf_adapter *ad, >=20 > RTE_FLOW_ERROR_TYPE_ITEM, item, > "Not support range"); > } > + item_num++; >=20 > switch (item_type) { > + case RTE_FLOW_ITEM_TYPE_RAW: { > + raw_spec =3D item->spec; > + raw_mask =3D item->mask; > + > + if (item_num !=3D 1) > + return -rte_errno; > + > + if (raw_spec->length !=3D raw_mask->length) > + return -rte_errno; > + > + uint16_t pkt_len =3D 0; > + uint16_t tmp_val =3D 0; > + uint8_t tmp =3D 0; > + int i, j; > + > + pkt_len =3D raw_spec->length; > + > + for (i =3D 0, j =3D 0; i < pkt_len; i +=3D 2, j++) { > + tmp =3D raw_spec->pattern[i]; > + if (tmp >=3D 'a' && tmp <=3D 'f') > + tmp_val =3D tmp - 'a' + 10; > + if (tmp >=3D 'A' && tmp <=3D 'F') > + tmp_val =3D tmp - 'A' + 10; > + if (tmp >=3D '0' && tmp <=3D '9') > + tmp_val =3D tmp - '0'; > + > + tmp_val *=3D 16; > + tmp =3D raw_spec->pattern[i + 1]; > + if (tmp >=3D 'a' && tmp <=3D 'f') > + tmp_val +=3D (tmp - 'a' + 10); > + if (tmp >=3D 'A' && tmp <=3D 'F') > + tmp_val +=3D (tmp - 'A' + 10); > + if (tmp >=3D '0' && tmp <=3D '9') > + tmp_val +=3D (tmp - '0'); > + > + hdrs->raw.spec[j] =3D tmp_val; > + > + tmp =3D raw_mask->pattern[i]; > + if (tmp >=3D 'a' && tmp <=3D 'f') > + tmp_val =3D tmp - 'a' + 10; > + if (tmp >=3D 'A' && tmp <=3D 'F') > + tmp_val =3D tmp - 'A' + 10; > + if (tmp >=3D '0' && tmp <=3D '9') > + tmp_val =3D tmp - '0'; > + > + tmp_val *=3D 16; > + tmp =3D raw_mask->pattern[i + 1]; > + if (tmp >=3D 'a' && tmp <=3D 'f') > + tmp_val +=3D (tmp - 'a' + 10); > + if (tmp >=3D 'A' && tmp <=3D 'F') > + tmp_val +=3D (tmp - 'A' + 10); > + if (tmp >=3D '0' && tmp <=3D '9') > + tmp_val +=3D (tmp - '0'); > + > + hdrs->raw.mask[j] =3D tmp_val; > + } > + > + hdrs->raw.pkt_len =3D pkt_len / 2; > + hdrs->tunnel_level =3D 0; > + hdrs->count =3D 0; > + return 0; > + } > + > case RTE_FLOW_ITEM_TYPE_ETH: > eth_spec =3D item->spec; > eth_mask =3D item->mask; > diff --git a/drivers/net/iavf/iavf_generic_flow.c > b/drivers/net/iavf/iavf_generic_flow.c > index ddc1fdd22b..e1a611e319 100644 > --- a/drivers/net/iavf/iavf_generic_flow.c > +++ b/drivers/net/iavf/iavf_generic_flow.c > @@ -48,6 +48,12 @@ const struct rte_flow_ops iavf_flow_ops =3D { > .query =3D iavf_flow_query, > }; >=20 > +/* raw */ > +enum rte_flow_item_type iavf_pattern_raw[] =3D { > + RTE_FLOW_ITEM_TYPE_RAW, > + RTE_FLOW_ITEM_TYPE_END, > +}; > + > /* empty */ > enum rte_flow_item_type iavf_pattern_empty[] =3D { > RTE_FLOW_ITEM_TYPE_END, > diff --git a/drivers/net/iavf/iavf_generic_flow.h > b/drivers/net/iavf/iavf_generic_flow.h > index f6af176073..52eb1caf29 100644 > --- a/drivers/net/iavf/iavf_generic_flow.h > +++ b/drivers/net/iavf/iavf_generic_flow.h > @@ -180,6 +180,9 @@ > #define IAVF_INSET_L2TPV2 \ > (IAVF_PROT_L2TPV2 | IAVF_L2TPV2_SESSION_ID) >=20 > +/* raw pattern */ > +extern enum rte_flow_item_type iavf_pattern_raw[]; > + > /* empty pattern */ > extern enum rte_flow_item_type iavf_pattern_empty[]; >=20 > -- > 2.25.1