From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 074B310BD for ; Wed, 25 Apr 2018 10:31:46 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 77BEA21A88; Wed, 25 Apr 2018 04:31:46 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 25 Apr 2018 04:31:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=pQBaWLZSsz3dDNVnQYOAjMDkW0 WvFvNX/+SCbpq7QRk=; b=MnGGWKe1UgDh2bfBRBFyRHBkiqzGspWN9ql5RENTGJ uvj2+ahfaTRdT7MQhR0MqKuG+StoC5cVs0qfQ0DJrdsgJLAfnwbbH37jsPmVFZjz 5CD7Xj4NcF53pyfn1YBOpCOA9joFVotwOw4JVlshYNXgKya3O8/OEGGdOiSH4FiY Y= 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-sender:x-me-sender:x-sasl-enc; s=fm2; bh=pQBaWL ZSsz3dDNVnQYOAjMDkW0WvFvNX/+SCbpq7QRk=; b=aU4xP4vBSyVU3XdXSvazZ5 YWBJw+Jyg3BH7ZHkM9C4cNUqaFHao/1XxJJxuq8ZjZLYjHdnajspWik2J+QnkdBT Mslhlkt4u0UF/DLPeLy5Ek4sDDzdoPjUnNJPSo/a42paSxlMZ/WJZpGvrKyvofOg E0eY0Nmf5xgM57Hs7VaKXPh95szHCEbAlZtArk4S92fYg/gvsCFlwlB2wZ1Tkkd8 dgAp8gPYnDxTGN+3EL+4S2MJFSG4chvftrtNj565pRdcvZJEol9qsrbaQHmM/cHr 8TAarHttWNV8eZatfKiWmb/Lyi0bjv86Z5dugbgyDCWaJgUfHt7rZGCi/0R0oUFQ == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 9A139E47F2; Wed, 25 Apr 2018 04:31:45 -0400 (EDT) From: Thomas Monjalon To: Zijie Pan Cc: dev , "remy.horton" , "ferruh.yigit" , "john.mcnamara" , "marko.kovacevic" Date: Wed, 25 Apr 2018 10:31:44 +0200 Message-ID: <35483134.QvJqGnanPf@xps> In-Reply-To: References: <1521630379-9554-1-git-send-email-zijie.pan@6wind.com> <2623487.7NZ038SaYX@xps> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v4 1/5] ethdev: add access to eeprom X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2018 08:31:47 -0000 25/04/2018 10:21, Zijie Pan: > Hi Thomas, > > > > +/** > > > + * Placeholder for accessing plugin module eeprom > > > + */ > > > +struct rte_dev_module_info { > > > + uint32_t type; /**< Type of plugin module eeprom */ > > > + uint32_t eeprom_len; /**< Length of plugin module eeprom */ > > > +}; > > > > I am not sure "plugin module" is descriptive enough. > > Here is the description when "man ethtool": > -m --dump-module-eeprom --module-info > Retrieves and if possible decodes the EEPROM from plugin modules, e.g SFP+, QSFP. > Is there any suggestion how to describe it? No better idea. > > And I think the structure name should be rte_eth_dev_module_info > > to make clear that we are talking about NIC modules. > > Any better idea? > > Yes, rte_eth_dev_module_info is better than rte_dev_module_info. > But the name of other structures should be also changed. And the file name > should be changed to rte_eth_dev_info.h. > Do we need to make a patch first to change the name of the file and structures? No you can just focus on your change. If more clean-up is required in your opinion, you can do it later. > > > +int __rte_experimental > > > +rte_eth_dev_get_module_eeprom(uint16_t port_id, > > > + struct rte_dev_eeprom_info *info) > > > +{ > > > + struct rte_eth_dev *dev; > > > + > > > + RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > > > + > > > + dev = &rte_eth_devices[port_id]; > > > + RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->get_module_eeprom, -ENOTSUP); > > > + return (*dev->dev_ops->get_module_eeprom)(dev, info); > > > +} > > > + > > > int > > > rte_eth_dev_get_dcb_info(uint16_t port_id, > > > > Please move this code after other EEPROM related functions. > I put the functions after rte_eth_dev_set_eeprom(). Please apply the patch and check it. OK > > > --- a/lib/librte_ether/rte_ethdev_version.map > > > +++ b/lib/librte_ether/rte_ethdev_version.map > > > @@ -229,5 +229,7 @@ EXPERIMENTAL { > > > rte_mtr_policer_actions_update; > > > rte_mtr_stats_read; > > > rte_mtr_stats_update; > > > + rte_eth_dev_get_module_info; > > > + rte_eth_dev_get_module_eeprom; > > > > This must be inserted in alphabetical order. > I will update it in v5 patchset. Please send v5 ASAP, thanks.