Thread (12 messages) read the whole thread 12 messages, 4 authors, 2016-06-15

Re: [PATCH net-next v3 5/7] vmxnet3: add support for get_coalesce, set_coalesce ethtool operations

From: Ben Hutchings <hidden>
Date: 2016-06-14 15:04:21
Also in: lkml

On Mon, 2016-06-13 at 18:50 -0700, Shrikrishna Khare wrote:
[...]
quoted hunk ↗ jump to hunk
--- a/drivers/net/vmxnet3/vmxnet3_ethtool.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethtool.c
@@ -725,6 +725,164 @@ vmxnet3_set_rss(struct net_device *netdev, const u32 *p, const u8 *key,
 }
 #endif
 
+static int
+vmxnet3_get_coalesce(struct net_device *netdev, struct ethtool_coalesce *ec)
+{
+	struct vmxnet3_adapter *adapter = netdev_priv(netdev);
+
+	if (!VMXNET3_VERSION_GE_3(adapter))
+		return -EOPNOTSUPP;
+
+	memset(ec, 0, sizeof(struct ethtool_coalesce));
[...]

The ethtool core already clears the structure, and it sets the cmd
field properly.  This memset() should be removed.

Otherwise I think this is fine.

Ben.
 
-- 
Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
                                                              - Albert
Camus

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help