All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zijie Pan" <zijie.pan@6wind.com>
To: "Thomas Monjalon" <thomas@monjalon.net>
Cc: dev <dev@dpdk.org>, "remy.horton" <remy.horton@intel.com>,
	"ferruh.yigit" <ferruh.yigit@intel.com>,
	"john.mcnamara" <john.mcnamara@intel.com>,
	"marko.kovacevic" <marko.kovacevic@intel.com>
Subject: Re: [PATCH v4 1/5] ethdev: add access to eeprom
Date: Wed, 25 Apr 2018 16:21:13 +0800	[thread overview]
Message-ID: <tencent_350B2AA47931B43446D17921@qq.com> (raw)
In-Reply-To: <2623487.7NZ038SaYX@xps>

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?

> 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?

> > +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.

> > --- 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.

Thanks & Regards,
Zijie

  reply	other threads:[~2018-04-25  8:21 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-12  4:17 [PATCH 0/5] Patches to get the information and data of EEPROM Zijie Pan
2018-03-12  4:17 ` [PATCH 1/5] ethdev: add access to eeprom Zijie Pan
2018-03-13 14:51   ` Remy Horton
2018-03-16  9:38   ` [PATCH v2 " Zijie Pan
2018-03-16  9:59     ` Remy Horton
2018-03-12  4:17 ` [PATCH 2/5] examples/ethtool: add a new command module-eeprom Zijie Pan
2018-03-13 14:46   ` Remy Horton
2018-03-16  9:41   ` [PATCH v2 " Zijie Pan
2018-03-16  9:59     ` Remy Horton
2018-03-12  4:17 ` [PATCH 3/5] net/ixgbe: add module EEPROM callbacks for ixgbe Zijie Pan
2018-03-13 14:46   ` Remy Horton
2018-03-16  9:42   ` [PATCH v2 " Zijie Pan
2018-03-16 10:08     ` Remy Horton
2018-03-12  4:17 ` [PATCH 4/5] net/e1000: add module EEPROM callbacks for e1000 Zijie Pan
2018-03-16  9:42   ` [PATCH v2 " Zijie Pan
2018-03-12  4:17 ` [PATCH 5/5] net/i40e: add module EEPROM callbacks for i40e Zijie Pan
2018-03-16  9:42   ` [PATCH v2 " Zijie Pan
2018-03-13 15:19 ` [PATCH 0/5] Patches to get the information and data of EEPROM Remy Horton
2018-03-16  9:36 ` [PATCH v2 0/5] " Zijie Pan
2018-03-21 11:06   ` [PATCH v3 " Zijie Pan
2018-03-21 11:06     ` [PATCH v3 1/5] ethdev: add access to eeprom Zijie Pan
2018-04-19 13:34       ` Ferruh Yigit
2018-04-22 21:13       ` Thomas Monjalon
2018-03-21 11:06     ` [PATCH v3 2/5] examples/ethtool: add a new command module-eeprom Zijie Pan
2018-03-21 11:06     ` [PATCH v3 3/5] net/ixgbe: add module EEPROM callbacks for ixgbe Zijie Pan
2018-03-21 11:06     ` [PATCH v3 4/5] net/e1000: add module EEPROM callbacks for e1000 Zijie Pan
2018-03-21 11:06     ` [PATCH v3 5/5] net/i40e: add module EEPROM callbacks for i40e Zijie Pan
2018-04-19 13:36     ` [PATCH v3 0/5] get the information and data of EEPROM Ferruh Yigit
2018-04-19 14:17       ` Remy Horton
2018-04-24 10:17     ` [PATCH v4 " Zijie Pan
2018-04-24 10:17       ` [PATCH v4 1/5] ethdev: add access to eeprom Zijie Pan
2018-04-24 10:25         ` Thomas Monjalon
2018-04-25  8:21           ` Zijie Pan [this message]
2018-04-25  8:31             ` Thomas Monjalon
2018-04-24 10:17       ` [PATCH v4 2/5] examples/ethtool: add a new command module-eeprom Zijie Pan
2018-04-24 10:17       ` [PATCH v4 3/5] net/ixgbe: add module EEPROM callbacks for ixgbe Zijie Pan
2018-04-24 10:17       ` [PATCH v4 4/5] net/e1000: add module EEPROM callbacks for e1000 Zijie Pan
2018-04-24 10:17       ` [PATCH v4 5/5] net/i40e: add module EEPROM callbacks for i40e Zijie Pan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tencent_350B2AA47931B43446D17921@qq.com \
    --to=zijie.pan@6wind.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=john.mcnamara@intel.com \
    --cc=marko.kovacevic@intel.com \
    --cc=remy.horton@intel.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.