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 D4585A0C44; Mon, 12 Apr 2021 10:45:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 68C3B140FE1; Mon, 12 Apr 2021 10:45:12 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 49E76140FD8 for ; Mon, 12 Apr 2021 10:45:10 +0200 (CEST) IronPort-SDR: tSJbKQstoTcB2/Wrz3fFAE/PLCRbX+B6hqFvYqXY1IsXYlmFZqQUOAEaCCLSdhLlccbkStIJ6O HD7ZG4pBR0KQ== X-IronPort-AV: E=McAfee;i="6000,8403,9951"; a="174239752" X-IronPort-AV: E=Sophos;i="5.82,216,1613462400"; d="scan'208";a="174239752" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2021 01:45:08 -0700 IronPort-SDR: JvXY2JhSWROVBmcwhGq/HBBqnje2mNs9hNtL+wwzxohrBemYIqm2/AHtDmO2KEBtNSKi78n48y M95Y/QKsVTow== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,216,1613462400"; d="scan'208";a="531802677" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga004.jf.intel.com with ESMTP; 12 Apr 2021 01:45:07 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Mon, 12 Apr 2021 01:45:07 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Mon, 12 Apr 2021 01:45:07 -0700 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (104.47.38.51) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Mon, 12 Apr 2021 01:45:07 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W4xCBTpZncZVTuxyvO3Xj7XbaxRwD8piGuGnnSDd2eXFf7GbQ/Slv4JgSbeZ9pCYh9p3qMGJhc2JLAuHaozikzoNq6KShutSnQs6kuiJIoTr/Hf9l75rGiQHH7y1yMGBTCH41fEBkNodag+LOXoW2tFGH/r6nhn01vZ8Ad8Fq8TSkTqbFxjLRn+Zl0YutTGBCy0eF+ObLqMrGX1IqBDuOgWDGin1396NyQXmmGJb6DRx1wMZEuu7Y9qzGRMOz6Oglz5UQFUWu2XmHVbIFQXz1atly+K0uMJ1cK4YzXji4SR5g/sCPzpCpkIzICVcBiU9hBuDta5IHUcfd41N5VjOuQ== 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-SenderADCheck; bh=tAj+2QVAHJzZzPxpibRhLg1S4izcN2PGn90u7lFkYuo=; b=b2fWxX0pFsE3qGhIbI8UqeaU8Rcwf4esFJRpiYkC2o+nEw8U444jjEaCzy66NFytOAL1bIhXWg26722wZA6M5OJTRh6XAx04mqfW5oXm8cOOQ0J2IToOwZ8ICBpwxqQ1RDPyltTZUb+NCoAJ/dKzy/CA1wJ0ojul5xZaCZuwmGMDeWKG/huSREd51u9sSDBsRbRFbCBDPNVDdU+MrG5cfh6F5DcEpqGoR8hTM1xcGBldYrBRR84rRtZzpgVjrUHKHw7uUUhzvmJplDj0oXxHwevybdqNj27rq4cGBq69gZHAG1iXWPs+70+wN4R32W11mj8poUeyAarKcfgK3IfD7w== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tAj+2QVAHJzZzPxpibRhLg1S4izcN2PGn90u7lFkYuo=; b=Lxb8M/Uqcb9h9wdLhLD7q1eSwapU4Ku8ePYvWcKCLMj7EWGAIwcC/V0NRgC8fQz2/vreK0LyBhSArC7TBEB1VoJlGsQBZmjKrm2ChId4NBjxFjYfJqGDfwtYDTaK9TKVNUxTgkKBixYZbIgFwQ88Mrk6s6v79SleoeUQBYZCuBQ= Received: from CY4PR1101MB2069.namprd11.prod.outlook.com (2603:10b6:910:17::7) by CY4PR11MB1800.namprd11.prod.outlook.com (2603:10b6:903:120::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.22; Mon, 12 Apr 2021 08:45:04 +0000 Received: from CY4PR1101MB2069.namprd11.prod.outlook.com ([fe80::951d:fdaa:ca43:36d0]) by CY4PR1101MB2069.namprd11.prod.outlook.com ([fe80::951d:fdaa:ca43:36d0%4]) with mapi id 15.20.4020.022; Mon, 12 Apr 2021 08:45:04 +0000 From: "Xu, Ting" To: "Guo, Jia" , "orika@nvidia.com" , "Zhang, Qi Z" , "Xing, Beilei" , "Li, Xiaoyun" , "Wu, Jingjing" , "Guo, Junfeng" CC: "dev@dpdk.org" Thread-Topic: [PATCH v3 4/4] net/iavf: support FDIR for IP fragment packet Thread-Index: AQHXLpjsp3A+rgTB4kWhRtTak0mjAqqwkhNg Date: Mon, 12 Apr 2021 08:45:03 +0000 Message-ID: References: <20210324134844.60410-1-jia.guo@intel.com> <20210411060144.72326-1-jia.guo@intel.com> <20210411060144.72326-4-jia.guo@intel.com> In-Reply-To: <20210411060144.72326-4-jia.guo@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.51] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 44e0e36b-5e05-484f-7429-08d8fd8f4445 x-ms-traffictypediagnostic: CY4PR11MB1800: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: gojpzUrAixF7V4U14xw/iXEbBfed1/0tfaVqkteGq1Vb7EPcfO3Rqh3flynKs/hC44eIAv7agdBcu+fEu2o+c7kwictCwm5oM41eWd6ozk0Qfqf1HibUepinRcMRBq0eMgd8Cqn0Oo6pMEudzj582O+QMrCCzYOq4cv5bRGWNdCARaNsRCXCCZlOxc5di67hlGB4NqvInalfvCDm6/s+BTuKn84PO/wcFcfRqEYDFU3LgWyrIXpUnIMB2LfSJj2UrJniKTBPNXfUdIxXJJU27gMlyl352HBHJfFHeuYcR+Lmf2J3ts1FEWLBj9Mxf4mkYkBYHOWRyWVf0Ftc4L/h8tJveF4fC9/W3k8qrDqd59n8F5WisUi3p21dB5n3G1u0nEYLfOn1BsHcATDhGlSdIG9UjVEco+NmlEEZhxlEwoMIAR+xNVJzOT1HcmaEOhPQMNkWiEuJEHZbeMNMqRLlA/ErLVnYRAeA3uPPNbon7pEq2m1boYjSC0EbuFgyIjtb79FlJCfvqp9BOFrT7gjRmz2ygtojYAIUQGjAR+TfvwtJKQnQnuoYJLZAWZ2NFSliPG3LIcynB0N3qITHqNqHMZP/SFBetcn1/xdrs0JSaSZaGa86tyVYjpWpOahrfeYCyToAKGaSZTZ+3XcJkDxUUg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY4PR1101MB2069.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(376002)(396003)(39860400002)(136003)(366004)(346002)(71200400001)(110136005)(9686003)(4326008)(8676002)(5660300002)(52536014)(55016002)(83380400001)(316002)(921005)(86362001)(186003)(26005)(7696005)(478600001)(38100700002)(53546011)(6506007)(66946007)(8936002)(66556008)(64756008)(66476007)(33656002)(66446008)(2906002)(76116006)(6636002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?0GPiQDRRTVsgwt6jmH1B8vDNgKL4yEmVSfMj7KO5xA24Q1t15R9FIfhEMKRH?= =?us-ascii?Q?vmyVrUhb6hR02NETVRQc27HNQKsnP5jF1TCcMpMIpHmtdjyodQhyjUYuY34C?= =?us-ascii?Q?YNDDXx62045K+8wlqIBAGSO42vSiW0S+wI16H2O9HMer1sLKHRTguAgpGbLs?= =?us-ascii?Q?LdoGh7VQKuY9HvFsVBO3FP01UmqzBn6SmDR6udmAhD9pTZeOys8BCOQg5W7M?= =?us-ascii?Q?8Ij0hhqG+ImoqPNzrrGyDu6tbaIjWis8H8PzV9CGIDCigbF3uuSF59UUxEZu?= =?us-ascii?Q?PreD5sxNvJkISlhWvCN2bWdgYORTssFX7Hgk3od0T4OHt+v+kiedqt9dp/91?= =?us-ascii?Q?MOuldekvyKpHTlt62zFCp7hE23FCwJF3uXjN8LUZYtYPQXwgUBviGpeEiTu5?= =?us-ascii?Q?at75HZE1oggZ2JgHuAxaILVYUgmwSkilsNKq4ir11jlkJFlg7wZ2rstQenux?= =?us-ascii?Q?8ZTXwu8r9c21LVyuj6lumt+DdOGsO1BXxYcoUxq8nNo5jQZGUzgcRRldzVQK?= =?us-ascii?Q?/uV37TJqcJch8SiH7nb+AQjzj4JFHM+Tn+dqKjPV+6ybEuvld4vOgVXiz6nv?= =?us-ascii?Q?UODrURWthqYze/aCh34pj0S18ajF7EXFTCUDBr0RNZNm49DZP9SVFidxuwUQ?= =?us-ascii?Q?O8Mr2X4FFHOxyOTGOmPwUR0N6Ci7emmMCUTabo97HjYWhGnatuSAjMQCMmCi?= =?us-ascii?Q?BUXua5zP3rwGoFnkECs0K/4QTQhYkGGJmCJTT+AjlrnELAwFzaurGB2lWfER?= =?us-ascii?Q?io3ujvvgJHBC7TZzoP7/qIEUKZXGLDHz1PUFmwD7vfdKF6SIzdPSoNarQFtI?= =?us-ascii?Q?CLQcrA5/jJNg+hznqegFN3G0DtjojA22zSZ8nvbqkDTrhiLdhj8xccSU6L3S?= =?us-ascii?Q?kwHOkSHBmE5/Jjp5iWo6+AEcYlGnScOPylCYhOW7Qrmb4aCupVl9ECfBY75h?= =?us-ascii?Q?ZfIng/EnZvYvpD14eEZiRIwdcdfPzJ0vjNPygjfl/boB6+vWYO1qBFL6niIa?= =?us-ascii?Q?CBz8xflayTTjQb91Rnppu2AI+lcdIVsjWaRmw7b281bfq6CvFDXnFD/6dIN7?= =?us-ascii?Q?lMZcrN8NTD8iEx9Rrms8mXoypqH3dmZUhUNe6wmm3Bbj5aRg9ySE1e4Z7crX?= =?us-ascii?Q?qo8h1eUiumwfNlS1SZfdJmfq35t07++FL09cziGucHiyAocZSqhPafnxo40e?= =?us-ascii?Q?Fp+3MMeZsRTjUxt6oUYVkkHtr9SUtXOGfLcYNXmhh3GbFXkkRQOs6QgTeF3v?= =?us-ascii?Q?/ZLSuzoBYzCkn5dV0rJ3QHhFlT1pl3kgkg3OqJyI11WURHgfggvLGqmjTlM5?= =?us-ascii?Q?k9M/stH2mXEeVWDXmE32mx8W?= 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: CY4PR1101MB2069.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 44e0e36b-5e05-484f-7429-08d8fd8f4445 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Apr 2021 08:45:03.8529 (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: gfQNceV3peCtItEerwL8KLcDBEBxIM8yZyaIRqv2jBs74aE0LrMAKqXZuPWDDZBpoI+GftEd81St1LoO4ynhWw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR11MB1800 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 4/4] net/iavf: support FDIR for IP fragment packet 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 Sender: "dev" Hi, Jeff Best Regards, Xu Ting > -----Original Message----- > From: Guo, Jia > Sent: Sunday, April 11, 2021 2:02 PM > To: orika@nvidia.com; Zhang, Qi Z ; Xing, Beilei > ; Li, Xiaoyun ; Wu, Jingjing > > Cc: dev@dpdk.org; Xu, Ting ; Guo, Jia > Subject: [PATCH v3 4/4] net/iavf: support FDIR for IP fragment packet >=20 > New FDIR parsing are added to handle the fragmented IPv4/IPv6 packet. >=20 > Signed-off-by: Ting Xu > Signed-off-by: Jeff Guo > --- > drivers/net/iavf/iavf_fdir.c | 376 ++++++++++++++++++--------- > drivers/net/iavf/iavf_generic_flow.h | 5 + > 2 files changed, 257 insertions(+), 124 deletions(-) >=20 > diff --git a/drivers/net/iavf/iavf_fdir.c b/drivers/net/iavf/iavf_fdir.c = index > 62f032985a..64c169f8c4 100644 > --- a/drivers/net/iavf/iavf_fdir.c > +++ b/drivers/net/iavf/iavf_fdir.c > @@ -34,7 +34,7 @@ > #define IAVF_FDIR_INSET_ETH_IPV4 (\ > IAVF_INSET_IPV4_SRC | IAVF_INSET_IPV4_DST | \ > IAVF_INSET_IPV4_PROTO | IAVF_INSET_IPV4_TOS | \ > - IAVF_INSET_IPV4_TTL) > + IAVF_INSET_IPV4_TTL | IAVF_INSET_IPV4_ID) >=20 Skip... > + if (ipv4_mask->hdr.version_ihl || > + ipv4_mask->hdr.total_length || > + ipv4_mask->hdr.hdr_checksum) { > + rte_flow_error_set(error, EINVAL, > + > RTE_FLOW_ERROR_TYPE_ITEM, > + item, "Invalid IPv4 mask."); > + return -rte_errno; > + } >=20 > - if (tun_inner) { > - input_set &=3D > ~IAVF_PROT_IPV4_OUTER; > - input_set |=3D IAVF_PROT_IPV4_INNER; > - } This part "tun_inner" is newly added and needed for GTPU inner, cannot be d= eleted. > + if (ipv4_last && > + (ipv4_last->hdr.version_ihl || > + ipv4_last->hdr.type_of_service || > + ipv4_last->hdr.time_to_live || > + ipv4_last->hdr.total_length | > + ipv4_last->hdr.next_proto_id || > + ipv4_last->hdr.hdr_checksum || > + ipv4_last->hdr.src_addr || > + ipv4_last->hdr.dst_addr)) { > + rte_flow_error_set(error, EINVAL, > + > RTE_FLOW_ERROR_TYPE_ITEM, > + item, "Invalid IPv4 last."); > + return -rte_errno; > + } >=20 > - rte_memcpy(hdr->buffer, > - &ipv4_spec->hdr, > - sizeof(ipv4_spec->hdr)); > + if (ipv4_mask->hdr.type_of_service =3D=3D > + UINT8_MAX) { > + input_set |=3D IAVF_INSET_IPV4_TOS; > + VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, > IPV4, > + DSCP); > + } > + > + if (ipv4_mask->hdr.next_proto_id =3D=3D UINT8_MAX) { > + input_set |=3D IAVF_INSET_IPV4_PROTO; > + VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, > IPV4, > + PROT); > + } > + > + if (ipv4_mask->hdr.time_to_live =3D=3D UINT8_MAX) { > + input_set |=3D IAVF_INSET_IPV4_TTL; > + VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, > IPV4, > + TTL); > + } > + > + if (ipv4_mask->hdr.src_addr =3D=3D UINT32_MAX) { > + input_set |=3D IAVF_INSET_IPV4_SRC; > + VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, > IPV4, > + SRC); > + } > + > + if (ipv4_mask->hdr.dst_addr =3D=3D UINT32_MAX) { > + input_set |=3D IAVF_INSET_IPV4_DST; > + VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, > IPV4, > + DST); > + } > + > + rte_memcpy(hdr->buffer, &ipv4_spec->hdr, > + sizeof(ipv4_spec->hdr)); > + > + hdrs->count =3D ++layer; > + > + /* only support any packet id for fragment IPv4 > + * any packet_id: > + * spec is 0, last is 0xffff, mask is 0xffff > + */ > + if (ipv4_last && ipv4_spec->hdr.packet_id =3D=3D 0 && > + ipv4_last->hdr.packet_id =3D=3D UINT16_MAX && > + ipv4_mask->hdr.packet_id =3D=3D UINT16_MAX && > + ipv4_mask->hdr.fragment_offset =3D=3D UINT16_MAX) { > + /* all IPv4 fragment packet has the same > + * ethertype, if the spec is for all valid > + * packet id, set ethertype into input set. > + */ > + input_set |=3D IAVF_INSET_ETHERTYPE; > + VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr1, > ETH, > + ETHERTYPE); > + > + /* add dummy header for IPv4 Fragment */ > + iavf_fdir_add_fragment_hdr(hdrs, layer); > + } else if (ipv4_mask->hdr.packet_id =3D=3D UINT16_MAX) { > + rte_flow_error_set(error, EINVAL, > + > RTE_FLOW_ERROR_TYPE_ITEM, > + item, "Invalid IPv4 mask."); > + return -rte_errno; > } >=20 > - filter->add_fltr.rule_cfg.proto_hdrs.count =3D ++layer; > break; >=20 > case RTE_FLOW_ITEM_TYPE_IPV6: > @@ -707,63 +787,109 @@ iavf_fdir_parse_pattern(__rte_unused struct > iavf_adapter *ad, > ipv6_spec =3D item->spec; > ipv6_mask =3D item->mask; >=20 > - hdr =3D &filter- > >add_fltr.rule_cfg.proto_hdrs.proto_hdr[layer]; > + hdr =3D &hdrs->proto_hdr[layer]; >=20 > VIRTCHNL_SET_PROTO_HDR_TYPE(hdr, IPV6); >=20 > - if (ipv6_spec && ipv6_mask) { > - if (ipv6_mask->hdr.payload_len) { > - rte_flow_error_set(error, EINVAL, > - > RTE_FLOW_ERROR_TYPE_ITEM, > - item, "Invalid IPv6 mask"); > - return -rte_errno; > - } > + if (!(ipv6_spec && ipv6_mask)) { > + hdrs->count =3D ++layer; > + break; > + } >=20 > - if ((ipv6_mask->hdr.vtc_flow & > - > rte_cpu_to_be_32(IAVF_IPV6_TC_MASK)) > - =3D=3D > rte_cpu_to_be_32(IAVF_IPV6_TC_MASK)) { > - input_set |=3D IAVF_INSET_IPV6_TC; > - > VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, IPV6, TC); > - } > - if (ipv6_mask->hdr.proto =3D=3D UINT8_MAX) { > - input_set |=3D > IAVF_INSET_IPV6_NEXT_HDR; > - > VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, IPV6, PROT); > - } > - if (ipv6_mask->hdr.hop_limits =3D=3D UINT8_MAX) > { > - input_set |=3D > IAVF_INSET_IPV6_HOP_LIMIT; > - > VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, IPV6, HOP_LIMIT); > - } > - if (!memcmp(ipv6_mask->hdr.src_addr, > - ipv6_addr_mask, > - RTE_DIM(ipv6_mask->hdr.src_addr))) { > - input_set |=3D IAVF_INSET_IPV6_SRC; > - > VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, IPV6, SRC); > - } > - if (!memcmp(ipv6_mask->hdr.dst_addr, > - ipv6_addr_mask, > - RTE_DIM(ipv6_mask->hdr.dst_addr))) > { > - input_set |=3D IAVF_INSET_IPV6_DST; > - > VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, IPV6, DST); > - } > + if (ipv6_mask->hdr.payload_len) { > + rte_flow_error_set(error, EINVAL, > + > RTE_FLOW_ERROR_TYPE_ITEM, > + item, "Invalid IPv6 mask"); > + return -rte_errno; > + } >=20 > - if (tun_inner) { > - input_set &=3D > ~IAVF_PROT_IPV6_OUTER; > - input_set |=3D IAVF_PROT_IPV6_INNER; > - } The same as ipv4. > + if ((ipv6_mask->hdr.vtc_flow & > + rte_cpu_to_be_32(IAVF_IPV6_TC_MASK)) > + =3D=3D rte_cpu_to_be_32(IAVF_IPV6_TC_MASK)) { > + input_set |=3D IAVF_INSET_IPV6_TC; > + VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, > IPV6, > + TC); > + } >=20 > - rte_memcpy(hdr->buffer, > - &ipv6_spec->hdr, > - sizeof(ipv6_spec->hdr)); > + if (ipv6_mask->hdr.proto =3D=3D UINT8_MAX) { > + input_set |=3D IAVF_INSET_IPV6_NEXT_HDR; > + VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, > IPV6, > + PROT); > + } > + > + if (ipv6_mask->hdr.hop_limits =3D=3D UINT8_MAX) { > + input_set |=3D IAVF_INSET_IPV6_HOP_LIMIT; > + VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, > IPV6, > + HOP_LIMIT); > + } > + > + if (!memcmp(ipv6_mask->hdr.src_addr, > ipv6_addr_mask, > + RTE_DIM(ipv6_mask->hdr.src_addr))) { > + input_set |=3D IAVF_INSET_IPV6_SRC; > + VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, > IPV6, > + SRC); > + } > + if (!memcmp(ipv6_mask->hdr.dst_addr, > ipv6_addr_mask, > + RTE_DIM(ipv6_mask->hdr.dst_addr))) { > + input_set |=3D IAVF_INSET_IPV6_DST; > + VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, > IPV6, > + DST); > + } > + > + rte_memcpy(hdr->buffer, &ipv6_spec->hdr, > + sizeof(ipv6_spec->hdr)); > + > + hdrs->count =3D ++layer; > + break; > + Skip... > @@ -84,6 +85,8 @@ > (IAVF_PROT_IPV4_OUTER | IAVF_IP_PROTO) #define > IAVF_INSET_IPV4_TTL \ > (IAVF_PROT_IPV4_OUTER | IAVF_IP_TTL) > +#define IAVF_INSET_IPV4_ID \ > + (IAVF_PROT_IPV4_OUTER | IAVF_IP_PKID) > #define IAVF_INSET_IPV6_SRC \ > (IAVF_PROT_IPV6_OUTER | IAVF_IP_SRC) > #define IAVF_INSET_IPV6_DST \ > @@ -94,6 +97,8 @@ > (IAVF_PROT_IPV6_OUTER | IAVF_IP_TTL) > #define IAVF_INSET_IPV6_TC \ > (IAVF_PROT_IPV6_OUTER | IAVF_IP_TOS) > +#define IAVF_INSET_IPV6_ID \ > + (IAVF_PROT_IPV6_OUTER | IAVF_IP_PKID) >=20 > #define IAVF_INSET_TUN_IPV4_SRC \ > (IAVF_PROT_IPV4_INNER | IAVF_IP_SRC) > -- > 2.20.1