Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761508AbZJIVgp (ORCPT ); Fri, 9 Oct 2009 17:36:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1761496AbZJIVgo (ORCPT ); Fri, 9 Oct 2009 17:36:44 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:37830 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761495AbZJIVgm (ORCPT ); Fri, 9 Oct 2009 17:36:42 -0400 Date: Fri, 9 Oct 2009 14:35:38 -0700 From: Stephen Hemminger 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 Message-ID: <20091009143538.644844aa@nehalam> In-Reply-To: References: Organization: Linux Foundation X-Mailer: Claws Mail 3.6.1 (GTK+ 2.16.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2005 Lines: 79 On Thu, 8 Oct 2009 10:59:26 -0700 (PDT) Shreyas Bhatewara 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; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/