All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roopa Prabhu <roopa@cumulusnetworks.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: Thomas Graf <tgraf@suug.ch>,
	netdev@vger.kernel.org, davem@davemloft.net, nogahf@mellanox.com,
	idosch@mellanox.com, eladr@mellanox.com, yotamg@mellanox.com,
	ogerlitz@mellanox.com, nikolay@cumulusnetworks.com,
	linville@tuxdriver.com, gospo@cumulusnetworks.com,
	sfeldma@gmail.com, sd@queasysnail.net, eranbe@mellanox.com,
	ast@plumgrid.com, edumazet@google.com,
	hannes@stressinduktion.org
Subject: Re: [patch net-next 1/4] netdevice: add SW statistics ndo
Date: Tue, 17 May 2016 07:42:22 -0700	[thread overview]
Message-ID: <573B2DCE.9030907@cumulusnetworks.com> (raw)
In-Reply-To: <20160517084145.GA2057@nanopsycho.orion>

On 5/17/16, 1:41 AM, Jiri Pirko wrote:
> Tue, May 17, 2016 at 10:39:08AM CEST, tgraf@suug.ch wrote:
>> On 05/12/16 at 01:48pm, Jiri Pirko wrote:
>>> diff --git a/net/core/dev.c b/net/core/dev.c
>>> index 12436d1..a69e418 100644
>>> --- a/net/core/dev.c
>>> +++ b/net/core/dev.c
>>> @@ -7376,6 +7376,8 @@ EXPORT_SYMBOL(netdev_stats_to_stats64);
>>>   *	The device driver may provide its own method by setting
>>>   *	dev->netdev_ops->get_stats64 or dev->netdev_ops->get_stats;
>>>   *	otherwise the internal statistics structure is used.
>>> + *	If device supports both HW & SW statistics - this function should
>>> + *	return the HW statistics.
>>>   */
>>>  struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
>>>  					struct rtnl_link_stats64 *storage)
>> Can we clarify in a comment that given HW stats are available whether this
>> would continue to account for something like a memory allocation failure
>> through tx_dropped (for drivers which do skb_realloc_headroom() in xmit)
>> or tx_busy for when the ring is busy? HW would never see such failures Is
>> the expectation that dev_get_stats() continues to include these software
>> failures?
> I think it makes sense to merge HW counters with the kernel error counters
> you mention. We'll fix that. Thanks.
yep. This is what i was pointing out as well with enic and possibly other drivers.
Mellanox driver does it or not...,..the comment should definitely be fixed since
some drivers already do this.

  reply	other threads:[~2016-05-17 14:42 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-12 11:48 [patch net-next 0/4] return offloaded stats as default and expose original sw start Jiri Pirko
2016-05-12 11:48 ` [patch net-next 1/4] netdevice: add SW statistics ndo Jiri Pirko
2016-05-12 21:10   ` Roopa Prabhu
2016-05-12 22:23     ` Florian Fainelli
2016-05-13  6:06       ` Jiri Pirko
2016-05-13  6:03     ` Jiri Pirko
2016-05-13 18:47       ` Roopa Prabhu
2016-05-14 12:49         ` Jiri Pirko
2016-05-14 15:47           ` Roopa Prabhu
2016-05-14 18:46             ` Jiri Pirko
2016-05-15  4:11               ` Roopa Prabhu
2016-05-15  6:47                 ` Jiri Pirko
2016-05-15 15:44               ` Andrew Lunn
2016-05-16  9:00                 ` Jiri Pirko
2016-05-17  8:39   ` Thomas Graf
2016-05-17  8:41     ` Jiri Pirko
2016-05-17 14:42       ` Roopa Prabhu [this message]
2016-05-12 11:48 ` [patch net-next 2/4] rtnetlink: add HW/SW stats distinction in rtnl_fill_stats Jiri Pirko
2016-05-12 15:51   ` David Miller
2016-05-12 11:48 ` [patch net-next 3/4] net: core: add SW stats to if_stats_msg Jiri Pirko
2016-05-12 11:48 ` [patch net-next 4/4] mlxsw: spectrum: Implement SW stats ndo and expose HW stats by default Jiri Pirko
  -- strict thread matches above, loose matches on Subject: below --
2016-05-12  9:59 [patch net-next 0/4] return offloaded stats as default and expose original sw start Jiri Pirko
2016-05-12  9:59 ` [patch net-next 1/4] netdevice: add SW statistics ndo Jiri Pirko

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=573B2DCE.9030907@cumulusnetworks.com \
    --to=roopa@cumulusnetworks.com \
    --cc=ast@plumgrid.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eladr@mellanox.com \
    --cc=eranbe@mellanox.com \
    --cc=gospo@cumulusnetworks.com \
    --cc=hannes@stressinduktion.org \
    --cc=idosch@mellanox.com \
    --cc=jiri@resnulli.us \
    --cc=linville@tuxdriver.com \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.com \
    --cc=nogahf@mellanox.com \
    --cc=ogerlitz@mellanox.com \
    --cc=sd@queasysnail.net \
    --cc=sfeldma@gmail.com \
    --cc=tgraf@suug.ch \
    --cc=yotamg@mellanox.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.