From: <wyb@topsec.com.cn>
To: <netdev@vger.kernel.org>
Cc: "'Herbert Xu'" <herbert@gondor.apana.org.au>
Subject: RE:RE: is it useful testing __LINK_STATE_RX_SCHED in dev_close()?
Date: Wed, 21 Nov 2007 15:09:52 +0800 [thread overview]
Message-ID: <200711210712.AYG00766@topsec.com.cn> (raw)
In-Reply-To: <E1IuhbM-0006tD-00@gondolin.me.apana.org.au>
__LINK_STATE_RX_SCHED still exist in kernel 2.6.23.8.
Netdevice.h:
/* Test if receive needs to be scheduled */
static inline int __netif_rx_schedule_prep(struct net_device *dev)
{
return !test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state);
}
/* Test if receive needs to be scheduled but only if up */
static inline int netif_rx_schedule_prep(struct net_device *dev)
{
return netif_running(dev) && __netif_rx_schedule_prep(dev);
}
Dev.c:
int dev_close(struct net_device *dev)
{
...
while (test_bit(__LINK_STATE_RX_SCHED, &dev->state)) {
/* No hurry. */
msleep(1);
}
...
}
Test_bit() in dev_close() maybe between the calling of netif_running() and
__netif_rx_schedule_prep() in netif_rx_schedule_prep.
next prev parent reply other threads:[~2007-11-21 7:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-21 1:40 is it useful testing __LINK_STATE_RX_SCHED in dev_close()? wyb
2007-11-21 4:54 ` Herbert Xu
2007-11-21 7:09 ` wyb [this message]
2007-11-21 8:54 ` Herbert Xu
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=200711210712.AYG00766@topsec.com.cn \
--to=wyb@topsec.com.cn \
--cc=herbert@gondor.apana.org.au \
--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).