From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8AE1BA0350; Tue, 30 Jun 2020 08:15:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D43681B952; Tue, 30 Jun 2020 08:15:43 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 5CC351B952 for ; Tue, 30 Jun 2020 08:15:40 +0200 (CEST) IronPort-SDR: q3AMK76dgJAcMrPQWbyqfXdbZd72UFrvu1G+Q80OpeygLIM24OaEuAEUCvaKqIvHTt40QWCjFs d+S8b0w4Qe9Q== X-IronPort-AV: E=McAfee;i="6000,8403,9666"; a="145228945" X-IronPort-AV: E=Sophos;i="5.75,296,1589266800"; d="scan'208";a="145228945" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2020 23:15:39 -0700 IronPort-SDR: BY9CwNoWUzdW6T5LOXAvTbK3gUhzeOFaQMzJ0MENROh8eNO3IIK5syfk63BMsJJ5dpD+ByhjgA 0eNCHki1g1uA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,296,1589266800"; d="scan'208";a="266393558" Received: from orsmsx106.amr.corp.intel.com ([10.22.225.133]) by fmsmga008.fm.intel.com with ESMTP; 29 Jun 2020 23:15:39 -0700 Received: from orsmsx162.amr.corp.intel.com (10.22.240.85) by ORSMSX106.amr.corp.intel.com (10.22.225.133) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 29 Jun 2020 23:15:38 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by ORSMSX162.amr.corp.intel.com (10.22.240.85) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 29 Jun 2020 23:15:38 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 29 Jun 2020 23:15:38 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iiR3cw4v94LRSvcb0zjmRFqpmuTbBHdNd8EZD/z8S9SYobZ7vEfArL531+JYQh8+45kHMlYfQtombOd3Ri5yiwimetKHHQkB7PvaKRmE/jNc0D4rMhdK3T8x7j4gPlRGgx2xQGyznzb3hoKSEHgKIw1n1NzM6/aQ6YtgVctnBFLYKI8UI4iG5BWSFY88ZfEodzS9GUTBLnLBu/IwL9rTe+ZD0KlG3087WVmnHvm6PQTnviZGgjfDkUfXkBNbZLH2vI2aD0qeGGSc3bUy7EM8v2zo7lOs1Oacz5cozzW0RZGriyrrVuVaUd7n09fibra5+UickD5ciNDu7Z9DMcMHcw== 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=hjVcd3mmVaPQcRInD/nxqWkpK8yuAhjb4BXTV6pFPTQ=; b=T52i+2/mUYHjLNNVAuqwvpHYYwKyKyJJI5hWyhMITUx2qVFv2QQIsEnOqvXwhus/a5Ng3Ih9/uGsftCXekUlLohIVZzkyCm5YfzGS/Wpro1TwRL9gkZvjWnqeKMo+2vGqyelnwCAUo+8/+cTuj1wCMDNCJn+DDIgpLKt1YGZkMhYfes3pNibUNg1WjbEYZ2GLjQa4z7cc/0/ZLU5TRadK4mTSu7iRCZJKiWtL2XelyR1D7Ul0JEKfvnVrenygBzY8p94hAuxcXdv0/4gc0WYOnhPoc6aHilBfJrQ1WG+lRwhJ+QdfCtsBakO0r4ixBbzfFBBl+rAS9xB47VpdhKjLg== 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=hjVcd3mmVaPQcRInD/nxqWkpK8yuAhjb4BXTV6pFPTQ=; b=PsXVgxA2X86rgrlfhxoVLVMWY3WHj5MB2oISLNMfgwrzUda76LSG6rGG4BhLNw/7utS3hVIOLxN8jt5lq8xHKcZ8f0sIgx5rQvTDuRCh18gmWjPHGWucoTYMg0Krfsnie6CGFrJtx3ec7Wwy/SjXP9TnKmbZ0RLBmxRhOnxW1gw= Received: from MN2PR11MB3807.namprd11.prod.outlook.com (2603:10b6:208:f0::24) by MN2PR11MB3680.namprd11.prod.outlook.com (2603:10b6:208:f3::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.23; Tue, 30 Jun 2020 06:15:36 +0000 Received: from MN2PR11MB3807.namprd11.prod.outlook.com ([fe80::401c:b4b:31c4:98b8]) by MN2PR11MB3807.namprd11.prod.outlook.com ([fe80::401c:b4b:31c4:98b8%3]) with mapi id 15.20.3131.028; Tue, 30 Jun 2020 06:15:36 +0000 From: "Xing, Beilei" To: "Sun, GuinanX" , "dev@dpdk.org" CC: "Guo, Jia" Thread-Topic: [PATCH v2] net/i40e: enable port filter by switch filter Thread-Index: AQHWTpn8Vb0OpJT5SU2HfI3AH+HEu6jwnD/Q Date: Tue, 30 Jun 2020 06:15:36 +0000 Message-ID: References: <20200611052416.14592-1-guinanx.sun@intel.com> <20200630044205.54900-1-guinanx.sun@intel.com> In-Reply-To: <20200630044205.54900-1-guinanx.sun@intel.com> Accept-Language: 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.45] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d2966ddc-c85b-4ff5-a7bf-08d81cbd0112 x-ms-traffictypediagnostic: MN2PR11MB3680: 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:3276; x-forefront-prvs: 0450A714CB x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: RV8g0sfT40xvlHz6rnBEfjyXt4Lt1pJBWBASpUGLJDzJBbVRh8B3tu+Bk0t7sK5GDUMM98BS+BTv586bZkVoRey42pPPk2y65nqsM7U555qlXSW1WFaaBEbtWwRbJc5KzMTSl+iRORUjYVaIjJdrtEEl/lQYLS3O1HzIxs7+Me/cuq8oz9yIt03XgcV/rfBt8NPkV6at/EPYj896Rab8v4mb1fIkUdRNjVeuMhdjd5Krg9hFZVT6dg0K8vmaJCojSOs62EiP2SAx+8NwhEezUQXDc6OPH261nOd4N6DKJr3uDWvjaJKUKX/QSzJEByV//ZojsZfKdhylBQ+SXGfzrFA1tRti+Y5QPAgeGC/wB2CF2EGTiJskcNPjYc4P1ZvksvQlorMGs5PiXd06s9KGLA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB3807.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(346002)(376002)(366004)(396003)(136003)(39860400002)(478600001)(71200400001)(26005)(7696005)(9686003)(107886003)(6506007)(66446008)(55016002)(316002)(30864003)(53546011)(8676002)(110136005)(83380400001)(2906002)(4326008)(8936002)(186003)(5660300002)(966005)(33656002)(86362001)(66946007)(66476007)(66556008)(64756008)(52536014)(76116006); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: 67HRQFYnvZX387+eywzRjBX4OFaxFolnmaWnZvvUayKiI6K55YaRaY9XANLuuANV6gN/EDEQIeV345nDXKZCEyoulJ/XN5yS2m97yK60pmC5sH8wQOfk9DoLvzGUfKXGwrC9xVYo9gw1l3AErxko0RlhpI9WHXGvOHE/8udFPlGb7MizBXVEdFgmmlxb8aUA4aiskD7oPNoHf7osrQg+3Xl47vgzcm+iz3rwHcLt7S8dW65XapG59JaooP5NsD6WspH3SGug2j7CAqyQ23sYI4Cs1addljW3gu0ev3BAvZXVZjuFCIfEWVEwgktq0kIvjjfKoS5124UndUynCrB7jctH1nZHTIxLjB6VyhQIn/Ma+tBkUf7xzff+C9+aMEqNfuzSco5rSRWO7sIma+H+8JgsAz3ogk0RwQtsYU4we66RKU7YAZ38o6fh/PVbgheRroMRXulINaC+9Fyp9/VPf6POyE9cBBmo7hFoq2ADoJuyUvzzb7Q2ykbOCHSrSnts 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: MN2PR11MB3807.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d2966ddc-c85b-4ff5-a7bf-08d81cbd0112 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Jun 2020 06:15:36.3512 (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: WjLUYlAfN5cLjEw4Kd+dTdzK1jrfLmkxRLThB5Duj8nrBIx1RF2EZiesyb8qy4mq9HvwrycmN66Aaf161y+P6A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3680 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2] net/i40e: enable port filter by switch filter X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" > -----Original Message----- > From: Sun, GuinanX > Sent: Tuesday, June 30, 2020 12:42 PM > To: dev@dpdk.org > Cc: Xing, Beilei ; Guo, Jia ; S= un, > GuinanX > Subject: [PATCH v2] net/i40e: enable port filter by switch filter How about 'support cloud filter with l4 port'? Please also fix all the warnings in patchwork: http://mails.dpdk.org/archiv= es/test-report/2020-June/139555.html. >=20 > This patch enables the filter that supports to create following two rules= for > the same packet type: Better to clarify which packet types will be supported. > One is to select source port only as input set and the other is for desti= nation > port only. >=20 > Signed-off-by: Guinan Sun > --- > v2: > * Fixed code style and variable naming > --- > doc/guides/rel_notes/release_20_08.rst | 8 + > drivers/net/i40e/i40e_ethdev.c | 195 ++++++++++++++++++++- > drivers/net/i40e/i40e_ethdev.h | 17 ++ > drivers/net/i40e/i40e_flow.c | 223 +++++++++++++++++++++++++ > 4 files changed, 442 insertions(+), 1 deletion(-) >=20 > diff --git a/doc/guides/rel_notes/release_20_08.rst > b/doc/guides/rel_notes/release_20_08.rst > index 3c40424cc..c4d094eac 100644 > --- a/doc/guides/rel_notes/release_20_08.rst > +++ b/doc/guides/rel_notes/release_20_08.rst > @@ -87,6 +87,14 @@ New Features >=20 > * Added support for DCF datapath configuration. >=20 > +* **Updated Intel i40e driver.** > + > + Updated i40e PMD with new features and improvements, including: > + > + * Added a new type of cloud filter to support the coexistence of the > + following two rules. One selects L4 destination as input set and L4 destination port > + the other one selects L4 source port. > + BTW, replace filter is used for the patch, so which protocol is impacted wi= th this change? e.g. If using this feature, can cloud filter for vxlan work well? If there's any impact, please add the limitation in the doc. > Removed Items > ------------- >=20 > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethde= v.c > index 970a31cb2..cea7f6b59 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -7956,6 +7956,13 @@ i40e_dev_tunnel_filter_set(struct i40e_pf *pf, > #define I40E_TR_GRE_KEY_MASK 0x400 > #define I40E_TR_GRE_KEY_WITH_XSUM_MASK 0x800 > #define I40E_TR_GRE_NO_KEY_MASK 0x8000 > +#define I40E_AQC_REPLACE_CLOUD_CMD_INPUT_PORT_TR_WORD0 0x49 > #define > +I40E_AQC_REPLACE_CLOUD_CMD_INPUT_DIRECTION_WORD0 0x41 > #define > +I40E_AQC_REPLACE_CLOUD_CMD_INPUT_INGRESS_WORD0 0x80 > +#define I40E_DIRECTION_INGRESS_KEY 0x8000 > +#define I40E_TR_L4_TYPE_TCP 0x2 > +#define I40E_TR_L4_TYPE_UDP 0x4 > +#define I40E_TR_L4_TYPE_SCTP 0x8 >=20 > static enum > i40e_status_code i40e_replace_mpls_l1_filter(struct i40e_pf *pf) @@ - > 8254,6 +8261,131 @@ i40e_status_code i40e_replace_gtp_cloud_filter(struct > i40e_pf *pf) > return status; > } >=20 > +static enum i40e_status_code > +i40e_replace_port_l1_filter(struct i40e_pf *pf, enum i40e_l4_port_type > +l4_port_type) { > + struct i40e_aqc_replace_cloud_filters_cmd_buf filter_replace_buf; > + struct i40e_aqc_replace_cloud_filters_cmd filter_replace; > + enum i40e_status_code status =3D I40E_SUCCESS; > + struct i40e_hw *hw =3D I40E_PF_TO_HW(pf); > + struct rte_eth_dev *dev =3D ((struct i40e_adapter *)hw->back)- > >eth_dev; > + > + if (pf->support_multi_driver) { > + PMD_DRV_LOG(ERR, "Replace l1 filter is not supported."); > + return I40E_NOT_SUPPORTED; > + } > + > + memset(&filter_replace, 0, > + sizeof(struct i40e_aqc_replace_cloud_filters_cmd)); > + memset(&filter_replace_buf, 0, > + sizeof(struct i40e_aqc_replace_cloud_filters_cmd_buf)); > + > + /* create L1 filter */ > + if (l4_port_type =3D=3D I40E_L4_PORT_TYPE_SRC) { > + filter_replace.old_filter_type =3D > + > I40E_AQC_REPLACE_CLOUD_CMD_INPUT_FV_TUNNLE_KEY; > + filter_replace.new_filter_type =3D > I40E_AQC_ADD_CLOUD_FILTER_0X11; To create L1 filter, so should be I40E_AQC_ADD_L1_FILTER_0X11 here? > + filter_replace_buf.data[8] =3D > + > I40E_AQC_REPLACE_CLOUD_CMD_INPUT_FV_SRC_PORT; > + } else { > + filter_replace.old_filter_type =3D > + > I40E_AQC_REPLACE_CLOUD_CMD_INPUT_FV_STAG_IVLAN; > + filter_replace.new_filter_type =3D > I40E_AQC_ADD_CLOUD_FILTER_0X10; Same as above. > + filter_replace_buf.data[8] =3D > + > I40E_AQC_REPLACE_CLOUD_CMD_INPUT_FV_DST_PORT; > + } > + > + filter_replace.tr_bit =3D 0; > + /* Prepare the buffer, 3 entries */ > + filter_replace_buf.data[0] =3D > + > I40E_AQC_REPLACE_CLOUD_CMD_INPUT_DIRECTION_WORD0; > + filter_replace_buf.data[0] |=3D > + I40E_AQC_REPLACE_CLOUD_CMD_INPUT_VALIDATED; > + filter_replace_buf.data[2] =3D 0x00; > + filter_replace_buf.data[3] =3D > + I40E_AQC_REPLACE_CLOUD_CMD_INPUT_INGRESS_WORD0; > + filter_replace_buf.data[4] =3D > + I40E_AQC_REPLACE_CLOUD_CMD_INPUT_PORT_TR_WORD0; > + filter_replace_buf.data[4] |=3D > + I40E_AQC_REPLACE_CLOUD_CMD_INPUT_VALIDATED; > + filter_replace_buf.data[5] =3D 0x00; > + filter_replace_buf.data[6] =3D I40E_TR_L4_TYPE_UDP | > + I40E_TR_L4_TYPE_TCP | > + I40E_TR_L4_TYPE_SCTP; > + filter_replace_buf.data[7] =3D 0x00; > + filter_replace_buf.data[8] |=3D > + I40E_AQC_REPLACE_CLOUD_CMD_INPUT_VALIDATED; > + filter_replace_buf.data[9] =3D 0x00; > + filter_replace_buf.data[10] =3D 0xFF; > + filter_replace_buf.data[11] =3D 0xFF; > + > + status =3D i40e_aq_replace_cloud_filters(hw, &filter_replace, > + &filter_replace_buf); > + if (!status && (filter_replace.old_filter_type !=3D > + filter_replace.new_filter_type)) > + PMD_DRV_LOG(WARNING, "i40e device %s changed cloud l1 > type." > + " original: 0x%x, new: 0x%x", > + dev->device->name, > + filter_replace.old_filter_type, > + filter_replace.new_filter_type); > + > + return status; > +} > + > +static enum > +i40e_status_code i40e_replace_port_cloud_filter(struct i40e_pf *pf, > + enum i40e_l4_port_type > l4_port_type) { > + struct i40e_aqc_replace_cloud_filters_cmd_buf filter_replace_buf; > + struct i40e_aqc_replace_cloud_filters_cmd filter_replace; > + enum i40e_status_code status =3D I40E_SUCCESS; > + struct i40e_hw *hw =3D I40E_PF_TO_HW(pf); > + struct rte_eth_dev *dev =3D ((struct i40e_adapter *)hw->back)- > >eth_dev; > + > + if (pf->support_multi_driver) { > + PMD_DRV_LOG(ERR, "Replace cloud filter is not supported."); > + return I40E_NOT_SUPPORTED; > + } > + > + memset(&filter_replace, 0, > + sizeof(struct i40e_aqc_replace_cloud_filters_cmd)); > + memset(&filter_replace_buf, 0, > + sizeof(struct i40e_aqc_replace_cloud_filters_cmd_buf)); > + > + if (l4_port_type =3D=3D I40E_L4_PORT_TYPE_SRC) { > + filter_replace.old_filter_type =3D > I40E_AQC_ADD_CLOUD_FILTER_IIP; > + filter_replace.new_filter_type =3D > + I40E_AQC_ADD_L1_FILTER_0X11; > + filter_replace_buf.data[4] =3D > I40E_AQC_ADD_CLOUD_FILTER_0X11; > + } else { > + filter_replace.old_filter_type =3D > I40E_AQC_ADD_CLOUD_FILTER_OIP; > + filter_replace.new_filter_type =3D > + I40E_AQC_ADD_CLOUD_FILTER_0X10; > + filter_replace_buf.data[4] =3D > I40E_AQC_ADD_CLOUD_FILTER_0X10; > + } > + > + filter_replace.valid_flags =3D I40E_AQC_REPLACE_CLOUD_FILTER; > + filter_replace.tr_bit =3D 0; > + /* Prepare the buffer, 2 entries */ > + filter_replace_buf.data[0] =3D > I40E_AQC_REPLACE_CLOUD_CMD_INPUT_FV_STAG; > + filter_replace_buf.data[0] |=3D > + I40E_AQC_REPLACE_CLOUD_CMD_INPUT_VALIDATED; > + filter_replace_buf.data[4] |=3D > + I40E_AQC_REPLACE_CLOUD_CMD_INPUT_VALIDATED; > + status =3D i40e_aq_replace_cloud_filters(hw, &filter_replace, > + &filter_replace_buf); > + > + if (!status && (filter_replace.old_filter_type !=3D > + filter_replace.new_filter_type)) > + PMD_DRV_LOG(WARNING, "i40e device %s changed cloud > filter type." > + " original: 0x%x, new: 0x%x", > + dev->device->name, > + filter_replace.old_filter_type, > + filter_replace.new_filter_type); > + > + return status; > +} > + > int > i40e_dev_consistent_tunnel_filter_set(struct i40e_pf *pf, > struct i40e_tunnel_filter_conf *tunnel_filter, @@ -8401,6 > +8533,58 @@ i40e_dev_consistent_tunnel_filter_set(struct i40e_pf *pf, > pfilter->general_fields[0] =3D tunnel_filter->inner_vlan; > pfilter->general_fields[1] =3D tunnel_filter->outer_vlan; > big_buffer =3D 1; > + break; > + case I40E_TUNNEL_TYPE_UDP: > + case I40E_TUNNEL_TYPE_TCP: > + case I40E_TUNNEL_TYPE_SCTP: What's the tunnel_type_udp/tcp/sctp? It's not for tunnel, just normal UDP/T= CP/SCTP.=20 > + if (tunnel_filter->l4_port_type =3D=3D I40E_L4_PORT_TYPE_SRC) { > + if (!pf->sport_replace_flag) { > + i40e_replace_port_l1_filter(pf, tunnel_filter- > >l4_port_type); > + i40e_replace_port_cloud_filter(pf, > tunnel_filter->l4_port_type); > + pf->sport_replace_flag =3D 1; > + } > + teid_le =3D rte_cpu_to_le_32(tunnel_filter->tenant_id); > + pfilter- > >general_fields[I40E_AQC_ADD_CLOUD_FV_FLU_0X11_WORD0] =3D > + I40E_DIRECTION_INGRESS_KEY; > + > + if (tunnel_filter->tunnel_type =3D=3D > I40E_TUNNEL_TYPE_UDP) > + pfilter- > >general_fields[I40E_AQC_ADD_CLOUD_FV_FLU_0X11_WORD1] =3D > + I40E_TR_L4_TYPE_UDP; > + else if (tunnel_filter->tunnel_type =3D=3D > I40E_TUNNEL_TYPE_TCP) > + pfilter- > >general_fields[I40E_AQC_ADD_CLOUD_FV_FLU_0X11_WORD1] =3D > + I40E_TR_L4_TYPE_TCP; > + else > + pfilter- > >general_fields[I40E_AQC_ADD_CLOUD_FV_FLU_0X11_WORD1] =3D > + I40E_TR_L4_TYPE_SCTP; > + > + pfilter- > >general_fields[I40E_AQC_ADD_CLOUD_FV_FLU_0X11_WORD2] =3D > + (teid_le >> 16) & 0xFFFF; > + big_buffer =3D 1; > + } else { > + if (!pf->dport_replace_flag) { > + i40e_replace_port_l1_filter(pf, tunnel_filter- > >l4_port_type); > + i40e_replace_port_cloud_filter(pf, > tunnel_filter->l4_port_type); > + pf->dport_replace_flag =3D 1; > + } > + teid_le =3D rte_cpu_to_le_32(tunnel_filter->tenant_id); > + pfilter- > >general_fields[I40E_AQC_ADD_CLOUD_FV_FLU_0X10_WORD0] =3D > + I40E_DIRECTION_INGRESS_KEY; > + > + if (tunnel_filter->tunnel_type =3D=3D > I40E_TUNNEL_TYPE_UDP) > + pfilter- > >general_fields[I40E_AQC_ADD_CLOUD_FV_FLU_0X10_WORD1] =3D > + I40E_TR_L4_TYPE_UDP; > + else if (tunnel_filter->tunnel_type =3D=3D > I40E_TUNNEL_TYPE_TCP) > + pfilter- > >general_fields[I40E_AQC_ADD_CLOUD_FV_FLU_0X10_WORD1] =3D > + I40E_TR_L4_TYPE_TCP; > + else > + pfilter- > >general_fields[I40E_AQC_ADD_CLOUD_FV_FLU_0X10_WORD1] =3D > + I40E_TR_L4_TYPE_SCTP; > + > + pfilter- > >general_fields[I40E_AQC_ADD_CLOUD_FV_FLU_0X10_WORD2] =3D > + (teid_le >> 16) & 0xFFFF; > + big_buffer =3D 1; > + } > + > break; > default: > /* Other tunnel types is not supported. */ @@ -8424,7 > +8608,16 @@ i40e_dev_consistent_tunnel_filter_set(struct i40e_pf *pf, > else if (tunnel_filter->tunnel_type =3D=3D I40E_TUNNEL_TYPE_QINQ) > pfilter->element.flags |=3D > I40E_AQC_ADD_CLOUD_FILTER_0X10; > - else { > + else if (tunnel_filter->tunnel_type =3D=3D I40E_TUNNEL_TYPE_UDP || > + tunnel_filter->tunnel_type =3D=3D I40E_TUNNEL_TYPE_TCP || > + tunnel_filter->tunnel_type =3D=3D I40E_TUNNEL_TYPE_SCTP) { > + if (tunnel_filter->l4_port_type =3D=3D I40E_L4_PORT_TYPE_SRC) > + pfilter->element.flags |=3D > + I40E_AQC_ADD_L1_FILTER_0X11; > + else > + pfilter->element.flags |=3D > + I40E_AQC_ADD_CLOUD_FILTER_0X10; > + } else { > val =3D i40e_dev_get_filter_type(tunnel_filter->filter_type, > &pfilter->element.flags); > if (val < 0) { > diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethde= v.h > index e5d0ce53f..56955068b 100644 > --- a/drivers/net/i40e/i40e_ethdev.h > +++ b/drivers/net/i40e/i40e_ethdev.h > @@ -767,6 +767,8 @@ struct i40e_rss_pattern_info { >=20 > #define I40E_AQC_REPLACE_CLOUD_CMD_INPUT_FV_TEID_WORD0 44 > #define I40E_AQC_REPLACE_CLOUD_CMD_INPUT_FV_TEID_WORD1 45 > +#define I40E_AQC_REPLACE_CLOUD_CMD_INPUT_FV_SRC_PORT 29 #define > +I40E_AQC_REPLACE_CLOUD_CMD_INPUT_FV_DST_PORT 30 > #define I40E_AQC_ADD_CLOUD_TNL_TYPE_MPLSOUDP 8 > #define I40E_AQC_ADD_CLOUD_TNL_TYPE_MPLSOGRE 9 > #define I40E_AQC_ADD_CLOUD_FILTER_0X10 0x10 > @@ -828,9 +830,20 @@ enum i40e_tunnel_type { > I40E_TUNNEL_TYPE_GTPU, > I40E_TUNNEL_TYPE_ESPoUDP, > I40E_TUNNEL_TYPE_ESPoIP, > + I40E_TUNNEL_TYPE_UDP, > + I40E_TUNNEL_TYPE_TCP, > + I40E_TUNNEL_TYPE_SCTP, the macro name should be changed. > I40E_TUNNEL_TYPE_MAX, > }; >=20 > +/** > + * L4 port type. > + */ > +enum i40e_l4_port_type { > + I40E_L4_PORT_TYPE_SRC =3D 0, > + I40E_L4_PORT_TYPE_DST, > +}; > + ...