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 E35EFA0C55; Wed, 13 Oct 2021 20:58:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A9465411FA; Wed, 13 Oct 2021 20:58:57 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id C2594411EC for ; Wed, 13 Oct 2021 20:58:55 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10136"; a="313706123" X-IronPort-AV: E=Sophos;i="5.85,371,1624345200"; d="scan'208";a="313706123" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2021 11:58:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,371,1624345200"; d="scan'208";a="715678063" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by fmsmga006.fm.intel.com with ESMTP; 13 Oct 2021 11:58:53 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 13 Oct 2021 11:58:53 -0700 Received: from orsmsx605.amr.corp.intel.com (10.22.229.18) by ORSMSX609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 13 Oct 2021 11:58:52 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Wed, 13 Oct 2021 11:58:52 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.108) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Wed, 13 Oct 2021 11:58:52 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=avUZlKGFA/lCmTFy7vSxiSp6poAfvbcF2PEFLy7JyxDTyV8xfDyVdhWvZ3WGmmrs+m7eWSlz91kgb8B8yNbf5Q/HUzgyo3OpIp9OECriWKXpVmiFCsuhzIlQZTeMigN/JmDvOj/BtabcmaYPld0YkBhkydug6jN3sbIC8rwEinzdcet+Oe5P9v8bP+8tiRQDEiTIv38k2LMwHXJHu68XJF5wYYCaYYPnX3w4xDevDOUe1qC756kxVdEea3nfAjdBZ6vASPhM8T6n36evW20P9ZJliBHm0AW4GUZwvBiNAz4JmY3ja72saNCtNLHGuqS7rbapGuVoRrypyvtNmHzTIw== 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=cQVqfMR8lyYUGN10YPtfXspuTDix6/x6wLeFu60hlz4=; b=WjzGdRGo981iQo2GBoyLEEXRlyc/5QuOZpT8kcUMtmlCQkQhEE4dMtpCiEuCAwn6T4gtYBJ5mNcgz1OG5SGc2iNmegurUpLwHstFF871jhwuAheHGQyys4+NDaDlB5Ft0J0Aj5Ch7YvcHHyEYGLHgwAzgDcOKDxwzJ00AjEYGFB7PjF8kctyJdIWqE2r2PVKZH+7wnCHNqJQJt9uKrFhCA4roD78LS0NSXD4NbF7A5WMHKdKT5g025HF/2dlD3olIU+3fHBivj/u6Xa5/71exSwCvSLNsmiG2cgp9bBayXDw7t6sCTDjsTkgIfNLohrrh8FvytD92DveIBL8sbzBlA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cQVqfMR8lyYUGN10YPtfXspuTDix6/x6wLeFu60hlz4=; b=JCkQW70NzYz7GJ2KM8yja194+pXYSa6ADtCqB+ph8wyoD3fdzYJjzUZ5teXEjjtDyFk5soQXswWetwJ+UiGAVGMEnYMi7VAfuJtHBYrL9AyRnRiwjw7orOQfFImzFMkKZFz5cA5fW/QkPzMCZBgidR10Dyzt54p1xKAlMeI2dGM= Authentication-Results: oktetlabs.ru; dkim=none (message not signed) header.d=none;oktetlabs.ru; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB5125.namprd11.prod.outlook.com (2603:10b6:510:3e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16; Wed, 13 Oct 2021 18:58:46 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c%5]) with mapi id 15.20.4608.016; Wed, 13 Oct 2021 18:58:46 +0000 Message-ID: <1c5b3d36-ae6f-a452-fa37-626ac8c59b5c@intel.com> Date: Wed, 13 Oct 2021 19:58:34 +0100 Content-Language: en-US To: Andrew Rybchenko , Konstantin Ananyev , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , References: <0211007112750.25526-1-konstantin.ananyev@intel.com> <20211013133704.31296-1-konstantin.ananyev@intel.com> <20211013133704.31296-6-konstantin.ananyev@intel.com> <7e0a4705-dc4c-0b69-ad08-320ff2635386@oktetlabs.ru> From: Ferruh Yigit X-User: ferruhy In-Reply-To: <7e0a4705-dc4c-0b69-ad08-320ff2635386@oktetlabs.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DU2PR04CA0311.eurprd04.prod.outlook.com (2603:10a6:10:2b5::16) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 Received: from [192.168.0.206] (37.228.236.146) by DU2PR04CA0311.eurprd04.prod.outlook.com (2603:10a6:10:2b5::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15 via Frontend Transport; Wed, 13 Oct 2021 18:58:38 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1961bbdc-56ca-4b30-ab70-08d98e7b7bcf X-MS-TrafficTypeDiagnostic: PH0PR11MB5125: X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5sCo4j32fB7l+iTLA8zaYX0YJ/Uy8CgXFyoVvTu9VqekbNxwiVLBFBY6qqGdhy9hWIAlmEOp1WoGfQE9yx2ZwIfqbp50syhbvkazdAWFiH+3R4clNk8fBCchxklZ7C7TAMje1ZYxwrxwIESYxKgGA+ivw2Hq1oN+16ZrC7io7BDwMRBR31I+eb8yomNUe57/CMu1MbiBbL9xKX3bGTcqelvGI8wAJN0bLhpFEVtnORMbVevl/08iZ3S3wDsXmwiNFHPR0Gc1o5iiiIE7BNPaFVrUWkXZgk8wPkwLw1sW58eLCIDcUkjh+I7acypF8XcrbO0dDbZOiTjD1v1w2Cnb3jamri8GRYw+KdVezxB9X4MbEDBl1FZQHIeaMLRQHHrvrHj9HkB+QwiuvAoRkOz/FIEO8tzOs7Fbaoz3WgWTTSUWosf2LWYy+uYMMOoCkZzsKHgOyR3nyn3Tm0m+nVBBcDjoLKr+Wb47KWjEKxXhfU5vtIwFMaU+aoy4ybPcA7kDJ/yZ9RWiSJoGGphqPnKabhl7OYHKPv0awPEowd4ml91XWHxqqDyXEvvKGRkpZe3c7VZWcvi/wCr/7GmqF39qgQ35BASXm1Fv57z4KuczhQDLEMDLsTTA5ACtRmE+umiMPkBMtbzEiteloCX5lBckudp5966j8sSL9rNjGVk1KfSChYXwGK3bqEZXk22usLoBhXyCDsS2PRzrgjjljy6gyg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(38100700002)(2906002)(16576012)(26005)(8936002)(53546011)(4326008)(6666004)(66946007)(66556008)(110136005)(66476007)(2616005)(7406005)(956004)(31686004)(186003)(5660300002)(36756003)(82960400001)(8676002)(44832011)(508600001)(86362001)(7416002)(6486002)(31696002)(107886003)(316002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YitucDdXN05JWGllWlhxRlE5d2YrNkJXclJ4UU1CTUxwSC9ncGtlaWZZd1N1?= =?utf-8?B?ejE4WnU2aXFLK292S2pyNVZnVUZ5M1RHYUdQY2djelRyNENuMUFZZFV6eXRW?= =?utf-8?B?T2pQY1AxSXFFdi9LTTg1Rm1XY1hRM0pQS0xmZks0S2xaVlFUQm1YTDJwQmJK?= =?utf-8?B?SzlMNDhVMjhSK1FtWXdMdnNFZVdCcE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ZNdFVYdkxub01BUHNCSWx6aEVrT0RCbXhPbnZkbFNoWkU3?= =?utf-8?B?UmltcHMxcW9IRjZXR3dnVW5zWGlhT2JhYVczcWRjbWViUWVRSk1sa2dueEJ2?= =?utf-8?B?YW95OTlOWWo3aytmbEFZRjNGSGp3ODVKa3pRdVhsV0Q4dTBaT0I1ZGoycWN3?= =?utf-8?B?QXBRclpQWCtWeDFnYmw2K1FkcnFpZ1dJaUNDTE1ydEhId0pXWEIyM2d0UWpz?= =?utf-8?B?UVM5SGgxSUJEQWFUUUUxem9Wa09rcEU2TkUrVmFqdVRrOG56V1BnWUpCYWRV?= =?utf-8?B?RXJSUzQrT01DNVpzZzZETHg0ZXJHK2cxbmJZRDloVGRuWmxDa09sZkh5T2Fl?= =?utf-8?B?M2hha2xlZjY3UnFNYlA3Z3ByL3ZnT3Zud0JKVkdML1VuQlZ3ZlJSZU10QzVG?= =?utf-8?B?QnB2OTdYMytBNkNJMWwxV2hUSnVsTC96aEo4MWV1dGRmSXp2RmtHWkhYV1Np?= =?utf-8?B?WkpzNjJTUTUvQ3d6TEFabDlLbGVlamVFRjhiRjhET1VKT0FLS0NIOGdYK1V4?= =?utf-8?B?TTBmalppaVRpckpGMjZTWjdFL0o2YU5VRDl1U2FTN3hwOGYybDVHUFhDRU1T?= =?utf-8?B?NEpuMVAzZXhucUFsVVpJSjhPdE12d2M2NkQyZ2ZSNlVDT2Rza1lUM1ZsQWFi?= =?utf-8?Q?xNYsRgdBFLxp5zcWbR7JBiHmmZ/y8/082fYhSLW?= X-MS-Exchange-CrossTenant-Network-Message-Id: 1961bbdc-56ca-4b30-ab70-08d98e7b7bcf X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2021 18:58:46.4659 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0QY68pemyotiAu38RBt/XwMHcU+qllkAOGAFvc6gqdclInN/uivsKdCelw/O9PYaQnIvJ/vUixx7R1rWwpXnMw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5125 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v6 5/6] ethdev: add API to retrieve multiple ethernet addresses 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 Sender: "dev" On 10/13/2021 3:31 PM, Andrew Rybchenko wrote: > On 10/13/21 4:37 PM, Konstantin Ananyev wrote: >> Introduce rte_eth_macaddrs_get() to allow user to retrieve all ethernet > > ethernet -> Ethernet > >> addresses assigned to given port. >> Change testpmd to use this new function and avoid referencing directly >> rte_eth_devices[]. >> >> Signed-off-by: Konstantin Ananyev > > Reviewed-by: Andrew Rybchenko > > except one nit below > > [snip] > >> diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h >> index f4c92b3b5e..dbc14f4a23 100644 >> --- a/lib/ethdev/rte_ethdev.h >> +++ b/lib/ethdev/rte_ethdev.h >> @@ -3007,6 +3007,27 @@ int rte_eth_dev_set_rx_queue_stats_mapping(uint16_t port_id, >> */ >> int rte_eth_macaddr_get(uint16_t port_id, struct rte_ether_addr *mac_addr); >> >> +/** > > Experimental header is missing > I can add while merging to next-net. >> + * Retrieve the Ethernet addresses of an Ethernet device. >> + * >> + * @param port_id >> + * The port identifier of the Ethernet device. >> + * @param ma >> + * A pointer to an array of structures of type *ether_addr* to be filled with >> + * the Ethernet addresses of the Ethernet device. >> + * @param num >> + * Number of elements in the @p ma array. >> + * Note that rte_eth_dev_info::max_mac_addrs can be used to retrieve >> + * max number of Ethernet addresses for given port. >> + * @return >> + * - number of retrieved addresses if successful >> + * - (-ENODEV) if *port_id* invalid. >> + * - (-EINVAL) if bad parameter. >> + */ >> +__rte_experimental >> +int rte_eth_macaddrs_get(uint16_t port_id, struct rte_ether_addr *ma, >> + unsigned int num); >> + >> /** >> * Retrieve the contextual information of an Ethernet device. >> * > > [snip] >