netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH, net-next, v4, 0/2] net/ethtool: Introduce link_ksettings API for virtual network devices
@ 2020-02-13 20:14 Cris Forno
  2020-02-13 20:14 ` [PATCH, net-next, v4, 1/2] ethtool: Factored out similar ethtool link settings for virtual devices to core Cris Forno
  2020-02-13 20:14 ` [PATCH, net-next, v4, 2/2] net/ethtool: Introduce link_ksettings API for virtual network devices Cris Forno
  0 siblings, 2 replies; 4+ messages in thread
From: Cris Forno @ 2020-02-13 20:14 UTC (permalink / raw)
  To: netdev
  Cc: mst, jasowang, haiyangz, sthemmin, sashal, tlfalcon, davem,
	mkubecek, willemdebruijn.kernel, Cris Forno

This series provides an API for drivers of virtual network devices that allows
users to alter initial device speed and duplex settings to reflect the actual
capabilities of underlying hardware. The changes made include two helper
functions ethtool_virtdev_set_link_ksettings, which is used to retrieve
alterable link settings. In addition, there is a new ethtool operation defined
to validate those settings provided by the user. This operation can use either a
generic validation function, ethtool_virtdev_validate_cmd, or one defined by the
driver. These changes resolve code duplication for existing virtual network
drivers that have already implemented this behavior.  In the case of the ibmveth
driver, this API is used to provide this capability for the first time.

---
v4:  - Cleaned up return statement in ethtool_virtdev_validate_cmd based off of
     Michal Kubecek's and Thomas Falcon's suggestion.

     - If the netvsc driver is using the VF device in order to get accelerated
     networking, the real speed and duplex is reported by using the VF device as
     suggested by Stephen Hemminger.

     - Removed ethtool_virtdev_get_link_ksettings since it was too simple to
     warrant a helper function.

v3:  - Factored out duplicated code to core/ethtool to provide API to virtual
     drivers
    
v2:  - Updated default driver speed/duplex settings to avoid breaking existing
     setups
---

Cris Forno (2):
  ethtool: Factored out similar ethtool link settings for virtual
    devices to core
  net/ethtool: Introduce link_ksettings API for virtual network devices

 drivers/net/ethernet/ibm/ibmveth.c | 62 ++++++++++++++++++++++----------------
 drivers/net/ethernet/ibm/ibmveth.h |  3 ++
 drivers/net/hyperv/netvsc_drv.c    | 25 +++++++++------
 drivers/net/virtio_net.c           | 40 ++----------------------
 include/linux/ethtool.h            |  7 +++++
 net/ethtool/ioctl.c                | 40 ++++++++++++++++++++++++
 6 files changed, 105 insertions(+), 72 deletions(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-02-14 16:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-13 20:14 [PATCH, net-next, v4, 0/2] net/ethtool: Introduce link_ksettings API for virtual network devices Cris Forno
2020-02-13 20:14 ` [PATCH, net-next, v4, 1/2] ethtool: Factored out similar ethtool link settings for virtual devices to core Cris Forno
2020-02-14 16:20   ` Jakub Kicinski
2020-02-13 20:14 ` [PATCH, net-next, v4, 2/2] net/ethtool: Introduce link_ksettings API for virtual network devices Cris Forno

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).