Hi , > -----Original Message----- > From: Stephen Hemminger [mailto:step...@networkplumber.org] > Sent: Tuesday, June 27, 2017 11:26 PM > To: Nicolau, Radu <radu.nico...@intel.com> > Cc: dev@dpdk.org; Lu, Wenzhuo <wenzhuo...@intel.com>; Pattan, Reshma > <reshma.pat...@intel.com>; Jastrzebski, MichalX K > <michalx.k.jastrzeb...@intel.com>; Jain, Deepak K > <deepak.k.j...@intel.com>; Van Haaren, Harry > <harry.van.haa...@intel.com>; piotrx.t.azarew...@intel.com > Subject: Re: [dpdk-dev] [PATCH v2] drivers/net: add support for IF-MIB and > EtherLike-MIB for e1000 > > On Mon, 26 Jun 2017 10:42:13 +0100 > Radu Nicolau <radu.nico...@intel.com> wrote: > > > From: Michal Jastrzebski <michalx.k.jastrzeb...@intel.com> > > > > If-MIB xstats: > > ifNumber > > ifIndex > > ifType > > ifMtu > > ifSpeed > > ifPhysAddress > > ifOperStatus > > ifLastChange > > ifHighSpeed > > ifConnectorPresent > > ifCounterDiscontinuityTime > > > > EtherLike-MIB xstats: > > dot3PauseOperMode > > dot3StatsDuplexStatus > > dot3StatsRateControlAbility > > dot3StatsRateControlStatus > > dot3ControlFunctionsSupported > > > > -updated in v2: coding style > > > > Signed-off-by: Piotr Azarewicz <piotrx.t.azarew...@intel.com> > > Signed-off-by: Michal Jastrzebski <michalx.k.jastrzeb...@intel.com> > > Signed-off-by: Radu Nicolau <radu.nico...@intel.com> > > Although this maybe the easiest way for Intel, and satisfy a specific user's > request. It is not a good way forward for the DPDK project. > > This must be generic, not specific to device drivers. > If implementing a MIB variable requires more information than ethdev API > has now, then extend ethdev API first. >
Yes, most of the MIB attributes can be fetched from rte_eth_dev_data/rte_eth_dev_info. Re expressing my opinion (a) below which I did in other mail: (a)For the MIB attributes which do not have any ethdev API support, how about getting all of them from PMDs via a new dev_op like xstats_get?. Then add the new eth_dev API, which does call to this new dev_op and other existing ethdev APIs to gather all mib information and expose that to user based on port_id. (Or) (b)Should we expand rte_eth_dev_info or rte_eth_dev_data to add missing mib attributes, fetch them from PMDs using dev_infos_get() and expose to user. Adding new mib attributes to existing structs might need ABI break announcements. But both cases (a) and (b) does need some PMD changes. Please let me know what you think about the points a and b. Thanks, Reshma