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 98ABBA0C4C; Tue, 5 Oct 2021 19:41:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7AC5341419; Tue, 5 Oct 2021 19:41:56 +0200 (CEST) Received: from new3-smtp.messagingengine.com (new3-smtp.messagingengine.com [66.111.4.229]) by mails.dpdk.org (Postfix) with ESMTP id 38A2241414 for ; Tue, 5 Oct 2021 19:41:55 +0200 (CEST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id DF077581007; Tue, 5 Oct 2021 13:41:52 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 05 Oct 2021 13:41:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm2; bh= GDnzQL6UwIeTmNx14jDRBGNluthIptGdZT8uXmzVoGU=; b=KUSz5kZcYrHrYrrt f7BPwIjfdqzJZmbs5l4w2w0OW4SYKBeEvgCP/Wcid6yppJRoBXK+rjSrst2zVXNh ECbXdFhgJTIJQiCo/sbX/NtvGLp94VhywuwMDK9ZTlWBJfV8YyY1mK/e2Rj7wfOB IEBtAvzVKmEdh12wqvuxtN+ewJpl1EdIwbt2kAo3pORq5AJFhnQaw1h4n75Sby0f U7QqNSqQKYOPNIjnoMLM4vPWPSTDgkvi2+uI1i8iWT+PdrZrrT8IRtRTDxf6MZHd qFcnfDPYqSnVa154b9kfrzdl1h+JgGM5Dd2JRxsOYvDs0yQt1jT11b7eG+os0XX+ 5trRHQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=GDnzQL6UwIeTmNx14jDRBGNluthIptGdZT8uXmzVo GU=; b=GiSq0QeoammqATAP0i94IeL/WaRq4HIhiv9vR1XqWfG2zSxaMmTVP1OHW NmzeIqBtsr5KmSblOnNzLde+wEdBS144GGQtzwYHdakssJd9c3+ZlMNoWnBcSte2 pm1ICY8RP6XQkNpGrwZRPmhc2r5esIAa8P3h3sFwTUX9VBg6KlOuCc/DL5GDe9K7 BP0qaMlSYX9fisq8NdWYdcFQwbUH6wdsL9uNcJI3Y/zH9AJ0hUjp6Q1RFWdueXJx Yqlne5q+vldJG8UF8jc7v7JrAVLPqBvI5MH/6BUCq0cQdIvuR0jlzGfNwI51HmwZ 3aVw0pFvIkjd1HaSwORaGnLeCVt2A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudelgedgudduiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdej ueeiiedvffegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 5 Oct 2021 13:41:43 -0400 (EDT) From: Thomas Monjalon To: "Ananyev, Konstantin" Cc: "dev@dpdk.org" , "Li, Xiaoyun" , "anoobj@marvell.com" , "jerinj@marvell.com" , "ndabilpuram@marvell.com" , "adwivedi@marvell.com" , "shepard.siegel@atomicrules.com" , "ed.czeck@atomicrules.com" , "john.miller@atomicrules.com" , "irusskikh@marvell.com" , "ajit.khaparde@broadcom.com" , "somnath.kotur@broadcom.com" , "rahul.lakkireddy@chelsio.com" , "hemant.agrawal@nxp.com" , "sachin.saxena@oss.nxp.com" , "Wang, Haiyue" , "Daley, John" , "hyonkim@cisco.com" , "Zhang, Qi Z" , "Wang, Xiao W" , "humin29@huawei.com" , "yisen.zhuang@huawei.com" , "oulijun@huawei.com" , "Xing, Beilei" , "Wu, Jingjing" , "Yang, Qiming" , "matan@nvidia.com" , "viacheslavo@nvidia.com" , "sthemmin@microsoft.com" , "longli@microsoft.com" , "heinrich.kuhn@corigine.com" , "kirankumark@marvell.com" , "andrew.rybchenko@oktetlabs.ru" , "mczekaj@marvell.com" , "jiawenwu@trustnetic.com" , "jianwang@trustnetic.com" , "maxime.coquelin@redhat.com" , "Xia, Chenbo" , "Yigit, Ferruh" , "mdr@ashroe.eu" , "Jayatheerthan, Jay" Date: Tue, 05 Oct 2021 19:41:40 +0200 Message-ID: <2075145.3rKLLtVdIh@thomas> In-Reply-To: References: <20211001140255.5726-1-konstantin.ananyev@intel.com> <3664681.X88tCSIGuU@thomas> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v4 5/7] 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" 05/10/2021 19:12, Ananyev, Konstantin: > > 05/10/2021 18:35, Ananyev, Konstantin: > > > > 04/10/2021 15:56, Konstantin Ananyev: > > > > > Introduce rte_eth_macaddrs_get() to allow user to retrieve all ethernet > > > > > addresses assigned to given port. > > > > > > > > We already have functions to get MAC addresses. > > > > Please explain the difference. > > > > > > rte_eth_macaddr_get() returns just first (primary) MAC address > > > assigned to the port. > > > That one allow user to retrieve all addresses assigned to the port. > > > > I was sure we had other function. > > I didn't find one. > If we do, I am ok to drop that change and rework testpmd code to use > existing one instead. No there is no alternative, so your patch is welcome. > > Anyway, would be good to reference rte_eth_macaddr_get in the commit. > > > > > > > > > +/** > > > > > + * 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 *ma* array. > > > > > + * @return > > > > > + * - number of retrieved addresses if successful > > > > > + * - (-ENODEV) if *port_id* invalid. > > > > > + * - (-EINVAL) if bad parameter. > > > > > > > > Which error if the array is too small? > > > > > > None, we just return up to *num* addresses, that's it. > > > > So we don't know know whether there are more. > > rte_eth_dev_info. max_mac_addrs tells max number of MACs for this port. Right. Please mention it in the comment of this function.