All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pattan, Reshma" <reshma.pattan@intel.com>
To: "Jastrzebski, MichalX K" <michalx.k.jastrzebski@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "Jain, Deepak K" <deepak.k.jain@intel.com>,
	"Van Haaren, Harry" <harry.van.haaren@intel.com>,
	"Azarewicz, PiotrX T" <piotrx.t.azarewicz@intel.com>
Subject: Re: [PATCH 1/3] drivers/net: add support for IF-MIB and EtherLike-MIB for e1000
Date: Mon, 22 May 2017 16:34:39 +0000	[thread overview]
Message-ID: <3AEA2BF9852C6F48A459DA490692831F0113CF3E@irsmsx110.ger.corp.intel.com> (raw)
In-Reply-To: <20170522143202.22424-2-michalx.k.jastrzebski@intel.com>

Hi,

Can you add the description to the commit message, describing what has been done.

General doubt I have , I see all IF-MIB and Ether-Like-MIB attributes are added as Xstats.
But most of  IF-MIB attributes are not stats, instead they are information about the interface/port.
So I guess such attributes should be displayed using separate method?   Everything being displayed as xstats might not be correct.

> ---
> 
> +#define E1000_MIB_IF_TYPE_ETHERNETCSMACD	6
> +
> +enum e1000_mib_truth_value {
> +	e1000_mib_truth_true = 1,
> +	e1000_mib_truth_false
> +};
> +

All enums should be in capital as per coding guidelines. Similarly correct author enums too.
We no need to have enum identifier, just enumerator list should be suffice like below. 
So you can check all enumerations added newly and correct them?
Ex:
enum
{  
enumerator-list  
}  

> +/* IF-MIB statistics */
> +struct e1000_if_mib_stats {
> +	uint64_t if_number;			/* ifNumber */
> +	uint64_t if_index;			/* ifIndex */
> +	uint64_t if_type;			/* ifType */
> +	uint64_t if_mtu;			/* ifMtu */
> +	uint64_t if_speed;			/* ifSpeed */
> +	uint64_t if_phys_address;		/* ifPhysAddress */
> +	uint64_t if_oper_status;		/* ifOperStatus */
> +	uint64_t if_last_change;		/* ifLastChange */
> +	uint64_t if_high_speed;			/* ifHighSpeed */
> +	uint64_t if_connector_present;		/* ifConnectorPresent */
> +	uint64_t if_counter_discontinuity_time;	/*
> ifCounterDiscontinuityTime */
> +};
> +

The comments should be inside /**<  Here the comment goes. */
Refer other files to see how it is done.

> +#define E1000_DOT3_CF_PAUSE	(1 << 0) /* PAUSE command
> implemented */
> +#define E1000_DOT3_CF_MPCP	(1 << 1) /* MPCP implemented */
> +#define E1000_DOT3_CF_PFC	(1 << 2) /* PFC implemented */
> +

The comments should be inside /**<  Here the comment goes. */

> +	uint64_t dot3_stats_rate_control_ability;
> +	/* dot3StatsRateControlAbility */
> +	uint64_t dot3_stats_rate_control_status;/*
> dot3StatsRateControlStatus */
> +	uint64_t dot3_control_functions_supported;
> +	/* dot3ControlFunctionsSupported */
> +};
> +

The comments line should go on top of the variables.

>  #define E1000_DEV_PRIVATE(adapter) \
> diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
> index e1702d8..705b591 100644
> --- a/drivers/net/e1000/igb_ethdev.c

Can you rename igb_if_mib_strings to rte_ igb_if_mib_strings and igb_if_mib_strings to rte_ igb_if_mib_strings? Similar to other stats/xstats.

eth_igb_stats_reset(), inside this function  we might not need below piece of code, as below piece of code you have already added to 
eth_igb_xstats_reset().

> stats->if_speed = (data->dev_link.link_speed < (UINT32_MAX / 1000000)) ?
>			(data->dev_link.link_speed * 1000000) : UINT32_MAX;

Can you clarify this link speed calculation logic

>	stats->if_last_change = adapter->if_last_change /
>			(rte_get_tsc_hz() * 100);

Can you clarify this logic?

Thanks,
Reshma

  parent reply	other threads:[~2017-05-22 16:34 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-22 14:31 [PATCH 0/3] drivers/net: add support for IF-MIB and EtherLike-MIB Michal Jastrzebski
2017-05-22 14:32 ` [PATCH 1/3] drivers/net: add support for IF-MIB and EtherLike-MIB for e1000 Michal Jastrzebski
2017-05-22 16:16   ` Pattan, Reshma
2017-05-22 16:34   ` Pattan, Reshma [this message]
2017-05-23  5:53     ` Lu, Wenzhuo
2017-06-20 11:38       ` Radu Nicolau
2017-06-26  9:42   ` [PATCH v2] " Radu Nicolau
2017-06-27 11:08     ` Ferruh Yigit
2017-06-27 11:21       ` Bruce Richardson
2017-06-27 11:36         ` Ferruh Yigit
2017-07-05 13:02           ` Pattan, Reshma
2017-06-27 22:26     ` Stephen Hemminger
2017-07-06 11:48       ` Pattan, Reshma
2017-07-19 10:40     ` Ferruh Yigit
2017-05-22 14:32 ` [PATCH 2/3] drivers/net: add support for IF-MIB and EtherLike-MIB for i40e Michal Jastrzebski
2017-05-31  5:29   ` Xing, Beilei
2017-06-26  9:41   ` [PATCH v2] " Radu Nicolau
2017-05-22 14:32 ` [PATCH 3/3] drivers/net: add support for IF-MIB and EtherLike-MIB for ixgbe Michal Jastrzebski
2017-06-26  9:39   ` [PATCH v2] " Radu Nicolau
2017-06-27 22:27     ` Stephen Hemminger
2017-05-22 16:11 ` [PATCH 0/3] drivers/net: add support for IF-MIB and EtherLike-MIB Stephen Hemminger

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=3AEA2BF9852C6F48A459DA490692831F0113CF3E@irsmsx110.ger.corp.intel.com \
    --to=reshma.pattan@intel.com \
    --cc=deepak.k.jain@intel.com \
    --cc=dev@dpdk.org \
    --cc=harry.van.haaren@intel.com \
    --cc=michalx.k.jastrzebski@intel.com \
    --cc=piotrx.t.azarewicz@intel.com \
    /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.