netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: sbhatewara@vmware.com
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	shemminger@linux-foundation.org, jgarzik@pobox.com,
	anthony@codemonkey.ws, chrisw@sous-sol.org, greg@kroah.com,
	akpm@linux-foundation.org,
	virtualization@lists.linux-foundation.org, pv-drivers@vmware.com
Subject: Re: [PATCH 2.6.32-rc1] net: VMware virtual Ethernet NIC driver: vmxnet3
Date: Thu, 01 Oct 2009 15:23:55 -0700 (PDT)	[thread overview]
Message-ID: <20091001.152355.209105273.davem@davemloft.net> (raw)
In-Reply-To: <alpine.LRH.2.00.0909301432410.8073@localhost.localdomain>

From: Shreyas Bhatewara <sbhatewara@vmware.com>
Date: Wed, 30 Sep 2009 14:34:57 -0700 (PDT)

> +{
> +	struct vmxnet3_adapter *adapter = netdev_priv(netdev);
> +	u8 *base;
> +	int i;
> +
> + VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD,
> VMXNET3_CMD_GET_STATS);
> +
> +	/* this does assume each counter is 64-bit wide */
> +
> +	base = (u8 *)&adapter->tqd_start->stats;
> +	for (i = 0; i < ARRAY_SIZE(vmxnet3_tq_dev_stats); i++)
> + *buf++ = *(u64 *)(base + vmxnet3_tq_dev_stats[i].offset);
> +
> +	base = (u8 *)&adapter->tx_queue.stats;
> +	for (i = 0; i < ARRAY_SIZE(vmxnet3_tq_driver_stats); i++)
> + *buf++ = *(u64 *)(base + vmxnet3_tq_driver_stats[i].offset);
> +
> +	base = (u8 *)&adapter->rqd_start->stats;

There's a lot of code like this that isn't indented properly.  Either
that or your email client has corrupted the patch by breaking up long
lines or similar.

Another example:

> +static int
> +vmxnet3_set_rx_csum(struct net_device *netdev, u32 val)
> +{
> +	struct vmxnet3_adapter *adapter = netdev_priv(netdev);
> +
> +	if (adapter->rxcsum != val) {
> +		adapter->rxcsum = val;
> +		if (netif_running(netdev)) {
> +			if (val)
> + adapter->shared->devRead.misc.uptFeatures |=
> + UPT1_F_RXCSUM;
> +			else
> + adapter->shared->devRead.misc.uptFeatures &=
> + ~UPT1_F_RXCSUM;
> +
> + VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD,
> + VMXNET3_CMD_UPDATE_FEATURE);
> +		}
> +	}
> +	return 0;
> +}

Yikes! :-)

      parent reply	other threads:[~2009-10-01 22:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-30 21:34 [PATCH 2.6.32-rc1] net: VMware virtual Ethernet NIC driver: vmxnet3 Shreyas Bhatewara
2009-10-01  0:39 ` Stephen Hemminger
2009-10-01  1:18   ` Shreyas Bhatewara
2009-10-01  2:51   ` David Miller
2009-10-01 22:23 ` David Miller [this message]

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=20091001.152355.209105273.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=akpm@linux-foundation.org \
    --cc=anthony@codemonkey.ws \
    --cc=chrisw@sous-sol.org \
    --cc=greg@kroah.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pv-drivers@vmware.com \
    --cc=sbhatewara@vmware.com \
    --cc=shemminger@linux-foundation.org \
    --cc=virtualization@lists.linux-foundation.org \
    /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).