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 4483C439A9; Tue, 23 Jan 2024 16:12:54 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BDEFF402C5; Tue, 23 Jan 2024 16:12:53 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2068.outbound.protection.outlook.com [40.107.94.68]) by mails.dpdk.org (Postfix) with ESMTP id B07AE402B0 for ; Tue, 23 Jan 2024 16:12:51 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GTF4fin1GilLbEhTzn1DrH+vYjwcbETx++BiAfcydb3wPYzRT9vq4196HriCG6RpysJIt5BbOAy5WRedl4ohfgIOWcR0nmCjnf/FJLNCqp6L4r6glwmjupeFSeD1emYEq0ZilQd23N4hqaLmlMkjTJG9ySy2rdsSGDd8FFjKB42tZW7PLIcO2206VeHE/wMQam72H+95OnW5R8Z1NAJKu56WZroxGqq9t2qquJZWEb5f8DeBOhc1yubuv4I+nAJYufywwPPk4ehw2ig/bqke/StM6LXguil4TatNH2jc2Q3r6olS4BZDi7/PMDTYio4U9SLaJZyBeUyzdkeDMbqUpg== 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=E8O/VjcBmbn8dCjp0DY88Kr3mK4kSoimQ7P4PNuuJ3c=; b=AHhHAujZAoI1CvBEmDn2KUf7CFwdkcPgaWgyNfGc4zch+g4dyoGfD1p7SgodRUINuubk6aT783ZtOxAUFWxoBDDN3ujGzbTz0szsMHUd1cth7G08kCRqCHdm0U4WRjdJrjoAwmyAvTo9RWaKlMmEE2b8Tn7+7CFDjRm+sioU5wKtRhqUlLk3TcSe4J7mNr4HjXIYWc2VVPg1lTUQN4Lu75fGaTrA76raU70xblvtspVSsxnWuH/99imyz4QXsTWOH2U8Qs6vsE2qgj17T5wcdoNn9FSvKGJfQyz95NM94h+6RV5lGV4JBLrK4i9PSig1/JxyiVgsFONJpJVRHOqfPQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=E8O/VjcBmbn8dCjp0DY88Kr3mK4kSoimQ7P4PNuuJ3c=; b=BhUtzE2krkhHoYKYQOpKM60RJc454phmB+S4DNrbUt0Dexo2yOtFr4st1fKv2jle2orRuCrg+J2adLEF0yk5HoLrMFoeGLGeyHH1ml+8kh9YWrNcJMQ1eMU1cyJtfYgbvzUwqWi4bFH0YhTFCDJTKZoxybpPa0+WlLf5XmggbqQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by SJ2PR12MB8829.namprd12.prod.outlook.com (2603:10b6:a03:4d0::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.32; Tue, 23 Jan 2024 15:12:48 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::815a:45e6:cf5e:479f]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::815a:45e6:cf5e:479f%4]) with mapi id 15.20.7202.035; Tue, 23 Jan 2024 15:12:48 +0000 Message-ID: Date: Tue, 23 Jan 2024 15:12:35 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 2/2] drivers/net: return number of types in get supported types Content-Language: en-US From: Ferruh Yigit To: "Power, Ciara" , "Sivaramakrishnan, VenkatX" , Igor Russkikh , Selwin Sebastian , Ajit Khaparde , Somnath Kotur , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , "Zhang, Yuying" , "Xing, Beilei" , Rahul Lakkireddy , Hemant Agrawal , Sachin Saxena , "Su, Simei" , "Wu, Wenjun1" , Gagandeep Singh , John Daley , Hyong Youb Kim , Gaetan Rivet , "Zhang, Qi Z" , "Wang, Xiao W" , Jie Hai , Yisen Zhuang , "Wu, Jingjing" , "Yang, Qiming" , "Guo, Junfeng" , Andrew Boyer , Long Li , Matan Azrad , Viacheslav Ovsiienko , Dariusz Sosnowski , Ori Kam , Suanming Mou , Chaoyong He , Jiawen Wu , Harman Kalra , Devendra Singh Rawat , Alok Prasad , Andrew Rybchenko , Jerin Jacob , Maciej Czekaj , Jian Wang , "Behrens, Jochen" , Thomas Monjalon Cc: "dev@dpdk.org" References: <20231212143722.1803259-1-venkatx.sivaramakrishnan@intel.com> <20240118120741.1434286-1-venkatx.sivaramakrishnan@intel.com> <20240118120741.1434286-2-venkatx.sivaramakrishnan@intel.com> <0d66b7f9-5cbd-4fc8-b3c0-b127580a699c@amd.com> <591812fb-e73d-4e0a-9e6d-eccd549d0b81@amd.com> Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3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V1cM3oTvfx3LOhDu4f2ExQzCGdkzbXTRswSJIe1W0qwsDp+YPekbrsKp1maZArGeu+6FuW honeosIrWS98QJmscEhP8ooyJkLDCCOgEk+mJ/JBjzcJGuYn6+Iy/ApMw/vqiLGL1UWekcTA g18mREHqIR+A3ZvypIufSFB52oIs1zD/uh/MgmL62bY/Cw6M2SxiVxLRsav9TNkF6ZaNQCgn GqifliCEMvEuLZRBOZSYH2A/PfwjYW0Ss0Gyfywmb2IA990gcQsXxuCLG7pAbWaeYazoYYEQ NYmWatZNMAs68ERI2zvrVxdJ/fBWAllIEd0uQ4P05GtAHPdTIDQYp545+TPV7oyF0LfXcsQs SFVZE6igdvkjfYmh+QOrHGZvpWXLTmffVf/AQ81wspzbfxJ7sYM4P8Mg5kKOsaoUdyA/2qVe cMh1CLUHXF1GlofpGbe1lj4KUJVse5g3qwV7i9VrseA8c4VIZewdIjkzAhmmbxl+8rM/LKBH dZUMTzME5PFCXJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <591812fb-e73d-4e0a-9e6d-eccd549d0b81@amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR4P281CA0099.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:cb::17) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|SJ2PR12MB8829:EE_ X-MS-Office365-Filtering-Correlation-Id: fcebd084-8440-4010-f7f4-08dc1c25c2ac X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pbBH+sqFRe07siBeH7kk2gZQhoWrbMTbB6d4N+J8RlfFmgov+/AIpLDg/q3ci3zDqetvpxCcskq0gKgRW1n9/ytFvc13FQI6gOkbMw1mgIGorsUqepMrxE2Ne0q5GdN3fTjzZK1kTnT6jVT3hpFsu6AmjJLrl6mTBPsW99f7S/VCSQKmA4zWyaJkQYFoER9HOy5OMqgmKsyuw9nknd30WCeoML9zXpuCG4XZzktbL3g3ta9oBU4shAKkiWoFpTQ6o7aJ3GRjlalk4FR1T981uGJT3Jp1be38mhfWW+kthRLON0ZmgO3lx2vvjjjNOqgArl1o655sNdq3Sj63NhN4mY9B3CLknyy+MEDlk5cKxvkrFyXpmqxo60tixBG3n8PiI30cfq2hzqqNldMiQ8Djf1TBOleMiwLVxqzLfIjZaEha+8xVRkJf9U2bCZDdUeZDS2F5gzgXSUcNGA2uS4cS1Pmlx+Ji+44rjgZG134RrMDE7r5Mc2NeFO60MS8BOKYuqQB3yb+XmiIWr/HmTSedLnJH89eLRxSOMPGHAlTTZTLQwLobKS19BydLanoJMMyWMVIAEZr2I1sY2naB1d3I0L7YtryBMptYWP80dn/ZKCBtvZD2/wcW+R8/S9oBhYPtK7ILj3T83gVaWa6xi0D3abdpnY997hwkA52DUKRq64M= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(136003)(376002)(396003)(346002)(366004)(39860400002)(230922051799003)(1800799012)(451199024)(64100799003)(186009)(2616005)(6512007)(83380400001)(53546011)(26005)(8936002)(44832011)(5660300002)(7406005)(7416002)(2906002)(478600001)(8676002)(6506007)(6666004)(66556008)(4326008)(45080400002)(66476007)(6486002)(316002)(66946007)(41300700001)(921011)(38100700002)(110136005)(36756003)(1191002)(31696002)(86362001)(31686004)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?LzRObXpUVXpoY0wwM2RzSjBUaWJoNVBVRnZCQjdlWU1DeFh1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E1C?= =?utf-8?B?SVZrY1BkVm9WdVduYjNSOHBsNDRpUWh1a29sS3BYRDQ2bUo5TTc0ZE5ESEdm?= =?utf-8?B?dExqSWc0Vnh6aW90WlE1YmNzNjFzUXFCVktVTXBZKzlyL3plS3JKUEJxYVhq?= =?utf-8?B?eU14YmVVS0RSYlFoOWN0Z2l1R0JnWWN3a2RPWEhVU3lSY0xzMUJFMXZTVFFp?= =?utf-8?B?VDdVY1JMK1lzZWZMdDRrby9CSXFwOXhIMThibWFOWnEvUnUzTjhCNlJ1TU5o?= =?utf-8?B?UGtrdVY1dndMQzdCOWRVQ2lqQnVtUXpxSkJrelIxYVg0UVU5V1hhcEZMSUFu?= =?utf-8?Q?DcHI=3D?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: fcebd084-8440-4010-f7f4-08dc1c25c2ac X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2024 15:12:48.7741 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: z+CmJUbtI+OyWD3LBdETEUini7PWGCxXedTAernm/SA6ZoKVRfcVnlSkxiq3N176 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8829 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 On 1/23/2024 2:59 PM, Ferruh Yigit wrote: > On 1/23/2024 12:07 PM, Power, Ciara wrote: >> Hi Ferruh, >> >>> -----Original Message----- >>> From: Ferruh Yigit >>> Sent: Friday, January 19, 2024 2:51 PM >>> To: Sivaramakrishnan, VenkatX ; Igor >>> Russkikh ; Selwin Sebastian >>> ; Ajit Khaparde >>> ; Somnath Kotur >>> ; Nithin Dabilpuram >>> ; Kiran Kumar K ; >>> Sunil Kumar Kori ; Satha Rao >>> ; Zhang, Yuying ; Xing, >>> Beilei ; Rahul Lakkireddy >>> ; Hemant Agrawal >>> ; Sachin Saxena ; Su, >>> Simei ; Wu, Wenjun1 ; >>> Gagandeep Singh ; John Daley ; >>> Hyong Youb Kim ; Gaetan Rivet ; >>> Zhang, Qi Z ; Wang, Xiao W ; >>> Jie Hai ; Yisen Zhuang ; >>> Wu, Jingjing ; Yang, Qiming >>> ; Guo, Junfeng ; Andrew >>> Boyer ; Long Li ; Matan >>> Azrad ; Viacheslav Ovsiienko ; >>> Dariusz Sosnowski ; Ori Kam ; >>> Suanming Mou ; Chaoyong He >>> ; Jiawen Wu ; >>> Harman Kalra ; Devendra Singh Rawat >>> ; Alok Prasad ; Andrew >>> Rybchenko ; Jerin Jacob >>> ; Maciej Czekaj ; Jian Wang >>> ; Behrens, Jochen ; >>> Thomas Monjalon >>> Cc: dev@dpdk.org; Power, Ciara >>> Subject: Re: [PATCH v5 2/2] drivers/net: return number of types in get >>> supported types >>> >>> On 1/18/2024 12:07 PM, Sivaramakrishnan Venkat wrote: >>>> Missing "RTE_PTYPE_UNKNOWN" ptype causes buffer overflow. >>>> Enhance code such that the dev_supported_ptypes_get() function pointer >>>> now returns the number of elements to eliminate the need for >>>> "RTE_PTYPE_UNKNOWN" as the last item. >>>> >>>> Signed-off-by: Sivaramakrishnan Venkat >>>> >>>> >>>> -- >>>> v5: >>>> - modified commit message. >>>> - tidied formatting of code. >>>> - added doxygen comment. >>>> v4: >>>> - split into two patches, one for backporting and another one for >>>> upstream rework. >>>> v3: >>>> - reworked the function to return number of elements and remove the >>>> need for RTE_PTYPE_UNKNOWN in list. >>>> v2: >>>> - extended fix for multiple drivers. >>>> --- >>> >>> <...> >>> >>>> 59 files changed, 188 insertions(+), 141 deletions(-) >>>> >>> >>> Some driver still have the flag: >>> - drivers/net/mvneta/mvneta_ethdev.c >>> - drivers/net/mvpp2/mrvl_ethdev.c >>> - pfe >>> - dpaa >>> - drivers/net/thunderx/nicvf_ethdev.c >>> - drivers/net/nfp/nfp_net_common.c >>> >>> Above seems the ones updated in previous patch, flags added in previous >>> patch should be removed in this one. >>> >>> >>> And following seems missed and still has the flag: >>> >>> - drivers/net/ngbe/ngbe_ptypes.c >>> >>> <...> >>> >>>> @@ -3971,9 +3975,6 @@ rte_eth_dev_set_ptypes(uint16_t port_id, >>> uint32_t ptype_mask, >>>> } >>>> } >>>> >>>> - if (set_ptypes != NULL && j < num) >>>> - set_ptypes[j] = RTE_PTYPE_UNKNOWN; >>>> - >>>> >>> >>> This change is new in this version and not mentioned in the changelog. >>> >>> 'rte_eth_dev_set_ptypes()' returns 'set_ptypes' that terminated with >>> 'RTE_PTYPE_UNKNOWN', this is how that API works. >>> Why changing it in this patch? >> >> Apologies, yes, we missed this in the changelog. >> >> For the change itself, if we are removing the need for RTE_PTYPE_UNKNOWN in the supported ptypes lists to mark the last element, do we still need to add it here when setting ptypes list? >> Maybe a misunderstanding on my part - I thought it would be the same for both cases. >> >> > > They are two different APIs, and 'rte_eth_dev_set_ptypes()' returns > ptypes to user that will be terminated by RTE_PTYPE_UNKNOWN, so to not > break the user code we can't change it. > A little more details if helps: 'rte_eth_dev_get_supported_ptypes()', fills the '*ptypes' and function return value is number of elements in the '*ptypes' array. There is no requirement that last element of '*ptypes' will be 'RTE_PTYPE_UNKNOWN', and if you check the current implementation, it is not. 'rte_eth_dev_set_ptypes()', fills the '*set_ptypes' array and function return value is function success status. User can deduce the size of '*set_ptypes' by 'RTE_PTYPE_UNKNOWN' marker at the end of the array. Requirement is last element should be 'RTE_PTYPE_UNKNOWN', and this documented in API. We are preserving above API behavior and only changing ethdev - driver interface.