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 54B69A0543; Wed, 12 Oct 2022 17:15:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DD59643027; Wed, 12 Oct 2022 17:15:28 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2057.outbound.protection.outlook.com [40.107.243.57]) by mails.dpdk.org (Postfix) with ESMTP id 2E0BC42EF7 for ; Wed, 12 Oct 2022 17:15:28 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TLOx1uWa9FwYkJAIiBYWiaWMT5PxKENqCQkSY8HOX4wG2HUd0eJwNLL6zkm0DEyxC6UVV6R9ZotO9wJqmkWANPShWQSxIMwBg6Dwvg4ZuFrW26IlarQzn2p5KuyJm3CdpUznHWW7uVsmNyXmBf38FjUyNCZdYY3EypiRO2y9TUf6yobQwEy5CQrpYr6zi4gp0X3sptvz+18NfTVxJw4yj09naOvrOnHRE4UdtjfdCWS2RnsjA/4Ee7bHjwmpJehC+MAkhR6+TIXM5BJwearIiAFh8KhlSuEW7yDhI+z8sFi+FOcRqJfCr9I0ltpsiRPy6V1fkrD+VPb/rejutKoWbg== 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=WN0ujQ+qtNx3aVpEdOTW57gPOa+OaAyfceQklyUurAo=; b=iQ6zFynRtOTUCDhSUPBheBOK59ntANJKBzMU+F+mLi7+kLZVn3EcdrbESW5sWR4gTPEwAxWN5pU2lbCiuRZ+UeBjFyk1Pbs2khlvpE5WmWPAdXBU20V3fJ+5/p2gFUgsWRxmybIAQtQ1ybuq6GF5UQyu0PY8OUUMndIo1RiRcp0+ypfjurqm+8z0/QyljbdSMEdI7LcFbXneGx6YAVVe2pLnbSuNVFyRGcdppZfjjFo1yUd4Sn+cQRtGPsM97zBiNO0VAtVDMHZ1KZqV+4BPd5OTfOHPqJZJGrUbd8zYcQ58os9nXa5m/NTYU6CJDznKCHbPCL2LFsKuODrp6XENPg== 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=WN0ujQ+qtNx3aVpEdOTW57gPOa+OaAyfceQklyUurAo=; b=oAOyqsE3bgYHvp8uW2oOM8qdD4CV1rlUFoIRoFLPk4/9UU6dhfrQpSDm5v78zWJsr09QjPybO8FdySH/YTd1bikYdUqBgrrfxh3NQbBLgwZF30Vn7+hpRHIv5NXhcxe86IaU70Srhx8FgyheMg9p5xIH++gNl7gbzTGlF854ayU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM6PR12MB4297.namprd12.prod.outlook.com (2603:10b6:5:211::20) by DM4PR12MB6088.namprd12.prod.outlook.com (2603:10b6:8:af::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.15; Wed, 12 Oct 2022 15:15:26 +0000 Received: from DM6PR12MB4297.namprd12.prod.outlook.com ([fe80::b9fd:e732:4585:6b25]) by DM6PR12MB4297.namprd12.prod.outlook.com ([fe80::b9fd:e732:4585:6b25%7]) with mapi id 15.20.5676.036; Wed, 12 Oct 2022 15:15:26 +0000 Message-ID: <10897fa8-fc09-dca0-6edd-4e4cb4b8193e@amd.com> Date: Wed, 12 Oct 2022 16:15:21 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.2 Subject: Re: [PATCH] net/bonding: fix socket_id type Content-Language: en-US To: Markus Theil , dev@dpdk.org, David Marchand Cc: Chas Williams , Min Hu , Thorben Roemer , Bruce Richardson , Thomas Monjalon References: <20221012114523.9569-1-markus.theil@tu-ilmenau.de> <0f1d4dd2-8331-93a9-29f8-c885ab1234a8@tu-ilmenau.de> From: Ferruh Yigit In-Reply-To: <0f1d4dd2-8331-93a9-29f8-c885ab1234a8@tu-ilmenau.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0560.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:33b::18) To DM6PR12MB4297.namprd12.prod.outlook.com (2603:10b6:5:211::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR12MB4297:EE_|DM4PR12MB6088:EE_ X-MS-Office365-Filtering-Correlation-Id: 0cf9b72d-16ba-4c54-7ba2-08daac649738 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MCWkDsJBxG2tZktdrQr0B20SGMTu+fE6CmXy2JUH8OD1ISgySbdqmjl3SUbsBZpJ6hEGUSxWnMfvex1uat5yU95M8tKWiMKAIdjOFeBc+HKiAJI1t4339yd1fl5SL+01H1xoTcR/OnV76hezzAGctruS1iemFMp0Wu9MxGknO9TVDUZuw4hdwTmvV6BllTv8atF8kjJAdY1F59qZ7Vt+1K1U1RAiuAi/6DVY3XQ107FJyODz9sIyio+FJJ/vUHPDvA8IFTmcC8C+v+JoMUC5rVzFKowxnmoLOMUtdUvb1xFSlpyEDucJBBwpUKayzPkfJJldBUq7Cd7GnpMB7yqPJmmDrRok62QACWBz3A4v91IMC1FpEH78pBPXtAk6bz14+u5PDvxnjC3Fn9L9Zny5lFxqhVMxXWiV0v0iacau9hkyMu/EZXl9LAVTn2JqEhW9pyZQVJf3yDVP9/r+6HSx/3I0PFZ5xUHAGuGTpwLS6y3Y4nXKF1UzE3O+TBRwQcQaGDKaoOa6oHcP4oyBza+NxZjD0jNtJ7HLyNr/Ndats9t9XqOphIEGuMyX/3fd68UcBUgS/jZrzPN4SyOtWequuKaTOoQUpVm1NplG35OvKXWPWSbhQG9iKRrTiaxRHvs/i30LFH09EO8WwukHQgCDJKhiPTKPw9RK72MArCdfo184UumJiGCCPoOWwCMp/LwL2f/HXMZpJfyHDYm+iEaDa4+qbfjXnM0H7e2FEPc8ZPFvZ6WjVViJp8y6iOCb13m53f5L4AWvNq5IJExap9Y71ob/k+buFSmnuFeNGw4gRo8= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB4297.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(376002)(39860400002)(366004)(396003)(346002)(136003)(451199015)(2906002)(44832011)(5660300002)(31686004)(8936002)(26005)(54906003)(110136005)(36756003)(66946007)(6512007)(478600001)(6506007)(53546011)(6486002)(6666004)(66476007)(66556008)(8676002)(4326008)(86362001)(186003)(31696002)(41300700001)(2616005)(38100700002)(83380400001)(316002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Kys2WHo4ZDE3dTB6OFAvZ2RXKy9kQW5YR1owZVR0aU5ndTkway9uYnFjQ25D?= =?utf-8?B?Mkc0Q3FSUHhIUVpxRlY5NW4rT3ZBVFF1VDltWHBXclpFd2JkQ0o0bEhhNHNs?= =?utf-8?B?Ym5GU3N2V1BYbFg4Z0VBaTRKRld0c0RVd1daOUFTQ1RKUm8yUlI0VGp1SmJx?= =?utf-8?B?MThzb2dxN3NId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J?= =?utf-8?B?ZU5MRmd1OVpMSzIrVU1ubWdscC9mWndGRitSV3lWSytFMGJJT1pFUkI2eXg5?= =?utf-8?B?VFdGOGx1TkQwQ1pZVzdRVnBYVGNiMjZnNTY1TFdwSnJUSDBoVVYyRm9jMWlS?= =?utf-8?Q?uAj8/wgalKUU7bPVVpRgsjxD1?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0cf9b72d-16ba-4c54-7ba2-08daac649738 X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB4297.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2022 15:15:26.2926 (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: opkNTJ9Nr6vVnPTPtvms/eBWQN55xHE3aWUApm7a9f5R2xFg7dsGx2XQgIiKZdXl X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6088 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 10/12/2022 3:20 PM, Markus Theil wrote: > On 10/12/22 14:23, Ferruh Yigit wrote: >> On 10/12/2022 12:45 PM, Markus Theil wrote: >>> From: Thorben Roemer >>> >>> DPDK uses int or u32 in most other places for >>> socket IDs. Fix compilation warnings by also >>> using int in the bonding code. >>> >> >> Hi Markus, >> >> 'rte_eth_bond_create()' is part of API, so changing it impacts the users. >> >> Since 'rte_socket_id()' returns 'int', it is reasonable to make >> 'socket_id' parameter type 'int', but I am not sure if it worth the >> trouble it may cause in user end. >> >> Maybe we can announce the change in this release and update the API in >> v23.11? >> > Hi Ferruh, > > I've searched in the whole DPDK for the usage of socket IDs. Nearly > every integral type pops up when doing this. We should postpone this > patch. Maybe announce a cleanup + API change for the next release and > fix this treewide (I can try to do this after 22.11 is out and you agree > with the cleanup). > I agree to cleanup. But unfortunately some of it is user interfacing and only can be done in ABI breaking releases, next one is 23.11. The process is: Send a patch to update deprecation notice ('doc/guides/rel_notes/deprecation.rst') explaining what will be done and why, with a target date. This patch needs to get three ack to be accepted. When it is accepted, this is the way to communicate with users about the oncoming change. In target release, for this case it is likely 23.11, do the batch cleanup and remove the deprecation note. Deprecation notice patch can trigger discussion and clarifies how to proceed. >> >> Can you please list the mentioned compile warning? > The warning only happens when we compile our code, which uses DPDK with > Wconversion enabled. Our code stores socket ids as int. Therefore the > compiler notices the int to u8 conversion and warns us. Got it, so there is nothing to fix in the upstream dpdk code. >> >>> Signed-off-by: Thorben Roemer >>> --- >>>   drivers/net/bonding/rte_eth_bond.h     | 2 +- >>>   drivers/net/bonding/rte_eth_bond_api.c | 2 +- >>>   2 files changed, 2 insertions(+), 2 deletions(-) >>> >>> diff --git a/drivers/net/bonding/rte_eth_bond.h >>> b/drivers/net/bonding/rte_eth_bond.h >>> index 874aa91a5f..3ce2b29052 100644 >>> --- a/drivers/net/bonding/rte_eth_bond.h >>> +++ b/drivers/net/bonding/rte_eth_bond.h >>> @@ -99,7 +99,7 @@ extern "C" { >>>    *    Port Id of created rte_eth_dev on success, negative value >>> otherwise >>>    */ >>>   int >>> -rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id); >>> +rte_eth_bond_create(const char *name, uint8_t mode, int socket_id); >>>     /** >>>    * Free a bonded rte_eth_dev device >>> diff --git a/drivers/net/bonding/rte_eth_bond_api.c >>> b/drivers/net/bonding/rte_eth_bond_api.c >>> index b44dd219cb..3c6e236382 100644 >>> --- a/drivers/net/bonding/rte_eth_bond_api.c >>> +++ b/drivers/net/bonding/rte_eth_bond_api.c >>> @@ -148,7 +148,7 @@ deactivate_slave(struct rte_eth_dev *eth_dev, >>> uint16_t port_id) >>>   } >>>     int >>> -rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id) >>> +rte_eth_bond_create(const char *name, uint8_t mode, int socket_id) >>>   { >>>       struct bond_dev_private *internals; >>>       struct rte_eth_dev *bond_dev; >>