netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* dev_change_net_namespace() and synchronize_net()
@ 2009-01-27 10:23 Nicolas Dichtel
  0 siblings, 0 replies; only message in thread
From: Nicolas Dichtel @ 2009-01-27 10:23 UTC (permalink / raw)
  To: netdev

Hi folks,

I'm asking me philosophical questions about synchronize_net(). In my 
understanding, it is used to ensure that processing of current packets are finished.

In function dev_change_net_namespace(), synchronize_net() is called twice:

One time, between dev_close() and dev_shutdown(). I don't understand why it's 
needed here:
  - if interface is down, no packet can be processed by it
  - if interface is up, dev_close() will call dev_deactivate() which will call 
synchronize_rcu() (equivalent to synchronize_net()).

Second time, synchronize_net() is called just before exiting. Is it really 
necessary?


Thank you for your answers,
Nicolas

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-01-27 10:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-27 10:23 dev_change_net_namespace() and synchronize_net() Nicolas Dichtel

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).