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 49F99A0C41; Wed, 17 Nov 2021 09:57:59 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 33C2E407FF; Wed, 17 Nov 2021 09:57:59 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2074.outbound.protection.outlook.com [40.107.237.74]) by mails.dpdk.org (Postfix) with ESMTP id E432640040 for ; Wed, 17 Nov 2021 09:57:56 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b5OLWMKPUEYCQpA0oquGo25rS4sV4/BQ4z7yPieRi08BEa0vxrCK9aCpvTkbYwpjjX6w2gtR5Oklg2tVrx3AdAUZqF+8QKzKPpggWiBQUeJzLYQ5VCG9fPLLbTTlguTQET6IyTMpGOxWyoXKNM8/PYF7WWJlbv9RIXF0dbIPMJaPEzGL9+27EzBZxM/8u1238JA/izlw0pkg1JM37LB3HtvoG1qV6yHihB/5KUnyF3uaMwAPwcCGHSeJn4BDctz/9a4/r6tiPvBpUDB2vZJ1JBy+eL8GhWRbDNjeARxQwA88wYULO8rgByU1lw+PU108BGVDah24q1nlS6BOeCQ4gg== 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=cPTxT8VeVxNQyw4OdA78qLy/TVGgH7GgAv8C4P5/6+w=; b=OIbuIBhz8Tqzje4vkhYTqqXvmuG85Oqkx+Dzi2sspoGvovpMXQ5lg5Ed/b4PU7/4FAv1v8cON7Df8xpl+sjTEUS9Q1Ga5v3f8QFNXXwWS3rGC+UqxdELXyHkWFclDoSgQPbPB93qoscTGm+uGeiW7byJ9x1VIv6ThadSQSog82ODL8NgLi+uipEvzShayZbew99nOb8/ujRkB9OIJO+fTAxN1LGuVWjHWDrPr3IDVOYKRpY/jyMDjYeiK5G8PVhZrBImxCnCAe7vEtjU8w2ZNDyUVTyokLurJziSHwAtCLfr0XMs41vJGnkrffsi2z8eT4ANOi+uQPdwUFRyS3As6Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cPTxT8VeVxNQyw4OdA78qLy/TVGgH7GgAv8C4P5/6+w=; b=knBukQRc9sccFZFt9t7Dvu0uZ+3qJV46x1D0GfXSkKU5MapZPFuIjwwTUESKQLTxEq/1eLzb6iz8SXBvWcgsyz2TElamHPPMh2Xnp0bEWk5KRHcxEX+OTjQDChCwKha1r4cJHw+nbjfmylYpRdpLVNBIWHUak+xsxDY+QhqsL0W3fqyVV+iozaU5JBJmuinBTfHfkY9CCd5LWSwgP2kI2UWU58NaNCOuUZ64kJUJRA1azSjDyBkAEjHrYxGcoj774uOsRUp/xAdA/jxOaaZ4sCo6P7vTUWec65CWgv9MH7gpOB7SnAzgvsDhfqcM6frDMesYF+fKjCkCSqNRiuxi5g== Received: from BYAPR12MB2631.namprd12.prod.outlook.com (2603:10b6:a03:6b::22) by BY5PR12MB3682.namprd12.prod.outlook.com (2603:10b6:a03:195::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19; Wed, 17 Nov 2021 08:57:54 +0000 Received: from BYAPR12MB2631.namprd12.prod.outlook.com ([fe80::8508:89a5:d1f7:9050]) by BYAPR12MB2631.namprd12.prod.outlook.com ([fe80::8508:89a5:d1f7:9050%5]) with mapi id 15.20.4690.028; Wed, 17 Nov 2021 08:57:54 +0000 From: Gregory Etelson To: "dev@dpdk.org" , "ferruh.yigit@intel.com" CC: Matan Azrad , Raslan Darawsheh , NBU-Contact-Thomas Monjalon Subject: RE: [PATCH] app/testpmd: fix tunnel offload validation Thread-Topic: [PATCH] app/testpmd: fix tunnel offload validation Thread-Index: AQHXz+SfXLNT/LpeaU6/3+jKyApSzqwHgZNw Date: Wed, 17 Nov 2021 08:57:54 +0000 Message-ID: References: <20211102122421.4190-1-getelson@nvidia.com> In-Reply-To: <20211102122421.4190-1-getelson@nvidia.com> Accept-Language: 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=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e5768407-987e-4111-1b03-08d9a9a857d5 x-ms-traffictypediagnostic: BY5PR12MB3682: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: detvTK5qYTEk0JIEs3QWvYWVEGfYV7y/N5jComId3Fw1tMKMW2hLvnvVuk8GZS1uYd8hdWTYmbyaG3/paSimHoQy7tGu2CEdLcoSBAzQkf3wY7mgIxM8S5tcPZr3KxliIJJIKr9VtTaysCH86m1XmNQ9JiyIXsEdsx962OAt2cZkZWnM2FMOftTjTL4Fyh5LdZeL40OTbfEGngizcpRjfk28e403FxOz6zcGWdGMmY9szgAzWvTY1eAKxCE+OVuLuHj575Dde3zpLPp5hPON9bgR3Kyq+v6zet1fVLcLwoGkJEZIBq24EM82DQJGV3mOYVsad6ovFd9/G/GZknS8CUXzUUvBAdRmAIX/1550O7vQ5iwcp8KY+LWOwhoEBhbLdh18H4Cwqdls9BhbgmKPixILiXq28yobrr8kmr65ljt1F59b1zVXDXFRK/5GVWZ1klSg76gSan9WFaqp18L1vPFmt5+GzdoHzDt3lAdHWPrZjEE+iEsdO2DgxzWg1jWRzN2AEIgMZRJQPXWfb58rFP2kku8ah8OXbutFc6VivKV65a76ZiMP9Aqi5zEkXK63+/L57h3N18K/OoRBx+1Ny1i+bVPDp3l2mOL8KSj4nwsV5jkH8/Wh6LnUyDng/IH8dspDTh/TBV/NooQG5BRT6Ux1OyueaxKV4fQZy19++oLq70P4u7wHBl5N3tBrBIYtOOdeNWBe0DXVrRA/DjjkSw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR12MB2631.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(86362001)(110136005)(54906003)(2906002)(83380400001)(4326008)(316002)(38070700005)(26005)(66946007)(76116006)(66556008)(66446008)(66476007)(64756008)(71200400001)(33656002)(186003)(52536014)(508600001)(8676002)(9686003)(5660300002)(53546011)(6506007)(55016002)(38100700002)(122000001)(8936002)(7696005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?bIruDl8z1/v+Zgoy0Pwe+farYpK2vTEI9pAPa7ocV2/oE8LEvfe9wyaJiEwD?= =?us-ascii?Q?GJzRC310mOlL1gQQUG2FrWKIWE5f/BC9fiLse3kYinpa/cljAgrxkigastLY?= =?us-ascii?Q?Fq/R5anH7cMfkLovnCF8vLJuaDPs6WR2Bv1K4KqmPG2kslpXgtjUr42W+Y56?= =?us-ascii?Q?adbpFjjuRNfJtj/xPFm+H13Pora6UFpIyXtUCXGYPgrESn01M+aHL/nKh2uL?= =?us-ascii?Q?HohO6V/GgS2C/gDVvxMs2GnT1Bqp5t32o4x4yR0kzp6gy0JHwLZ8X2xaaKtr?= =?us-ascii?Q?1w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QQ1kZyCQRyorFeaov2X?= =?us-ascii?Q?eWt4Mivjst9j0O9gLroXtxSDYUYe3j+0x+ayQtyLX3o0KRWRFlvs5X8mcZGN?= =?us-ascii?Q?6hABLcMUXAkcDX5v0z75upRWz06+IYd3q8IwEzYqfcUXorPzAQe91gpuBCyb?= =?us-ascii?Q?G1ABrFx+aYRE0STzekKQUeRId0O3H3AD66iZsb1rmsxV1j7SKwdgL6EJvQPg?= =?us-ascii?Q?TMvdgBEzXF5jWVgia0CTQIDGiYl9tnRXVX78lHaZFf5cx0cxpGU+9jNoxvh7?= =?us-ascii?Q?7D0srUnwlcZG5oZNmldsgnO8cEXL4cV3iGg3J2Mo8Vr5A/S6ZM91PXIPpcJK?= =?us-ascii?Q?dU341c9zCb9U0LwFDba7I/FHrZiDuCHLiiLKgjogrZFIsffGalogPVo+bdJR?= =?us-ascii?Q?sOHdtOfD663O4sDG5j6ay554jhEdOByF7v+8IZE9qyGwyq8gMO+QYLFAejVC?= =?us-ascii?Q?v0Pqk3iWzl72PYIxsPxRWss=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR12MB2631.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e5768407-987e-4111-1b03-08d9a9a857d5 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Nov 2021 08:57:54.1450 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: khbxKJVHOxfnQUdvaURGBPo3a8EkE893Vlr/YBjK+tGkTg44YoeoBDYjb8BH8XVe1pokHM3wsWHeZzYdUA/3Uw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB3682 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 Hello Ferruh, Can you estimate when this patch will be merged into 21.11 ? Thank you. Regards, Gregory > -----Original Message----- > From: Gregory Etelson > Sent: Tuesday, November 2, 2021 14:24 > To: dev@dpdk.org; Gregory Etelson > > Cc: Matan Azrad ; Raslan > Darawsheh ; > stable@dpdk.org; Xiaoyun Li > > Subject: [PATCH] app/testpmd: fix tunnel offload > validation >=20 > Tunnel offload API allows application to restore > packet to > its original form if chain of flows missed after > DECAP action. > The main idea of the tunnel offload API was to > query port PMD > to provide flow elements - actions or items. > Flow elements supplied by PMD are merged with > original flow rule > elements provided by testpmd operator to > create a new flow rule, > optimal for PMD, to implement the tunnel > offload API. > That flow rule transformation is hidden form > testpmd operator and uses > internal testpmd resources. >=20 > Current testpmd did not release tunnel offload > resources if flow rule > validation failed. >=20 > The patch always releases tunnel offload > resources after flow rule > validation returns. >=20 > Cc: stable@dpdk.org >=20 > Fixes: 1b9f274623b8 ("app/testpmd: add > commands for tunnel offload") >=20 > Signed-off-by: Gregory Etelson > > --- > app/test-pmd/config.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) >=20 > diff --git a/app/test-pmd/config.c b/app/test- > pmd/config.c > index a18871d461..4870aaeba6 100644 > --- a/app/test-pmd/config.c > +++ b/app/test-pmd/config.c > @@ -2011,6 +2011,7 @@ > port_flow_validate(portid_t port_id, > struct rte_flow_error error; > struct port_flow_tunnel *pft =3D NULL; > struct rte_port *port; > + int ret; >=20 > if (port_id_is_invalid(port_id, > ENABLED_WARN) || > port_id =3D=3D (portid_t)RTE_PORT_ALL) > @@ -2037,10 +2038,11 @@ > port_flow_validate(portid_t port_id, > if (pft->actions) > actions =3D pft->actions; > } > - if (rte_flow_validate(port_id, attr, > pattern, actions, &error)) > - return > port_flow_complain(&error); > + ret =3D rte_flow_validate(port_id, attr, > pattern, actions, &error); > if (tunnel_ops->enabled) >=20 > port_flow_tunnel_offload_cmd_release( > port_id, tunnel_ops, pft); > + if (ret) > + return > port_flow_complain(&error); > printf("Flow rule validated\n"); > return 0; > } > -- > 2.33.1