Re: Why do we do if_init for AF_INET even if the interface is running?



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



Relevant Pages

  • [PATCH 0/8] dynamic debug
    ... Each kernel sub-system seems to have its own way of dealing with debugging ... INTERFACE - userspace ... cpufreq_shared 0 flag 0 ...
    (Linux-Kernel)
  • Re: [PATCH 0/8] dynamic debug
    ... Each kernel sub-system seems to have its own way of dealing with debugging ... cpufreq_shared 0 flag 0 ... I've tried to make the kernel interface as simple as possible. ...
    (Linux-Kernel)
  • Re: [PATCH] capabilities not inherited
    ... >> interface and thus exposing security flaws, ... > Isn't the keep_capabilities flag related to setuid? ... And I still think having apps being able to keep a chain of capabilities ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: [PATCH 1/4] coredump: add an interface to control the core dump routine
    ... procfs interface, then I noticed I may have misunderstood what you said. ... there are other parameters to control core dumping such as dumpable ... You can change the flag status for a particular process by ... highly reliable core dumper because they don't want to experience ...
    (Linux-Kernel)
  • Re: Hobbyist kit installation problems
    ... Those were some really good directions, except for the /primary flag, ... It was complaining that the primary dhcp ... SHOW INTERFACE SE0/FULL ...
    (comp.os.vms)