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 7D57042DE6; Thu, 6 Jul 2023 11:59:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 05F12410FA; Thu, 6 Jul 2023 11:59:16 +0200 (CEST) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2064.outbound.protection.outlook.com [40.107.101.64]) by mails.dpdk.org (Postfix) with ESMTP id EB58440A79 for ; Thu, 6 Jul 2023 11:59:13 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h8t+x6HApHPVd3gQDR7Fy1/dvxRyDeZK3PMX4zauOHLNKzdCwgPddiQPNSNvbDFJakk2uoKyjp3a6cCoo97XUg0r+U6Vd90mvuEQM1cNgU0pPDafwJlzFja0EX4zD5RJH5P9WMFHZkKMb4CzXptWmvpEaDO/5VgDTSRR+DtBsJHEXgRuYX/T9wNdVcAAurkSXYfBeffmW4FLpoag5hmWxyBs01LIxxjLqC6GZQMS86xngt1OoynqE4bPIkOFr9u6ZSbSBIxuWD53InPS8ZRoW+KkD28HfDNnSL+Fp0xrYITnuNcLR6VJbxAWJfGF3S6ZaCe5aQ3eSbx3SQCpon7ZEw== 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=RmRD/XWhHaYhM0HDb35MicnKlxMmaIgQ8oICamj/I1U=; b=jnZfgpKRvM0l2b5gE+y6QWNSqsyDKYcxihRt2iEpbrb3eocsh/Kx11v72lr8oULuh10oC2HtVzKQzwzx3Wne+bY8UAGr+FPJNisXrHNeuhzDFuDbXLmHNUIfi0caLG7VrYobxARdjHTkSmX5EL33pZ0JNY8mfvOyqmyoiKx4RlI0sarDyd11qOqxd236IHuW3lgrT725tw8CJJbg8Y9czBWKzZMW/cCrFDcAoMGgHXW8aNJs6EYMOJOLPWfGL4/OrWn9Op3q9QR1dl8UWiF1a1YMpPbD9GamkX91Ih5gfipkXTRkDs+HyW0nEY1HSxOA5aX7SnBPEVs3fMcuCq/0cA== 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=RmRD/XWhHaYhM0HDb35MicnKlxMmaIgQ8oICamj/I1U=; b=rIOXQYwmmm1Xu5RChNQQip9/eBBUpRjH4+rOEctTBUCJoCzOgwaGJ6bO9IzPhjzwCln8okpcq+GEIYZi7B68fVoah4KniBnHbWgob+QOy9KfemyBNkxAbfGunXDxDGg/E5ffVKN9TamNyuaefcqfOWy7QCjBJrZOfgQQUVkFz5KI6+izbyzJiOHGHUpR09DyAdzXd1PpMsDIDkLrV0lmj4Of3rT97shP7bj++WL2J6yRvLgoqfJ3fNsgiMJZEp8W9pWCK3PRIJxzXJXHGnv+ohoQPVDahl64cY21K23QHUEijwXviYw5YwJZODMyq2qa2l9s8ee7YQxcsW9SwPihKQ== Received: from DM4PR12MB5184.namprd12.prod.outlook.com (2603:10b6:5:397::18) by BY5PR12MB4164.namprd12.prod.outlook.com (2603:10b6:a03:207::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.24; Thu, 6 Jul 2023 09:59:07 +0000 Received: from DM4PR12MB5184.namprd12.prod.outlook.com ([fe80::d614:7d55:783f:b43d]) by DM4PR12MB5184.namprd12.prod.outlook.com ([fe80::d614:7d55:783f:b43d%5]) with mapi id 15.20.6565.016; Thu, 6 Jul 2023 09:59:07 +0000 From: Bing Zhao To: "NBU-Contact-Thomas Monjalon (EXTERNAL)" , Stephen Hemminger CC: "dev@dpdk.org" , Matan Azrad , Slava Ovsiienko , Ori Kam , Suanming Mou , Raslan Darawsheh , "dev@dpdk.org" , Michael Baum Subject: RE: [PATCH 1/7] net/mlx5: fix the modify field check of tag Thread-Topic: [PATCH 1/7] net/mlx5: fix the modify field check of tag Thread-Index: AQHZqxXcH5+b34E3MEOqsvfh4dpsna+i3GqAgAUxdhCABHbkAIAABfGQ Date: Thu, 6 Jul 2023 09:59:06 +0000 Message-ID: References: <20230630054303.432238-1-bingz@nvidia.com> <20230629230831.10023261@hermes.local> <8931222.T7Z3S40VBb@thomas> In-Reply-To: <8931222.T7Z3S40VBb@thomas> Accept-Language: en-US, zh-CN 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: DM4PR12MB5184:EE_|BY5PR12MB4164:EE_ x-ms-office365-filtering-correlation-id: 8a6eca39-8ead-4b96-bcfa-08db7e07a324 x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ZL+sueqxNDoxxVZSpIRxUgPhe40w+MjpvXSYOh+078lXEPYm/Ldh5qDV7GBsGEqxVxNn3HdxCV5XtvraxLxwCaeKbZXCzSYI0Sh8hF5mztF3kwHJ94HSArGGphe1g+L6HgMvcVC9lCpMFYIbnQCG0Y3DSu9H7+pqtY7k4VW36tHaT1oLnWkR7TWyx+G8lTIlu9aHAFWpK2yqCMZwcFi4xtvJtdSeiEnat3BEZ5Ic2glS1WsSKhCxyJCBidCBizUw3JNajocsEgje1uCTDNs9gOmbX2US5TpWEAJTDWKukOinQ2hFHQV9bbNCAuH9Zhg4lQi4YPMxGCRbUpEfH3u6Ie6fpqdQJ2HEu+EPyuj6EP/h1kTjr3B776UsHL6aS221jyqYC9ap5VNQUTv6eLCA/Z+iAvACLChY6k1k0DL9FV0LUMCnWg3ddZUavsmbbvcRc0EKkMpzBj9Adq1MZ+lVWnwUxLmHo16KIynrYuiLKfsaJ80qFFITVzFPJ1+jQXqmLxXgiqrUOmgx3DsynRoSS+szci6MiYr9N9u4WkCpcIQLsInz/O1V0/FlAWNA5GqWbyS5o0vdYa+8e2TCLyZHo4USQoWLaa2cN9ezBFHLYYgjF7nFOlMkEKyxKlHW0Ush x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB5184.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(136003)(376002)(39860400002)(346002)(366004)(396003)(451199021)(478600001)(5660300002)(8936002)(52536014)(8676002)(41300700001)(66946007)(76116006)(66556008)(66476007)(316002)(4326008)(64756008)(66446008)(2906002)(110136005)(54906003)(71200400001)(7696005)(107886003)(9686003)(6506007)(186003)(53546011)(122000001)(83380400001)(33656002)(38070700005)(86362001)(38100700002)(55016003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?QdHdP4J8iKykNnTRCgjkqqwMv1s0QmBLuulEgbzCuL08P25VRptfDbz7Iu7d?= =?us-ascii?Q?xfJUgRG27XgnajRKra0tmkqJ/c1G7bjgcmRo7mkS7uz3pEytLWpY4FDiCGxE?= =?us-ascii?Q?GBW9ioCwUM/nxLqshMs1/218B/8ZKvqP488FVtY4Hy5opEKiu4sS1uPQXvpH?= =?us-ascii?Q?BfLXbBy4CXnyNFVT48zvAzGt1LU6bLyeCEKy4DER/Doco0TlbC4yFkTEUghB?= =?us-ascii?Q?Ex9U2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CpQyB?= =?us-ascii?Q?Qs03mIHmFXgD/ASFT65MmmaSZKWT8FCU8EK72K+EWeX7XbHuzFmT6JvDxdW1?= =?us-ascii?Q?yF91M0+G+U++om2oySKGj5iRuU7n9PVQV+0XyTSAlgPBkG+brd7eKwfGnt6Y?= =?us-ascii?Q?ovhtptpQGOypV5+qbdZSvHhEOKe+NixTDztmY9WsZ8tDNt5MFYvfoVelJ5ew?= =?us-ascii?Q?uJPupddP4bOEM0FGfMrCBOOUXXAr53t7zwyJj1xoEI8scYfOoczaBBAXv9AK?= =?us-ascii?Q?7cxJ0PsrTmic4XA9xZXVpWdgoCCS2sqPSccflZWhwuhAYMIU+oLRDxnDqZIj?= =?us-ascii?Q?ro6zjGgjnCCyK1lctz9jzniU3LaSKWZgD1mh9eEL9U/CesMFYx4ksQGZQpNt?= =?us-ascii?Q?lYNhuFn/MTcb1nlDmrHFnEQ590zMBhh5ivsxXVk4yTDVgOzgGEtSITKI/w?= =?us-ascii?Q?=3D=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: DM4PR12MB5184.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8a6eca39-8ead-4b96-bcfa-08db7e07a324 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Jul 2023 09:59:06.9656 (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: LVQGZHaStYsrZQIlmKbdxPLL8GeDGL8i0/sFokYxwC/9uSU6qfxJva7uT61nDh0BATSgXB9JOfMeJnPDU836CQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4164 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 Thank you. > -----Original Message----- > From: Thomas Monjalon > Sent: Thursday, July 6, 2023 5:37 PM > To: Stephen Hemminger ; Bing Zhao > > Cc: dev@dpdk.org; Matan Azrad ; Slava Ovsiienko > ; Ori Kam ; Suanming Mou > ; Raslan Darawsheh ; > dev@dpdk.org; Michael Baum > Subject: Re: [PATCH 1/7] net/mlx5: fix the modify field check of tag >=20 > External email: Use caution opening links or attachments >=20 >=20 > 03/07/2023 15:31, Bing Zhao: > > Hi Stephen, > > If I understand correctly, do you mean that the internal value and rte_= flow > API value may have some conflict? > > All the MLX5 internal enum values start from INT_MIN. When treating it = as a > int value, it would not have the same value with rte_flow enums, unless a= ll the > 2^^32 are defined. > > But yes, this has some risk since there is no limitation of the values = in the > rte_flow API. >=20 > We can assume it will never happen. > This is good to go. >=20 >=20 > > > -----Original Message----- > > > From: Stephen Hemminger > > > Sent: Friday, June 30, 2023 2:09 PM > > > To: Bing Zhao > > > Cc: Matan Azrad ; Slava Ovsiienko > > > ; Ori Kam ; Suanming Mou > > > ; Raslan Darawsheh ; > > > dev@dpdk.org; Michael Baum > > > Subject: Re: [PATCH 1/7] net/mlx5: fix the modify field check of tag > > > > > > External email: Use caution opening links or attachments > > > > > > > > > On Fri, 30 Jun 2023 08:43:03 +0300 > > > Bing Zhao wrote: > > > > > > > @@ -1117,9 +1117,10 @@ flow_dv_fetch_field(const uint8_t *data, > > > > uint32_t size) static inline bool > > > > flow_modify_field_support_tag_array(enum rte_flow_field_id field) = { > > > > - switch (field) { > > > > + switch ((int)field) { > > > > case RTE_FLOW_FIELD_TAG: > > > > case RTE_FLOW_FIELD_MPLS: > > > > + case MLX5_RTE_FLOW_FIELD_META_REG: > > > > > > Mixing internal and API fields seems like something that could get > > > easily broken by changes to rte_flow. > > >=20 >=20 >=20 >=20