Re: Why do we do if_init for AF_INET even if the interface is running?
- From: Brooks Davis <brooks@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 12 Jun 2006 22:03:19 -0700
On Tue, Jun 13, 2006 at 10:49:34AM +0800, Xin LI wrote:
Hi,
Is there any reason why we do if_init() for AF_INET regardless whether
the interface is already in IF_DRV_RUNNING? This seems to cause the
interface to reinitialize its link level state, which causes the network
to stop for a short while.
The proposed patch is inspired from NetBSD net/if_ethersubr.c,v 1.86
which says:
"When setting an address on an interface, for address families which
do not require changing the link-level address, only (*if_init)()
if the interface is not already RUNNING."
I think we may want this as well.
Comments?
As Sam says, there are hardware filters that need to be initialized.
My feeling is that you're correct that doing so via if_init is a bug
since that's way too big a hammer, but there are too many edge cases
for it to be possible to have a flag day. If we want to move to more
selective updating, the way to do it is probably some sort of flag
similar to IFF_NEEDSGIANT that tell the interface subsystem to keep the
old behavior and otherwise pass the change down to the driver to decide
what it needs to do. That way we could make the change over time and
eventually deprecate and then remove the flag.
-- Brooks
--
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4
Attachment:
pgpGJPHXQtugp.pgp
Description: PGP signature
- References:
- Prev by Date: Re: Why do we do if_init for AF_INET even if the interface is running?
- Next by Date: enc0 patch for ipsec
- Previous by thread: Re: Why do we do if_init for AF_INET even if the interface is running?
- Next by thread: enc0 patch for ipsec
- Index(es):
Relevant Pages
|
|