linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Hutchings <ben@decadent.org.uk>
To: Shrikrishna Khare <skhare@vmware.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	pv-drivers@vmware.com
Cc: Keyong Sun <sunk@vmware.com>, Manoj Tammali <tammalim@vmware.com>
Subject: Re: [PATCH net-next v3 5/7] vmxnet3: add support for get_coalesce, set_coalesce ethtool operations
Date: Tue, 14 Jun 2016 16:04:12 +0100	[thread overview]
Message-ID: <1465916652.3529.242.camel@decadent.org.uk> (raw)
In-Reply-To: <1465869007-10822-6-git-send-email-skhare@vmware.com>

[-- Attachment #1: Type: text/plain, Size: 986 bytes --]

On Mon, 2016-06-13 at 18:50 -0700, Shrikrishna Khare wrote:
[...]
> --- 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

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-06-14 15:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-14  1:50 [PATCH net-next v3 0/7] vmxnet3: upgrade to version 3 Shrikrishna Khare
2016-06-14  1:50 ` [PATCH net-next v3 1/7] vmxnet3: prepare for version 3 changes Shrikrishna Khare
2016-06-14  1:50 ` [PATCH net-next v3 2/7] vmxnet3: introduce generic command interface to configure the device Shrikrishna Khare
2016-06-14  1:50 ` [PATCH net-next v3 3/7] vmxnet3: allow variable length transmit data ring buffer Shrikrishna Khare
2016-06-14  1:50 ` [PATCH net-next v3 4/7] vmxnet3: add receive data ring support Shrikrishna Khare
2016-06-14  1:50 ` [PATCH net-next v3 5/7] vmxnet3: add support for get_coalesce, set_coalesce ethtool operations Shrikrishna Khare
2016-06-14 15:04   ` Ben Hutchings [this message]
2016-06-14  1:50 ` [PATCH net-next v3 6/7] vmxnet3: introduce command to register memory region Shrikrishna Khare
2016-06-14  5:54   ` Or Gerlitz
2016-06-14  1:50 ` [PATCH net-next v3 7/7] vmxnet3: update to version 3 Shrikrishna Khare
2016-06-14  5:52 ` [PATCH net-next v3 0/7] vmxnet3: upgrade " Or Gerlitz
2016-06-15  7:23 ` David Miller

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=1465916652.3529.242.camel@decadent.org.uk \
    --to=ben@decadent.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pv-drivers@vmware.com \
    --cc=skhare@vmware.com \
    --cc=sunk@vmware.com \
    --cc=tammalim@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).