From: Jason Lunz <lunz@falooley.org>
To: netdev@oss.sgi.com
Subject: Re: [PATCH, untested] Support for PPPOE on SMP
Date: Wed, 25 Jun 2003 16:01:04 +0000 (UTC) [thread overview]
Message-ID: <slrnbfjhqh.h0q.lunz@stoli.localnet> (raw)
In-Reply-To: 20030625072602.529AF2C0B9@lists.samba.org
rusty@rustcorp.com.au said:
> I don't understand the unbalanced dev_put in net_rx_action(), BTW.
It's tricky. There are two paths an skb can take into net_rx_action(),
napi and non-napi. The non-napi path uses dev_hold/dev_put on both
skb->dev and a virtual per-cpu struct net_device, the backlog_dev.
In a non-napi skb receive, the driver uses netif_rx() to hand the skb up
to the net core. netif_rx does a dev_hold on skb->dev, puts the skb on
the current cpu's softnet_data queue, and uses netif_rx_schedule to
schedule that softnet-data's ->backlog_dev to be polled. In the
process, __netif_rx_schedule does a dev_hold(backlog_dev).
So the queue of ready net_devices processed by net_rx_action may contain
actual struct net_devices (napi) or the virtual ->backlog_dev
net_device. In the former case, net_rx_action's dev_put balances the
dev_hold done when the driver called __netif_rx_schedule(). In the
latter case, net_rx_action's dev_put balances the dev_hold of the
backlog_dev done when netif_rx called __netif_rx_schedule().
I hope that makes some kind of sense. It took a while to figure out, but
I saved my notes. :)
Jason
prev parent reply other threads:[~2003-06-25 16:01 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-25 7:24 [PATCH, untested] Support for PPPOE on SMP Rusty Russell
2003-06-25 11:19 ` Jamal Hadi
2003-06-25 13:21 ` Michal Ostrowski
2003-06-25 13:42 ` Michal Ostrowski
2003-06-25 15:45 ` Jamal Hadi
2003-06-25 17:27 ` Michal Ostrowski
2003-06-25 22:17 ` Paul Mackerras
2003-06-25 22:56 ` Michal Ostrowski
2003-06-25 16:15 ` Stephen Hemminger
2003-06-25 16:22 ` Jamal Hadi
2003-06-25 16:39 ` Stephen Hemminger
2003-06-25 17:07 ` Jamal Hadi
2003-06-25 17:40 ` Stephen Hemminger
2003-06-25 18:00 ` Michal Ostrowski
2003-06-25 22:22 ` Paul Mackerras
2003-06-25 22:53 ` Ben Greear
2003-06-25 21:33 ` David S. Miller
2003-06-25 22:06 ` Michal Ostrowski
2003-06-26 1:04 ` David S. Miller
2003-06-26 3:57 ` Rusty Russell
2003-06-26 3:59 ` David S. Miller
2003-06-26 8:17 ` Rusty Russell
2003-06-26 8:55 ` David S. Miller
2003-06-26 10:47 ` James Carlson
2003-06-26 10:51 ` James Carlson
2003-06-26 23:18 ` Jamal Hadi
2003-06-27 11:39 ` James Carlson
2003-06-27 12:12 ` Paul Mackerras
2003-06-27 13:19 ` James Carlson
2003-06-27 14:59 ` Stephen Hemminger
2003-06-27 15:27 ` James Carlson
2003-06-28 2:21 ` Jamal Hadi
2003-06-28 22:51 ` Frank Cusack
2003-06-26 11:37 ` Michal Ostrowski
2003-06-25 16:01 ` Jason Lunz [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=slrnbfjhqh.h0q.lunz@stoli.localnet \
--to=lunz@falooley.org \
--cc=netdev@oss.sgi.com \
/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).