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>, <shlomop@mellanox.com>,
Erez Shitrit <erezsh@mellanox.co.il>
Subject: Re: [PATCH net-next V1 5/9] net/eipoib: Add ethtool file support
Date: Thu, 19 Jul 2012 18:55:57 +0300 [thread overview]
Message-ID: <50082E0D.9070202@mellanox.com> (raw)
In-Reply-To: <1342636621.2617.63.camel@bwh-desktop.uk.solarflarecom.com>
On 7/18/2012 9:37 PM, Ben Hutchings wrote:
> +static void parent_get_strings(struct net_device *parent_dev,
> + uint32_t stringset, uint8_t *data)
> +{
> + int index = 0, stats_off = 0, i;
> +
> + if (stringset != ETH_SS_STATS)
> + return;
> +
> + for (i = 0; i < PORT_STATS_LEN; i++)
> + strcpy(data + (index++) * ETH_GSTRING_LEN,
> + parent_strings[i + stats_off]);
> +
> + stats_off += PORT_STATS_LEN;
> This is a very longwinded way to write:
> memcpy(data, parent_strings, sizeof(parent_strings));
SURE, will fix
>
>> +static int parent_get_sset_count(struct net_device *parent_dev, int sset)
>> +{
>> + switch (sset) {
>> + case ETH_SS_STATS:
>> + return PARENT_STATS_LEN;
>>
> [...]
>
> I get the feeling you've removed some code with unifdef; the result
> looks really weird, with PORT_STATS_LEN and PARENT_STATS_LEN used
> inconsistently.
yep, this needs cleanup, will do for V2
Or.
next prev parent reply other threads:[~2012-07-19 15:56 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-18 10:59 [PATCH net-next V1 0/9] Add Ethernet IPoIB driver Or Gerlitz
2012-07-18 10:59 ` [PATCH net-next V1 1/9] IB/ipoib: Add support for clones / multiple childs on the same partition Or Gerlitz
2012-07-18 18:38 ` David Miller
2012-07-18 21:24 ` Or Gerlitz
2012-07-18 21:36 ` David Miller
2012-07-18 22:11 ` John Fastabend
2012-07-19 8:11 ` Or Gerlitz
2012-07-18 10:59 ` [PATCH net-next V1 2/9] include/linux: Add private flags for IPoIB interfaces Or Gerlitz
2012-07-18 10:59 ` [PATCH net-next V1 3/9] IB/ipoib: Add support for acting as VIF Or Gerlitz
2012-07-18 10:59 ` [PATCH net-next V1 4/9] net/eipoib: Add private header file Or Gerlitz
2012-07-18 10:59 ` [PATCH net-next V1 5/9] net/eipoib: Add ethtool file support Or Gerlitz
2012-07-18 18:37 ` Ben Hutchings
2012-07-19 15:55 ` Or Gerlitz [this message]
2012-07-18 10:59 ` [PATCH net-next V1 6/9] net/eipoib: Add sysfs support Or Gerlitz
2012-07-23 12:55 ` Or Gerlitz
2012-07-18 11:00 ` [PATCH net-next V1 7/9] net/eipoib: Add main driver functionality Or Gerlitz
2012-07-19 13:49 ` Ben Hutchings
2012-07-19 15:46 ` Or Gerlitz
2012-07-19 16:16 ` Ben Hutchings
2012-07-19 16:21 ` Or Gerlitz
2012-07-18 11:00 ` [PATCH net-next V1 8/9] net/eipoib: Add Makefile, Kconfig and MAINTAINERS entries Or Gerlitz
2012-07-18 11:00 ` [PATCH net-next V1 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=50082E0D.9070202@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 \
--cc=shlomop@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.