Thread (5 messages) flat view 5 messages, 3 authors, 2021-11-25

Re: [PATCH net-next 1/2] ifb: support ethtools driver info

From: Jakub Kicinski <kuba@kernel.org>
Date: 2021-11-25 02:20:26

On Thu, 25 Nov 2021 10:01:54 +0800 xiangxia.m.yue@gmail.com wrote:
+#define DRV_NAME	"ifb"
+#define DRV_VERSION	"1.0"
Let's not invent meaningless driver versions.
quoted hunk ↗ jump to hunk
+#define TX_Q_LIMIT	32
+
 struct ifb_q_private {
 	struct net_device	*dev;
 	struct tasklet_struct   ifb_tasklet;
@@ -181,6 +185,12 @@ static int ifb_dev_init(struct net_device *dev)
 	return 0;
 }
 
+static void ifb_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
+{
+	strlcpy(info->driver, DRV_NAME, sizeof(info->driver));
Can we make core fill in driver name from rtnl_link_ops so we don't
need to do it in each driver?
+	strlcpy(info->version, DRV_VERSION, sizeof(info->version));
Leave this field as is, core should fill it with the kernel release.
+}
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help