mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeff Moyer <jmoyer@redhat.com>
To: mpm@selenic.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [rfc | patch 3/6] netpoll: change poll_napi to take a net_device
Date: Fri, 1 Jul 2005 19:08:10 -0400	[thread overview]
Message-ID: <17093.52442.181989.751996@segfault.boston.redhat.com> (raw)
In-Reply-To: <17093.52306.136742.190912@segfault.boston.redhat.com>

(sorry for munging the subject of the prior two patches)

The poll_napi routine is not specific to a netpoll.  It really should be
able to be called with a struct net_device.  Changing the routine to take a
struct net_device makes it easier to support the bonding driver, since we
will be implementing a netpoll_poll_dev routine, that will not have a
struct netpoll associated with it.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
---

--- linux-2.6.12/net/core/netpoll.c.orig	2005-07-01 14:12:33.986337259 -0400
+++ linux-2.6.12/net/core/netpoll.c	2005-07-01 14:20:45.848186887 -0400
@@ -128,10 +128,9 @@ static int checksum_udp(struct sk_buff *
  * network adapter, forcing superfluous retries and possibly timeouts.
  * Thus, we set our budget to greater than 1.
  */
-static void poll_napi(struct netpoll *np)
+static void poll_napi(struct net_device *dev)
 {
-	struct netpoll_info *npinfo = np->dev->npinfo;
-	struct net_device *dev = np->dev;
+	struct netpoll_info *npinfo = dev->npinfo;
 	int budget = 16;
 
 	if (test_bit(__LINK_STATE_RX_SCHED, &dev->state) &&
@@ -156,7 +155,7 @@ void netpoll_poll(struct netpoll *np)
 	/* Process pending work on NIC */
 	np->dev->poll_controller(np->dev);
 	if (np->dev->poll)
-		poll_napi(np);
+		poll_napi(np->dev);
 
 	zap_completion_queue();
 }

  parent reply	other threads:[~2005-07-01 23:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-01 23:05 [rfc | patch 0/6] netpoll: add support for the bonding driver Jeff Moyer
2005-07-01 23:06 ` Jeff Moyer
2005-07-01 23:06 ` Jeff Moyer
2005-07-01 23:08 ` Jeff Moyer [this message]
2005-07-01 23:08 ` [rfc | patch 4/6] netpoll: add netpoll hooks to support " Jeff Moyer
2005-07-01 23:09 ` [rfc | patch 5/6] netpoll: modify bonding driver to support netpoll Jeff Moyer
2005-07-01 23:10 ` [rfc | patch 6/6] netpoll: fix deadlock in arp_reply Jeff Moyer
2005-07-01 23:38 ` [rfc | patch 0/6] netpoll: add support for the bonding driver Matt Mackall
2005-07-01 23:43   ` Jeff Moyer

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=17093.52442.181989.751996@segfault.boston.redhat.com \
    --to=jmoyer@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    --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

all inboxes | Powered by JetHome®