Thread (9 messages) 9 messages, 2 authors, 2017-06-21

[PATCH net-next 1/2] ldmvsw: add vio version and remote-mac to ethtool info

flat view
STALE3408d

From: Shannon Nelson <hidden>
Date: 2017-06-21 16:09:53
Also in: sparclinux
Subsystem: networking drivers, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

In the ethtool -i output print the vio version and the remote-mac
of the ldom that the vif device is serving as this vif info is
not exposed elsewhere.  The remote-mac address is most useful for
tracking which client ldom is being served by the vif.

Orabug: 26316362

Signed-off-by: Shannon Nelson <redacted>
---
 drivers/net/ethernet/sun/ldmvsw.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ethernet/sun/ldmvsw.c b/drivers/net/ethernet/sun/ldmvsw.c
index 8603e39..de512ef 100644
--- a/drivers/net/ethernet/sun/ldmvsw.c
+++ b/drivers/net/ethernet/sun/ldmvsw.c
@@ -62,8 +62,15 @@
 static void vsw_get_drvinfo(struct net_device *dev,
 			    struct ethtool_drvinfo *info)
 {
+	struct vnet_port *port = netdev_priv(dev);
+
 	strlcpy(info->driver, DRV_MODULE_NAME, sizeof(info->driver));
 	strlcpy(info->version, DRV_MODULE_VERSION, sizeof(info->version));
+
+	snprintf(info->fw_version, sizeof(info->fw_version),
+		 "vio %d.%d", port->vio.ver.major, port->vio.ver.minor);
+	snprintf(info->bus_info, sizeof(info->bus_info),
+		 "remote-mac %pM", port->raddr);
 }
 
 static u32 vsw_get_msglevel(struct net_device *dev)
-- 
1.7.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help