netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Cc: netdev@vger.kernel.org,
	Dept_NX_Linux_NIC_Driver <Dept_NX_Linux_NIC_Driver@qlogic.com>
Subject: Re: [PATCH ethtool 3/3] ethtool: add ETHTOOL_{G,S}CHANNEL support.
Date: Tue, 04 Oct 2011 23:21:42 +0100	[thread overview]
Message-ID: <1317766902.2751.25.camel@bwh-desktop> (raw)
In-Reply-To: <1316514695-17157-4-git-send-email-sucheta.chakraborty@qlogic.com>

On Tue, 2011-09-20 at 03:31 -0700, Sucheta Chakraborty wrote:
> Used to configure number of rx and tx rings.
> Reqd. man page changes are included.
[...]
> @@ -754,6 +764,24 @@ lB	l.
>  Specify the location/ID to insert the rule. This will overwrite
>  any rule present in that location and will not go through any
>  of the rule ordering process.
> +.TP
> +.B \-l \-\-show\-channels
> +Queries the specified network device for channel parameter information.
> +.TP
> +.B \-L \-\-set\-channels
> +Changes the channel parameters of the specified network device.

I think the manual page needs to explain briefly what is meant by a
channel.  (So should ethtool.h, really!)

[...]
> @@ -495,6 +512,13 @@ static struct cmdline_info cmdline_ring[] = {
>  	{ "tx", CMDL_S32, &ring_tx_wanted, &ering.tx_pending },
>  };
>  
> +static struct cmdline_info cmdline_channels[] = {
> +	{ "rx_count", CMDL_S32, &channels_rx_wanted, &echannels.rx_count },
> +	{ "tx_count", CMDL_S32, &channels_tx_wanted, &echannels.tx_count },
> +	{ "other_count", CMDL_S32, &channels_other_wanted, &echannels.other_count },
> +	{ "combined_count", CMDL_S32, &channels_combined_wanted, &echannels.combined_count },
> +};

I don't think it's necessary to include '_count' in these keywords.

[...]
> @@ -1751,6 +1785,32 @@ static int dump_ring(void)
>  	return 0;
>  }
>  
> +static int dump_channels(void)
> +{
> +	fprintf(stdout,
> +		"Re-set maximums:\n"

Should 'Re-set' be 'Pre-set'?

> +		"Max RX:		%u\n"
> +		"Max TX:		%u\n"
> +		"Max Other:	%u\n"
> +		"Max Combined:	%u\n",
> +		echannels.max_rx, echannels.max_tx,
> +		echannels.max_other,
> +		echannels.max_combined);

The heading says they are maximums, so I don't think it's necessary to
include 'Max' on each line.

> +	fprintf(stdout,
> +		"Current hardware settings:\n"
> +		"RX Count:	%u\n"
> +		"TX Count:	%u\n"
> +		"Other Count:	%u\n"
> +		"Combined Count:	%u\n",

I don't think it's necessary to include 'Count' on each line here,
either.

[...]
> @@ -2114,6 +2178,58 @@ static int do_gring(int fd, struct ifreq *ifr)
>  	return 0;
>  }
>  
> +static int do_schannels(int fd, struct ifreq *ifr)
> +{
> +	int err, changed = 0;
> +
> +	echannels.cmd = ETHTOOL_GCHANNELS;
> +	ifr->ifr_data = (caddr_t)&echannels;
> +	err = send_ioctl(fd, ifr);
> +	if (err) {
> +		perror("Cannot get device channels settings");
> +		return 1;
> +	}
> +
> +	do_generic_set(cmdline_channels, ARRAY_SIZE(cmdline_channels),
> +			&changed);
> +
> +	if (!changed) {
> +		fprintf(stderr, "no channels parameters changed, aborting\n");
> +		return 1;
> +	}
[...]

These messages (and others below) are not grammatical.  They should say
'channel settings' or 'channel parameters'.

Actually, you could be more specific about what the parameters are, and
just write 'numbers of channels'.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

  reply	other threads:[~2011-10-04 22:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-20 10:31 [PATCH 0/3] ethtool: Features added Sucheta Chakraborty
2011-09-20 10:31 ` [PATCH ethtool 1/3] ethtool: file ethtool-copy.h update Sucheta Chakraborty
2011-10-04 22:09   ` Ben Hutchings
2011-09-20 10:31 ` [PATCH ethtool 2/3] ethtool: add support for external loopback Sucheta Chakraborty
2011-10-04 22:12   ` Ben Hutchings
2011-09-20 10:31 ` [PATCH ethtool 3/3] ethtool: add ETHTOOL_{G,S}CHANNEL support Sucheta Chakraborty
2011-10-04 22:21   ` Ben Hutchings [this message]
2011-10-04 22:36     ` Ben Hutchings

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=1317766902.2751.25.camel@bwh-desktop \
    --to=bhutchings@solarflare.com \
    --cc=Dept_NX_Linux_NIC_Driver@qlogic.com \
    --cc=netdev@vger.kernel.org \
    --cc=sucheta.chakraborty@qlogic.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).