netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Jay Cliburn <jacliburn@bellsouth.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 25/26] atl1: add NAPI support
Date: Mon, 31 Dec 2007 21:58:17 -0800	[thread overview]
Message-ID: <20071231215817.10c64320@deepthought> (raw)
In-Reply-To: <1199154173-4058-26-git-send-email-jacliburn@bellsouth.net>

On Mon, 31 Dec 2007 20:22:52 -0600
Jay Cliburn <jacliburn@bellsouth.net> wrote:

> Add support for NAPI, styled after the e1000 NAPI implementation.  That we
> follow the e1000 for NAPI shouldn't come as much of a surprise, since the
> entire atl1 driver is based heavily upon it.
> 
> Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
> ---
>  drivers/net/Kconfig     |   14 ++++
>  drivers/net/atlx/atl1.c |  151 +++++++++++++++++++++++++++++++++++++++++++++--
>  drivers/net/atlx/atl1.h |   20 ++++++
>  drivers/net/atlx/atlx.h |    7 ++-
>  4 files changed, 186 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
> index d9107e5..095629f 100644
> --- a/drivers/net/Kconfig
> +++ b/drivers/net/Kconfig
> @@ -2371,6 +2371,20 @@ config ATL1
>  	  To compile this driver as a module, choose M here.  The module
>  	  will be called atl1.
>  
> +config ATL1_NAPI
> +	bool "Use Rx Polling (NAPI) (EXPERIMENTAL)"
> +	depends on ATL1 && EXPERIMENTAL
> +	help
> +	  NAPI is a new driver API designed to reduce CPU and interrupt load
> +	  when the driver is receiving lots of packets from the card. It is
> +	  still somewhat experimental and thus not yet enabled by default.
> +
> +	  If your estimated Rx load is 10kpps or more, or if the card will be
> +	  deployed on potentially unfriendly networks (e.g. in a firewall),
> +	  then say Y here.
> +
> +	  If in doubt, say N.
> +
>  endif # NETDEV_1000
>  
>  #
> diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
> index 237622e..10bccf6 100644
> --- a/drivers/net/atlx/atl1.c
> +++ b/drivers/net/atlx/atl1.c
> @@ -756,7 +756,16 @@ static void atl1_set_mac_addr(struct atl1_hw *hw)
>  
>  static int atl1_alloc_queues(struct atl1_adapter *adapter)
>  {
> -	/* temporary placeholder function for NAPI */
> +#ifdef CONFIG_ATL1_NAPI
> +	int size;
> +
> +	size = sizeof(struct net_device) * adapter->num_rx_queues;
> +	adapter->polling_netdev = kmalloc(size, GFP_KERNEL);
> +	if (!adapter->polling_netdev)
> +		return -ENOMEM;
> +
> +	memset(adapter->polling_netdev, 0, size);
> +#endif

You don't need to allocate pseudo-devices anymore in 2.6.24 or later.
rework to just use napi structures.



-- 
Stephen Hemminger <stephen.hemminger@vyatta.com>

  reply	other threads:[~2008-01-01  5:59 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-01  2:22 [PATCH 00/26] atl1: divide and modernize Jay Cliburn
2008-01-01  2:22 ` [PATCH 01/26] atl1: relocate atl1 driver to /drivers/net/atlx Jay Cliburn
2008-01-01  2:22 ` [PATCH 02/26] atl1: move common functions to atlx files Jay Cliburn
2008-01-01  2:22 ` [PATCH 03/26] atl1: fix broken TSO Jay Cliburn
2008-01-01  2:22 ` [PATCH 04/26] atl1: add ethtool register dump Jay Cliburn
2008-01-01  2:22 ` [PATCH 05/26] atl1: print debug info if rrd error Jay Cliburn
2008-01-01  2:22 ` [PATCH 06/26] atl1: update initialization parameters Jay Cliburn
2008-01-01  2:22 ` [PATCH 07/26] atl1: clarify max rx frame size Jay Cliburn
2008-01-01  2:22 ` [PATCH 08/26] atl1: additional DMA engine configuration Jay Cliburn
2008-01-01  2:22 ` [PATCH 09/26] atl1: refactor tx processing Jay Cliburn
2008-01-01  2:22 ` [PATCH 10/26] atl1: use csum_start Jay Cliburn
2008-01-01  2:22 ` [PATCH 11/26] atl1: refactor initialization and startup Jay Cliburn
2008-01-01  2:22 ` [PATCH 12/26] atl1: refactor atl1_probe Jay Cliburn
2008-01-01  2:22 ` [PATCH 13/26] atl1: refactor interrupt handling Jay Cliburn
2008-01-01  2:22 ` [PATCH 14/26] atl1: move stray defines to header file Jay Cliburn
2008-01-01  2:22 ` [PATCH 15/26] atl1: tidy up ring management Jay Cliburn
2008-01-01  2:22 ` [PATCH 16/26] atl1: modernize check link function Jay Cliburn
2008-01-01  2:22 ` [PATCH 17/26] atl1: update phy config function Jay Cliburn
2008-01-01  2:22 ` [PATCH 18/26] atl1: make function static Jay Cliburn
2008-01-01  2:22 ` [PATCH 19/26] atl1: modernize down/up functions Jay Cliburn
2008-01-01  2:22 ` [PATCH 20/26] atl1: update change mtu Jay Cliburn
2008-01-01  2:22 ` [PATCH 21/26] atl1: update atl1_close Jay Cliburn
2008-01-01  2:22 ` [PATCH 22/26] atl1: update netpoll Jay Cliburn
2008-01-01  2:22 ` [PATCH 23/26] atl1: update shutdown and remove functions Jay Cliburn
2008-01-01  2:22 ` [PATCH 24/26] atl1: update wake-on-lan Jay Cliburn
2008-01-01  2:22 ` [PATCH 25/26] atl1: add NAPI support Jay Cliburn
2008-01-01  5:58   ` Stephen Hemminger [this message]
2008-01-01  2:22 ` [PATCH 26/26] atl1: remove experimental tag and clean up comments Jay Cliburn
2008-01-01 17:58 ` [PATCH 00/26] atl1: divide and modernize Christoph Hellwig
2008-01-01 18:12   ` Jay Cliburn

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=20071231215817.10c64320@deepthought \
    --to=shemminger@linux-foundation.org \
    --cc=jacliburn@bellsouth.net \
    --cc=netdev@vger.kernel.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).