netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hadar Hen Zion <hadarh@dev.mellanox.co.il>
To: Govindarajulu Varadarajan <_govind@gmx.com>,
	Ben Hutchings <ben@decadent.org.uk>
Cc: netdev <netdev@vger.kernel.org>,
	Or Gerlitz <ogerlitz@mellanox.com>,
	yevgenyp@mellanox.com, Amir Vadai <amirv@mellanox.com>
Subject: Re: [PATCH ethtool v2 2/3] ethtool: Add copybreak support
Date: Wed, 13 May 2015 10:18:47 +0300	[thread overview]
Message-ID: <CAJL1qvEe1FmzN7xtuuhYHM_-0Wy=dGma3aY1e6zAqUiuv5gTWg@mail.gmail.com> (raw)
In-Reply-To: <1418579187.3599.130.camel@decadent.org.uk>

On Sun, Dec 14, 2014 at 8:46 PM, Ben Hutchings <ben@decadent.org.uk> wrote:
> On Tue, 2014-10-07 at 04:42 +0530, Govindarajulu Varadarajan wrote:
>> This patch adds support for setting/getting driver's rx_copybreak value.
>> copybreak is set/get using new ethtool tunable interface.
>>
>> This was added to net-next in
>> commit: f0db9b073415848709dd59a6394969882f517da9
>>
>>       ethtool: Add generic options for tunables
>>
>> Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
>> ---
>>  ethtool.c | 177 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 177 insertions(+)
>>
>> diff --git a/ethtool.c b/ethtool.c
>> index bf583f3..4045356 100644
>> --- a/ethtool.c
>> +++ b/ethtool.c
>> @@ -179,6 +179,12 @@ static const struct flag_info flags_msglvl[] = {
>>       { "wol",        NETIF_MSG_WOL },
>>  };
>>
>> +static const char *tunable_name[] = {
>> +     [ETHTOOL_ID_UNSPEC]     = "Unspec",
>> +     [ETHTOOL_RX_COPYBREAK]  = "rx",
>> +     [ETHTOOL_TX_COPYBREAK]  = "tx",
>> +};
>
> Tunables should be named by a string set defined in the kernel.
>
> [...]
>> @@ -4055,6 +4228,10 @@ static const struct option {
>>           "             [ rx-mini N ]\n"
>>           "             [ rx-jumbo N ]\n"
>>           "             [ tx N ]\n" },
>> +       { "-b|--show-copybreak", 1, do_gcopybreak, "Show copybreak values" },
>> +       { "-B|--set-copybreak", 1, do_scopybreak, "Set copybreak values",
>> +         "             [ rx N]\n"
>> +         "             [ tx N]\n" },
>>         { "-k|--show-features|--show-offload", 1, do_gfeatures,
>>           "Get state of protocol offload and other features" },
>>         { "-K|--features|--offload", 1, do_sfeatures,
> [...]
>
> T don't think this is worth two options of its own.  You should be able
> to add generic get/set-tunable optins.  You'll need to get the string
> set to find out the names of tunables.  When setting a tunable, you'll
> need to get it first to find out its type.
>
> Ben.
>
> --
> Ben Hutchings
> The two most common things in the universe are hydrogen and stupidity.

Hi Govindarajulu,

Do you have a patch that fixes Ben's comments?

I would like to add the copybreak feature so let me know if you want
me to fix the patch according to Ben's comments and resend it.

Thanks,
Hadar

  reply	other threads:[~2015-05-13  7:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-06 23:12 [PATCH ethtool v2 0/3] Add copybreak support Govindarajulu Varadarajan
2014-10-06 23:12 ` [PATCH ethtool v2 1/3] ethtool-copy.h: Sync with net-next 3.17.0-rc7 Govindarajulu Varadarajan
2014-10-06 23:12 ` [PATCH ethtool v2 2/3] ethtool: Add copybreak support Govindarajulu Varadarajan
2014-12-14 17:46   ` Ben Hutchings
2015-05-13  7:18     ` Hadar Hen Zion [this message]
2015-05-19  3:47       ` Govindarajulu Varadarajan
2014-10-06 23:12 ` [PATCH ethtool v2 3/3] ethtool.8.in: Add man page for copybreak Govindarajulu Varadarajan

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='CAJL1qvEe1FmzN7xtuuhYHM_-0Wy=dGma3aY1e6zAqUiuv5gTWg@mail.gmail.com' \
    --to=hadarh@dev.mellanox.co.il \
    --cc=_govind@gmx.com \
    --cc=amirv@mellanox.com \
    --cc=ben@decadent.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=yevgenyp@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).