From: Shreyas Bhatewara <sbhatewara@vmware.com>
To: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
netdev <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Jeff Garzik <jgarzik@pobox.com>,
Anthony Liguori <anthony@codemonkey.ws>,
Chris Wright <chrisw@sous-sol.org>,
Greg Kroah-Hartman <greg@kroah.com>,
Andrew Morton <akpm@linux-foundation.org>,
virtualization <virtualization@lists.linux-foundation.org>,
pv-drivers <pv-drivers@vmware.com>
Subject: RE: [PATCH 2.6.32-rc3] net: VMware virtual Ethernet NIC driver: vmxnet3
Date: Fri, 9 Oct 2009 16:52:09 -0700 [thread overview]
Message-ID: <89E2752CFA8EC044846EB849981913410174041DA5@EXCH-MBX-4.vmware.com> (raw)
In-Reply-To: <20091009143538.644844aa@nehalam>
> -----Original Message-----
> From: Stephen Hemminger [mailto:shemminger@linux-foundation.org]
> Sent: Friday, October 09, 2009 2:36 PM
> To: Shreyas Bhatewara
> Cc: linux-kernel; netdev; David S. Miller; Jeff Garzik; Anthony
> Liguori; Chris Wright; Greg Kroah-Hartman; Andrew Morton;
> virtualization; pv-drivers
> Subject: Re: [PATCH 2.6.32-rc3] net: VMware virtual Ethernet NIC
> driver: vmxnet3
>
> 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;
> }
Thanks Stephen.
Yes, the vmxnet3_do_poll() was an inline function in the very first patch. It was thought of as a better idea to let gcc handle the inlining.
I will piggyback this nit on a forthcoming change.
->Shreyas
prev parent reply other threads:[~2009-10-09 23:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-06 19:12 Shreyas Bhatewara
2009-10-08 17:59 ` Shreyas Bhatewara
2009-10-09 21:35 ` Stephen Hemminger
2009-10-09 23:52 ` Shreyas Bhatewara [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=89E2752CFA8EC044846EB849981913410174041DA5@EXCH-MBX-4.vmware.com \
--to=sbhatewara@vmware.com \
--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=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
all inboxes | Powered by JetHome®