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 658CC42DC2; Mon, 3 Jul 2023 15:31:41 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E925D40EF0; Mon, 3 Jul 2023 15:31:40 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2056.outbound.protection.outlook.com [40.107.223.56]) by mails.dpdk.org (Postfix) with ESMTP id 512A340ED5 for ; Mon, 3 Jul 2023 15:31:39 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AS9xTB+LKgqDrDHq8zU0Mfl9mroqgPjVTrGICe01bvyt3YQp/FM/Lqm6bbTBjANQsm1kIyk/h3GbjY5th4USi0hFuarPg/ZAZnpost8XLTYTODVOnqf3pzXIwTf/FCWz5/qcTesqUy/QZ9xPTpJvvdVmNonhgI4B/Loeq7xICs4JBk5RIPsfFFuStw59xJKiXrlCynVmKwFS9AId75fEtBI/oYW3HgCu8+OpoHtFGHbf49TFQ8eyy0a5n8QKmjrF4KTlxFPB7ErjBBwapE0Yota/UV8dq75bftfGlsWz61YSDviX65GSOQHcxCtHGjq6mk1gv01mAhW67Z7Ux7wEOA== 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=iZP+R6DP60FoUXRRy4yN8TWXbcBT7s87+WV5BexkHdY=; b=jWJEfbtcank/hZxT6+PJCSSc6/WTbzsOeuhCYlxzGgga4HP6cBclTJc/PzcqevG5QBm2eoN1mVWKA5Xp8/cixFeAEdSiE0GyVyTFtngk6BCg0GaOBGKf9gsyIaRXrpWIRowz55zig+ZUr9hWN2gxw5TMNpAyyf2yOUpwg2CfaIuSiKCnoRa3iZJ6Dqvn9b66CBBtfUANIPRa116mqpzPYnAUzp/9bTgYYSM0MYp51RhfJV1CgmQw1Ok4wmhmYIOKazfWIKBff4Oyz6VnRyFYgjg5J/scDGG61ZHmBYc10rW/syjwe7c1kD8X9Y+ZZtXb3fh1053g3kJnhPJIqYmqNw== 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=iZP+R6DP60FoUXRRy4yN8TWXbcBT7s87+WV5BexkHdY=; b=OZKSoIgeq4efhKPUiDVby/d3+OE6aNly2XlMZ3dlvYKXWJdCyun9gVQfLrgYQzXIvrei1qv6oygkNIxGv2xknmda4z5PMdSmzVriiGKHK7UFPi1lT1ciSMRvaxUoaVxvXjrTwPrainBy8TyQDVaaJOWgC3ql9EbnsWR8SxsuFQcS8FHjZo8LTFk8x/XVYyRnvGxwshrlYXxkq1LZy/U9ZmD36zZ6x8sas4B5fD+FMLVKEH2uckzE3oU2v82O9LwwWJH1K1BXeQOIA363cAo4lZRw3mh9p+IqTOVWxhWxqYce/ASJ8xxsxMgnO1Elk+uKNVGNiwUqDi89mNd+lWvgJQ== Received: from DM4PR12MB5184.namprd12.prod.outlook.com (2603:10b6:5:397::18) by CH3PR12MB9196.namprd12.prod.outlook.com (2603:10b6:610:197::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Mon, 3 Jul 2023 13:31:37 +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.6544.024; Mon, 3 Jul 2023 13:31:37 +0000 From: Bing Zhao To: Stephen Hemminger 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 Thread-Topic: [PATCH 1/7] net/mlx5: fix the modify field check of tag Thread-Index: AQHZqxXcH5+b34E3MEOqsvfh4dpsna+i3GqAgAUxdhA= Date: Mon, 3 Jul 2023 13:31:37 +0000 Message-ID: References: <20230630054303.432238-1-bingz@nvidia.com> <20230629230831.10023261@hermes.local> In-Reply-To: <20230629230831.10023261@hermes.local> 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_|CH3PR12MB9196:EE_ x-ms-office365-filtering-correlation-id: 1f20be2e-fb4d-452e-f6d0-08db7bc9d3b7 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 23I9X+i1wtqd9AhmFD5xdIfHe1Wcoiui5cqTg8VmzPttUo/ABw9nsRrTPhO5H84c4NHv+7S4DOQ7/CZ5v8LOF3TqdxAzjn580aRioB0JTyb/cYgQY0WLdAeekEFChI7ojpSnSUYblxyfv1OCuZH+CAE4/CgiYFEXxxbKtabAskrSVOfLuu6q9TS1xCWQfx+r+deADigj9jdrIeT3U33RhN5Pvz9CUuY3lHEYqqlU3emuPP0/LSb7slt8n3/KWyrP0AWFDk0yjciO2usprBRUKhLCNfgh88gc6xGoL3R7RF9/GRg1aVpjZRLm98phjPSZvFymfcymNpMoHB8Om3AvGfttfB9fjAdiYw2PveDxQi0kjwH9mhe47lWG7sjGjeg+AWDCCUxHH8EehN4U+dpmmmhIWUo+6fNeKYJY6Jj55jnf+Itcv7Fc2TiRXPprAsPlFpJjgJXHfwxljsNUU/ixM22aUg28AEYdc4BSB03HLJgWqlf0DCPxw1k/lVLl1xCddDs5ONlpgi5ifjxXOAInundxhWrL8gfYkz95OWOGKG4RrqvjuJbs05vjnLS2DlnpBHC69SaA+fB/IZAPGEePGD4ZLn5a3Eq+mqho7IjAVTDoGPaI01Mc9qbIrsAK0j6l 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)(376002)(39860400002)(346002)(396003)(136003)(366004)(451199021)(41300700001)(38100700002)(7696005)(53546011)(71200400001)(122000001)(107886003)(83380400001)(186003)(6506007)(26005)(9686003)(55016003)(38070700005)(86362001)(54906003)(478600001)(316002)(2906002)(66476007)(64756008)(66946007)(6916009)(4326008)(33656002)(66446008)(76116006)(66556008)(8676002)(8936002)(52536014)(5660300002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?tz1XYQecqrEIARPpokEY0Zo0t0kYZom+1/GilB8h0oJsIKHHvF4MZwpo1KQ4?= =?us-ascii?Q?EBlSR34CiBJurqrx6BiD6bXiTtO+/gMdLurFiA7kAhTjra7qnB6GXq2FRt4t?= =?us-ascii?Q?GowxUiECs6bAHHHKhbnD389uJvAgMDEPptBjs7iMS9JGUJqrRrmIFoHBeWb9?= =?us-ascii?Q?i+4+THOa8+di/IkYPxXREBaBdVQ9jWyZ9McOsD0WBOG2PFLzLyuFklry89WQ?= =?us-ascii?Q?4pHzHoT1KRorxz9PFaqqWh0PH/kXWk1CKZn/O35LK/KqxjYiKWe31IzI6OV1?= =?us-ascii?Q?wFs6c2LkQnvxXyVp1UKKGsS3KsECqbJ94V1cTKw9dkiLMIYirxu227Jv5XqY?=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AS+fk1saeTINfOkZLQL6H+ZBLUfj?= =?us-ascii?Q?JA/8KEFT6zyl2SsgPqszUNkvhOrBOzBVRURQOTcQ4WUQt/Xh0jhEmspsMER1?= =?us-ascii?Q?R8bgxFCOFXbhvlTCy+dVDY2aOHj75N9pilQBc1EvxeD3dsH0WkxPx3L3whzB?= =?us-ascii?Q?DQsTEkTSSfe7OF9zb5c2Wqs6/dm59ItjcMSICcuAFRjpwJ+7xbsikicJcEUx?= =?us-ascii?Q?lhhZv7+ZnaAaN2ndXAXQVKRq14YLMyy0DkQlj/WZoJMr7D86EHpU7MCZyK08?= =?us-ascii?Q?3QWhqf81WQECQOikvkTO71VW+GPUuXeZf+jCqODe21V5TcwN6VhKAxMkFeD4?= =?us-ascii?Q?zTx7NxAUYY+VusYGt6M=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: 1f20be2e-fb4d-452e-f6d0-08db7bc9d3b7 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jul 2023 13:31:37.3177 (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: iFgikXKWCbGjXRaiEXlvWSEIUbuvaxczzf6+judECyT2ipFPmZQmbTOq2SyzeLqnGCxhx2mcqbLhCVKkUqsuyA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB9196 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 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 al= l the 2^^32 are defined. But yes, this has some risk since there is no limitation of the values in t= he rte_flow API. BR. Bing > -----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 >=20 > External email: Use caution opening links or attachments >=20 >=20 > On Fri, 30 Jun 2023 08:43:03 +0300 > Bing Zhao wrote: >=20 > > @@ -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: >=20 > Mixing internal and API fields seems like something that could get easily > broken by changes to rte_flow.