[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4FFD3BE5.2070508@mellanox.com>
Date: Wed, 11 Jul 2012 11:40:05 +0300
From: Or Gerlitz <ogerlitz@...lanox.com>
To: Ben Hutchings <bhutchings@...arflare.com>
CC: <davem@...emloft.net>, <roland@...nel.org>,
<netdev@...r.kernel.org>, <ali@...lanox.com>,
<sean.hefty@...el.com>, Erez Shitrit <erezsh@...lanox.co.il>
Subject: Re: [PATCH net-next 5/9] net/eipoib: Add ethtool file support
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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists