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 A51E742EA6; Tue, 18 Jul 2023 11:02:01 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3634C410D3; Tue, 18 Jul 2023 11:02:01 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2073.outbound.protection.outlook.com [40.107.243.73]) by mails.dpdk.org (Postfix) with ESMTP id B949240A84; Tue, 18 Jul 2023 11:01:59 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cHgB17Z0b6XrIld6q06B6HvJpJ1DNLSAuCtAZbFXRJtw0KTAGa/U2lPRfxBfVMUwVqy9RXMvSaGr85WZL4cvOp7jnBnyNyVfHf+dOALAE7jp1HdmvhfgseUoM2ibpkLIQSUNrmZJVLUzvZnpy2baysCFWDRtuF7KwREAxE24Z8rTXBRJQnoDDXtfLelDRPE5buheXClZk1LDnsB+FZCl9crZB3i4JefPKoDeni2+UYXteZcuX6oH3gsUZrAzYQJ2MxABMB2CIeWtbtFyrDsSWmXKgUvb8yVPnnBl6XimMjlPcCxduD9BCtoVPFfQUYcn6aVhnHqPpxQplZB10Asx5w== 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=Y6Da7d6QHrZatPkSt+GUu5T3tvVORqv7N3uXVhHrbHU=; b=cvGmH5gmORy/Lcock/J+YmnVEjOj4Yw/rvMIGkiDrtx3/KKLxcytzb3EFYdYjuhUtn3YmCnLL2yquVTkk6jxtfydMNOBG2DoBYSbJPHcc1OfjC8Zda2R00ql9rFYUaVR8oPw9miL+qRMe1mCsjqBNkaOVnN+QSsEsOGoXo3ZA5yKmC32JtupeyL5KiNfvrtsFukGs0fTirGj8VNTg7QXuBZw2yzxNTTnB8/wxf0AR2oUc8ufVOqHFE/mxG98IRyZXz72xBCpjU/DHrVa8gL3U92KSnoN/k+6IZYQABOKjpplyFN7q1v0imc08UWU2D3Glc6wsUOzhBUAR0ESZoysSQ== 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=Y6Da7d6QHrZatPkSt+GUu5T3tvVORqv7N3uXVhHrbHU=; b=ffRR/wGELCACcQ97s4KQdQg/dWgrZWCH2FBce2ZAzwXnmF/M59JdY6uao3eS+onz4lhXZ34gJUbD7QEQGNMFtEujAGdLKYrSsXa4GNNZmRajn++VPFywaxsaWkIUj7pRo7ODUvcfHZ/dpJ7c3FGl80TafyZ11ocfadD3/LUls+l9KCkMsYXzeO5Y99F6T8+9z7EiQOvyyeHM/oyMgVh7eKCfSvZMv3UyAPE0ZVPNJ3WzXBmiiBUCi59nbJqtohqGzXKsjSFIzvB0QRAjVlIZl8MP94SQE+0GyPImIbwIIusw2x+3EaADHH+UqYSiUGajHL7W1DQgKDC39ChDCNzKYA== Received: from CO6PR12MB5396.namprd12.prod.outlook.com (2603:10b6:303:139::8) by MN2PR12MB4407.namprd12.prod.outlook.com (2603:10b6:208:260::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.32; Tue, 18 Jul 2023 09:01:56 +0000 Received: from CO6PR12MB5396.namprd12.prod.outlook.com ([fe80::ed42:1df6:934f:2435]) by CO6PR12MB5396.namprd12.prod.outlook.com ([fe80::ed42:1df6:934f:2435%7]) with mapi id 15.20.6588.031; Tue, 18 Jul 2023 09:01:56 +0000 From: Suanming Mou To: Alexander Kozyrev , "dev@dpdk.org" CC: "stable@dpdk.org" , Raslan Darawsheh , Slava Ovsiienko , Matan Azrad , Bing Zhao Subject: RE: [PATCH 1/3] net/mlx5: fix validation for conntrack indirect action Thread-Topic: [PATCH 1/3] net/mlx5: fix validation for conntrack indirect action Thread-Index: AQHZtAtZrrwZvYjqlE2meBs9CE1ymK+/RHZQ Date: Tue, 18 Jul 2023 09:01:56 +0000 Message-ID: References: <20230711152044.3141138-1-akozyrev@nvidia.com> In-Reply-To: <20230711152044.3141138-1-akozyrev@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-traffictypediagnostic: CO6PR12MB5396:EE_|MN2PR12MB4407:EE_ x-ms-office365-filtering-correlation-id: 153a1feb-e48e-4b51-6d1b-08db876da329 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: O9bhJgig5Yf8la0GNIerW/B7RuuwWv8WMcxyLJFHEllo3fO6XrhkFsTpc/0ivODCHSOjR76z5+4Iajq1KfZLTPjs8MIwEpDtP0woKkoOVBSEUMBx+opXVFH5qndSuxbR7qOdgXprzOiMsrCNaZ/V9GBcSqRpKKCC9kUJXgK5vfojxQRivz3/9eAwgBrcf0kbU28UHbA0qTqOcS8lw6I9DSScvZwLKWIWVT8nQT+IINv0TDKjOPY01lQGomLVgt3vAm0xYzR3Asw7b/bLrMT4o8WTqPHT70c3sip2QZZrrAkqEJd3uSeKzUnP9G0OBJg3f1PMG1SQ0yearqVBe/7ZSXGa732Ys0zT1XB1iL+ScDRuFnRaJXzslJQUbgnKpEr1yloA/lOUuI/q6RQyoTI7ngfMmG3ipx8frXVh9bX2E6Q5Od1NF9V2vyte1R5ZLQh8wA3Jl7d1hspVjiFpDZUkei/vKCSeR062gdUaxOSlFxt5rgrKO2Ig61nI7cSOgycFK6qzdZXCY6m+qu7bYHZjyllM2Dz51FP/fXL08Bvp1lTEJ7OV+D5BOvz1blNqgMxeRYokbmXVsxYpJ3JzUOp4yu2sVtJ9oKBN0YyaIevz1lKNVNLzco3O/P21E60vB4qD x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR12MB5396.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(39860400002)(396003)(376002)(346002)(136003)(366004)(451199021)(71200400001)(107886003)(33656002)(6506007)(83380400001)(38100700002)(186003)(26005)(55016003)(478600001)(110136005)(38070700005)(53546011)(54906003)(66476007)(8676002)(41300700001)(7696005)(66446008)(2906002)(8936002)(66556008)(66946007)(316002)(4326008)(52536014)(5660300002)(64756008)(9686003)(450100002)(86362001)(122000001)(76116006); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Q8CxETpQAGb20x7f2zJKrUYkoH9NxcjwyylJ2fvsuyN77IyMmYBGIA0bNV9p?= =?us-ascii?Q?UPg66ahNoY7zUcQuCUTb4xlnh4JckChixIL44XxQR097DZdGn+EY/SXjOKzo?= =?us-ascii?Q?dAIXzgTyv2tP1e0PCCVDffKb3/lpdXF/m1nJDYGAmT3AzTyriXrJ1kydy9bj?= =?us-ascii?Q?Y3UWSLG2ntQbldrgqs56SwYwd1G2feWkzhmqYchusTxTwzf3vng/dl2bzwMU?= =?us-ascii?Q?n8y74nhk3RQBk8LIvH3sXVTjRifwK8H9DRtVCsxILcBryxOdS0kjc2nY6swq?= =?us-ascii?Q?YEsEsuy79AEMtuczeMsBJa/BBWkYi3OwPbVfiJVx5t+nzTLkAlG8hwi3prgj?= =?us-ascii?Q?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QPax0oFTIR?= =?us-ascii?Q?Q2M+pa0A2DLIBxQJxGtfYZ2zU12Q5AJF/l4UzdjrEMQoukq+hWaGCadR1zpJ?= =?us-ascii?Q?V7TtwzTjLfJ6lID+KBgnpfBvLI7Y1KVwidYHjhv6RoFPBq1dqx9Y9hfMfMe1?= =?us-ascii?Q?gwtP8eHpyWCEsiRwR9vpfbYkJXotQ51UoqQdrlvmZUaUeT2HbcfAmzZSRCxk?= =?us-ascii?Q?TAU9SuXlIasa80fcHujOrTIjpUSQQQwST1srtiKBVpKZjJhJxt/mfIRVgdBY?= =?us-ascii?Q?0j3aQdKMKKSZXWvHsXffoyHYKcZRPapjkhe8LhKimKBhEMcvFgRP3BRP0aVX?= =?us-ascii?Q?jUv9M4FC+ZAnB+2T+7CHaCA37L0d0ac0zFRnDZoG?= 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: CO6PR12MB5396.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 153a1feb-e48e-4b51-6d1b-08db876da329 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jul 2023 09:01:56.1310 (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: 3l1+Wytqb5v+L9Be63fWfmV9MSJwkjX03WX1cLEScPu/IcnQjSJysLVooXVJDPPHzFI5cJ8W1v6sMD4wUtZGWg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4407 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 Hi, > -----Original Message----- > From: Alexander Kozyrev > Sent: Tuesday, July 11, 2023 11:21 PM > To: dev@dpdk.org > Cc: stable@dpdk.org; Raslan Darawsheh ; Slava Ovsiien= ko > ; Matan Azrad ; Bing Zhao > > Subject: [PATCH 1/3] net/mlx5: fix validation for conntrack indirect acti= on >=20 > From: Bing Zhao >=20 > After rte_flow_shared_action_* API was replaced with > rte_flow_action_handle_* API, one input parameter of the update interface= was > also changed. A generic pointer was used instead of the "const struct > rte_flow_action *" pointer. >=20 > In the entrance of mlx5 PMD callback for update, the validation is called= for all > indirect actions. But for conntrack type, the pointer is no longer with > rte_flow_action pointer type and it will cause an incorrect casting and e= rror. >=20 > The content for updating should only be validated when needed. It should = skip the > validation in the entrance. Right now, the content was already added befo= re > updating the hardware by WQE. So the type of the indirect action should b= e > checked before calling the action validate function. >=20 > When creating a new conntrack object, the validation is still needed sinc= e all the > content will be used to update the hardware context. >=20 > Fixes: 40327aab1491 ("ethdev: introduce indirect flow action") >=20 > Signed-off-by: Bing Zhao Acked-by: Suanming Mou