From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Shreyas Bhatewara <sbhatewara@vmware.com>
Cc: Jeff@smtp1.linux-foundation.org,
pv-drivers <pv-drivers@vmware.com>,
netdev <netdev@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Andrew@smtp1.linux-foundation.org, Wright <chrisw@sous-sol.org>,
Anthony Liguori <anthony@codemonkey.ws>,
Greg Kroah-Hartman <greg@kroah.com>,
Chris@smtp1.linux-foundation.org,
Morton <akpm@linux-foundation.org>,
virtualization <virtualization@lists.linux-foundation.org>,
Garzik <jgarzik@pobox.com>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH 2.6.32-rc3] net: VMware virtual Ethernet NIC driver: vmxnet3
Date: Fri, 9 Oct 2009 14:35:38 -0700 [thread overview]
Message-ID: <20091009143538.644844aa@nehalam> (raw)
In-Reply-To: <alpine.LRH.2.00.0910081053460.19107@localhost.localdomain>
On Thu, 8 Oct 2009 10:59:26 -0700 (PDT)
Shreyas Bhatewara <sbhatewara@vmware.com> wrote:
> Hello all,
>
> I do not mean to be bothersome but this thread has been unusually silent.
> Could you please review the patch for me and reply with your comments /
> acks ?
>
> Thanks.
> ->Shreyas
Looks fine, but just a minor style nit (can be changed after insertion in mainline).
The code:
static void
vmxnet3_do_poll(struct vmxnet3_adapter *adapter, int budget, int *txd_done,
int *rxd_done)
{
if (unlikely(adapter->shared->ecr))
vmxnet3_process_events(adapter);
*txd_done = vmxnet3_tq_tx_complete(&adapter->tx_queue, adapter);
*rxd_done = vmxnet3_rq_rx_complete(&adapter->rx_queue, adapter, budget);
}
static int
vmxnet3_poll(struct napi_struct *napi, int budget)
{
struct vmxnet3_adapter *adapter = container_of(napi,
struct vmxnet3_adapter, napi);
int rxd_done, txd_done;
vmxnet3_do_poll(adapter, budget, &txd_done, &rxd_done);
if (rxd_done < budget) {
napi_complete(napi);
vmxnet3_enable_intr(adapter, 0);
}
return rxd_done;
}
Is simpler if you just have do_poll return rx done value. Probably Gcc
inline's it all anyway.
static int
vmxnet3_do_poll(struct vmxnet3_adapter *adapter, int budget)
{
if (unlikely(adapter->shared->ecr))
vmxnet3_process_events(adapter);
vmxnet3_tq_tx_complete(&adapter->tx_queue, adapter);
return vmxnet3_rq_rx_complete(&adapter->rx_queue, adapter, budget);
}
static int
vmxnet3_poll(struct napi_struct *napi, int budget)
{
struct vmxnet3_adapter *adapter = container_of(napi,
struct vmxnet3_adapter, napi);
int rxd_done;
rxd_done = vmxnet3_do_poll(adapter, budget);
if (rxd_done < budget) {
napi_complete(napi);
vmxnet3_enable_intr(adapter, 0);
}
return rxd_done;
}
next prev parent reply other threads:[~2009-10-09 21:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-06 19:12 [PATCH 2.6.32-rc3] net: VMware virtual Ethernet NIC driver: vmxnet3 Shreyas Bhatewara
2009-10-08 17:59 ` Shreyas Bhatewara
2009-10-09 21:35 ` Stephen Hemminger [this message]
2009-10-09 23:52 ` Shreyas Bhatewara
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=20091009143538.644844aa@nehalam \
--to=shemminger@linux-foundation.org \
--cc=Andrew@smtp1.linux-foundation.org \
--cc=Chris@smtp1.linux-foundation.org \
--cc=Jeff@smtp1.linux-foundation.org \
--cc=akpm@linux-foundation.org \
--cc=anthony@codemonkey.ws \
--cc=chrisw@sous-sol.org \
--cc=davem@davemloft.net \
--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=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).