All of lore.kernel.org
 help / color / mirror / Atom feed
From: Or Gerlitz <ogerlitz@mellanox.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: <davem@davemloft.net>, <roland@kernel.org>,
	<netdev@vger.kernel.org>, <ali@mellanox.com>,
	<sean.hefty@intel.com>, Erez Shitrit <erezsh@mellanox.co.il>
Subject: Re: [PATCH net-next 5/9] net/eipoib: Add ethtool file support
Date: Wed, 11 Jul 2012 11:40:05 +0300	[thread overview]
Message-ID: <4FFD3BE5.2070508@mellanox.com> (raw)
In-Reply-To: <1341942493.2605.21.camel@bwh-desktop.uk.solarflarecom.com>

On 7/10/2012 8:48 PM, Ben Hutchings wrote:
> +static void parent_ethtool_get_drvinfo(struct net_device *parent_dev,
> +				       struct ethtool_drvinfo *drvinfo)
> +{
> +	struct parent *parent = netdev_priv(parent_dev);
> +
> +	if (strlen(DRV_NAME) + strlen(parent->ipoib_main_interface) > 31)
> +		strncpy(drvinfo->driver, "driver name is too long", 32);
> Returning error messages like is stupid; either truncate or WARN.

OK

>
>> +	else
>> +		sprintf(drvinfo->driver, "%s:%s",
>> +			DRV_NAME, parent->ipoib_main_interface);
> Why do you not use the separate driver and bus_info fields?

OK, we'll use the bus info field for placing the name of the PIF



>
>> +static const char parent_strings[][ETH_GSTRING_LEN] = {
>> +	/* public statistics */
>> +	"rx_packets", "tx_packets", "rx_bytes",
>> +	"tx_bytes", "rx_errors", "tx_errors",
>> +	"rx_dropped", "tx_dropped", "multicast",
>> +	"collisions", "rx_length_errors", "rx_over_errors",
>> +	"rx_crc_errors", "rx_frame_errors", "rx_fifo_errors",
>> +	"rx_missed_errors", "tx_aborted_errors", "tx_carrier_errors",
>> +	"tx_fifo_errors", "tx_heartbeat_errors", "tx_window_errors",
>> +#define PUB_STATS_LEN	21
> [...]
>
> This is duplicating the basic netdev statistics that are already available without
> ethtool.  Most of them are completely meaningless for Infiniband, I suspect.

OK, will implement the ndo get stats entry for the basic statistics instead

  reply	other threads:[~2012-07-11  8:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-10 12:16 [PATCH net-next 0/9] Add Ethernet IPoIB driver Or Gerlitz
2012-07-10 12:16 ` [PATCH net-next 1/9] IB/ipoib: Add support for clones / multiple childs on the same partition Or Gerlitz
2012-07-10 12:16 ` [PATCH net-next 2/9] include/linux: Add private flags for IPoIB interfaces Or Gerlitz
2012-07-10 12:16 ` [PATCH net-next 3/9] IB/ipoib: Add support for acting as VIF Or Gerlitz
2012-07-10 12:26   ` Eric Dumazet
2012-07-11  8:05     ` Or Gerlitz
2012-07-11  8:19       ` David Miller
2012-07-11  9:59         ` Or Gerlitz
2012-07-11 10:06           ` David Miller
2012-07-11 10:27             ` Eric Dumazet
2012-07-11 11:46               ` Or Gerlitz
2012-07-10 12:16 ` [PATCH net-next 4/9] net/eipoib: Add private header file Or Gerlitz
2012-07-10 12:16 ` [PATCH net-next 5/9] net/eipoib: Add ethtool file support Or Gerlitz
2012-07-10 17:48   ` Ben Hutchings
2012-07-11  8:40     ` Or Gerlitz [this message]
2012-07-10 12:16 ` [PATCH net-next 6/9] net/eipoib: Add sysfs support Or Gerlitz
2012-07-10 12:16 ` [PATCH net-next 7/9] net/eipoib: Add main driver functionality Or Gerlitz
2012-07-10 12:16 ` [PATCH net-next 8/9] net/eipoib: Add Makefile, Kconfig and MAINTAINERS entries Or Gerlitz
2012-07-10 12:16 ` [PATCH net-next 9/9] IB/ipoib: Add support for transmission of skbs w.o dst/neighbour Or Gerlitz

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=4FFD3BE5.2070508@mellanox.com \
    --to=ogerlitz@mellanox.com \
    --cc=ali@mellanox.com \
    --cc=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=erezsh@mellanox.co.il \
    --cc=netdev@vger.kernel.org \
    --cc=roland@kernel.org \
    --cc=sean.hefty@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.