Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Jun 2006 22:03:19 -0700
From:      Brooks Davis <brooks@one-eyed-alien.net>
To:        Xin LI <delphij@delphij.net>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: Why do we do if_init for AF_INET even if the interface is running?
Message-ID:  <20060613050319.GA9290@odin.ac.hmc.edu>
In-Reply-To: <1150166974.936.6.camel@spirit>
References:  <1150166974.936.6.camel@spirit>

next in thread | previous in thread | raw e-mail | index | archive | help

--h31gzZEtNLTqOjlF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jun 13, 2006 at 10:49:34AM +0800, Xin LI wrote:
> Hi,
>=20
> 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.
>=20
> The proposed patch is inspired from NetBSD net/if_ethersubr.c,v 1.86
> which says:
>=20
> "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."
>=20
> I think we may want this as well.
>=20
> 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

--=20
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

--h31gzZEtNLTqOjlF
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFEjkcWXY6L6fI4GtQRAng2AJ4lyQZVFvQCIy0TzqWjceAj/6IgJwCfU3FX
xcKaRkDtttpc15rfBZWdWkk=
=pAfW
-----END PGP SIGNATURE-----

--h31gzZEtNLTqOjlF--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060613050319.GA9290>