From: Ben Hutchings <ben@decadent.org.uk>
To: David Laight <David.Laight@ACULAB.COM>,
Shrikrishna Khare <skhare@vmware.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"pv-drivers@vmware.com" <pv-drivers@vmware.com>,
Keyong Sun <sunk@vmware.com>, Manoj Tammali <tammalim@vmware.com>
Subject: Re: [PATCH net-next 5/7] Driver: Vmxnet3: Add support for get_coalesce, set_coalesce ethtool operations
Date: Tue, 10 May 2016 13:02:35 +0100 [thread overview]
Message-ID: <1462881755.2626.12.camel@decadent.org.uk> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D5F4B8B61@AcuExch.aculab.com>
[-- Attachment #1: Type: text/plain, Size: 2564 bytes --]
On Tue, 2016-05-10 at 11:24 +0000, David Laight wrote:
> From: Ben Hutchings
> >
> > Sent: 09 May 2016 01:17
> > On Sun, 2016-05-08 at 13:55 -0700, Shrikrishna Khare wrote:
> > >
> > >
> > > On Sat, 7 May 2016, Ben Hutchings wrote:
> > >
> > > >
> > > > On Fri, 2016-05-06 at 16:12 -0700, Shrikrishna Khare wrote:
> > > > [...]
> > > > >
> > > > > +static int
> > > > > +vmxnet3_set_coalesce(struct net_device *netdev, struct ethtool_coalesce *ec)
> > > > > +{
> > > > [...]
> > > > >
> > > > > + switch (ec->rx_coalesce_usecs) {
> > > > > + case VMXNET3_COALESCE_DEFAULT:
> > > > > + case VMXNET3_COALESCE_DISABLED:
> > > > > + case VMXNET3_COALESCE_ADAPT:
> > > > > + if (ec->tx_max_coalesced_frames ||
> > > > > + ec->tx_max_coalesced_frames_irq ||
> > > > > + ec->rx_max_coalesced_frames_irq) {
> > > > > + return -EINVAL;
> > > > > + }
> > > > > + memset(adapter->coal_conf, 0, sizeof(*adapter->coal_conf));
> > > > > + adapter->coal_conf->coalMode = ec->rx_coalesce_usecs;
> > > > > + break;
> > > > > + case VMXNET3_COALESCE_STATIC:
> > > > [...]
> > > >
> > > > I don't want to see drivers introducing magic values for fields that
> > > > are denominated in microseconds (especially not for 0, which is the
> > > > correct way to specify 'no coalescing'). If the current
> > > > ethtool_coalesce structure is inadequate, propose an extension.
> > > For vmxnet3, we need an ethtool mechanism to indicate coalescing mode to
> > > the device.
> > >
> > > Would a patch that maps 0 to 'no coalescing' be acceptable? That is:
> > >
> > > rx-usecs = 0 -> coalescing disabled.
> > > rx-usecs = 1 -> default (chosen by the device).
> > > rx-usecs = 2 -> adaptive coalescing.
> > > rx-usecs = 3 -> static coalescing.
> Would it be better to use stupidly large values for the non-zero special values?
> That would less problematic if someone expects 2 to mean '2 usecs'.
That seems less problematic, but I think we'd have to check that
current drivers (or at least the most widely used ones) reject those
values.
We should still need to standardise names and definitions for those
special values, so that the ethtool utility can provide keywords and
documentation for them.
Ben.
--
Ben Hutchings
If you seem to know what you are doing, you'll be given more to do.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-05-10 12:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-06 23:12 [PATCH net-next 0/7] Driver: Vmxnet3: Version 3 Shrikrishna Khare
2016-05-06 23:12 ` [PATCH net-next 1/7] Driver: Vmxnet3: Prepare for version 3 changes Shrikrishna Khare
2016-05-06 23:12 ` [PATCH net-next 2/7] Driver: Vmxnet3: Introduce generic command interface to configure the device Shrikrishna Khare
2016-05-06 23:12 ` [PATCH net-next 3/7] Driver: Vmxnet3: Allow variable length Transmit Data ring buffer Shrikrishna Khare
2016-05-06 23:12 ` [PATCH net-next 4/7] Driver: Vmxnet3: Add Receive Data Ring support Shrikrishna Khare
2016-05-06 23:12 ` [PATCH net-next 5/7] Driver: Vmxnet3: Add support for get_coalesce, set_coalesce ethtool operations Shrikrishna Khare
2016-05-07 12:04 ` Ben Hutchings
2016-05-07 17:41 ` David Miller
2016-05-08 20:55 ` Shrikrishna Khare
2016-05-09 0:17 ` Ben Hutchings
2016-05-10 11:24 ` David Laight
2016-05-10 12:02 ` Ben Hutchings [this message]
2016-05-20 18:46 ` Shrikrishna Khare
2016-05-06 23:12 ` [PATCH net-next 6/7] Driver: Vmxnet3: Introduce command to register memory region Shrikrishna Khare
2016-05-06 23:12 ` [PATCH net-next 7/7] Driver: Vmxnet3: Update to Version 3 Shrikrishna Khare
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=1462881755.2626.12.camel@decadent.org.uk \
--to=ben@decadent.org.uk \
--cc=David.Laight@ACULAB.COM \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pv-drivers@vmware.com \
--cc=skhare@vmware.com \
--cc=sunk@vmware.com \
--cc=tammalim@vmware.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
all inboxes | Powered by JetHome®