From: "Michael S. Tsirkin" <mst@redhat•com>
To: Nikolay Aleksandrov <nikolay@cumulusnetworks•com>
Cc: Nikolay Aleksandrov <razor@blackwall•org>,
netdev@vger•kernel.org, roopa@cumulusnetworks•com,
davem@davemloft•net
Subject: Re: [PATCH net-next v5 2/2] virtio_net: add ethtool support for set and get of settings
Date: Thu, 4 Feb 2016 14:23:14 +0200 [thread overview]
Message-ID: <20160204142156-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <56B1C608.1040805@cumulusnetworks.com>
On Wed, Feb 03, 2016 at 10:19:04AM +0100, Nikolay Aleksandrov wrote:
> On 02/03/2016 04:04 AM, Nikolay Aleksandrov wrote:
> > From: Nikolay Aleksandrov <nikolay@cumulusnetworks•com>
> >
> > This patch allows the user to set and retrieve speed and duplex of the
> > virtio_net device via ethtool. Having this functionality is very helpful
> > for simulating different environments and also enables the virtio_net
> > device to participate in operations where proper speed and duplex are
> > required (e.g. currently bonding lacp mode requires full duplex). Custom
> > speed and duplex are not allowed, the user-supplied settings are validated
> > before applying.
> >
> > Example:
> > $ ethtool eth1
> > Settings for eth1:
> > ...
> > Speed: Unknown!
> > Duplex: Unknown! (255)
> > $ ethtool -s eth1 speed 1000 duplex full
> > $ ethtool eth1
> > Settings for eth1:
> > ...
> > Speed: 1000Mb/s
> > Duplex: Full
> >
> > Based on a patch by Roopa Prabhu.
> >
> > Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks•com>
> > ---
> > v2: use the new ethtool speed/duplex validation functions and allow half
> > duplex to be set
> > v3: return error if the user tries to change anything besides speed/duplex
> > as per Michael's comment
> > We have to zero-out advertising as it gets set automatically by ethtool if
> > setting speed and duplex together.
> > v4: Set port type to PORT_OTHER
> > v5: null diff1.port because we set cmd->port now and ethtool returns it in
> > the set request, retested all cases
> >
>
> Hmm, nulling the advertising and ->port completely ignores them, i.e. won't produce
> an error if the user actually specified a different value for either of them.
> We can check if the ->port matches what we returned, but there's no fix for
> advertising. I'm leaving both ignored for now, please let me know if you'd
> prefer otherwise.
>
> Thanks,
> Nik
I think I prefer validating port.
For advertising we don't allow enabling autonegotiation so ignoring
these is fine I think.
--
MST
next prev parent reply other threads:[~2016-02-04 12:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-03 3:04 [PATCH net-next v5 0/2] virtio_net: add ethtool get/set settings support Nikolay Aleksandrov
2016-02-03 3:04 ` [PATCH net-next v5 1/2] ethtool: add speed/duplex validation functions Nikolay Aleksandrov
2016-02-03 23:32 ` Stephen Hemminger
2016-02-03 23:49 ` Rick Jones
2016-02-04 12:47 ` Michael S. Tsirkin
2016-02-04 17:30 ` Rick Jones
2016-02-04 11:02 ` Nikolay Aleksandrov
2016-02-04 12:18 ` Michael S. Tsirkin
2016-02-03 3:04 ` [PATCH net-next v5 2/2] virtio_net: add ethtool support for set and get of settings Nikolay Aleksandrov
2016-02-03 9:19 ` Nikolay Aleksandrov
2016-02-04 12:23 ` Michael S. Tsirkin [this message]
2016-02-04 12:21 ` Michael S. Tsirkin
2016-02-04 12:26 ` Nikolay Aleksandrov
2016-02-07 19:31 ` [PATCH net-next v5 0/2] virtio_net: add ethtool get/set settings support David Miller
2016-02-07 19:35 ` Nikolay Aleksandrov
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=20160204142156-mutt-send-email-mst@redhat.com \
--to=mst@redhat$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=netdev@vger$(echo .)kernel.org \
--cc=nikolay@cumulusnetworks$(echo .)com \
--cc=razor@blackwall$(echo .)org \
--cc=roopa@cumulusnetworks$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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