From owner-freebsd-arch@FreeBSD.ORG Tue Jun 13 02:49:49 2006 Return-Path: X-Original-To: freebsd-arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9D29716A4CB for ; Tue, 13 Jun 2006 02:49:49 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [210.51.165.229]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6387F43D5F for ; Tue, 13 Jun 2006 02:49:46 +0000 (GMT) (envelope-from delphij@delphij.net) Received: from localhost (tarsier.geekcn.org [210.51.165.229]) by tarsier.geekcn.org (Postfix) with ESMTP id 1EC48EB0B77 for ; Tue, 13 Jun 2006 10:49:45 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([210.51.165.229]) by localhost (mail.geekcn.org [210.51.165.229]) (amavisd-new, port 10024) with ESMTP id 9H1N5bA+gZnL for ; Tue, 13 Jun 2006 10:49:38 +0800 (CST) Received: from [10.217.12.210] (sina152-194.staff.sina.com.cn [61.135.152.194]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTP id 21E46EB0B3B for ; Tue, 13 Jun 2006 10:49:37 +0800 (CST) From: Xin LI To: freebsd-arch@FreeBSD.org Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-Dpq9o/HbflHL57rEfR8e" Organization: The FreeBSD Project Date: Tue, 13 Jun 2006 10:49:34 +0800 Message-Id: <1150166974.936.6.camel@spirit> Mime-Version: 1.0 X-Mailer: Evolution 2.6.2 FreeBSD GNOME Team Port Cc: Subject: Why do we do if_init for AF_INET even if the interface is running? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jun 2006 02:49:49 -0000 --=-Dpq9o/HbflHL57rEfR8e Content-Type: multipart/mixed; boundary="=-efWsI2BtVBYfcy+E8XlV" --=-efWsI2BtVBYfcy+E8XlV Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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? Cheers, --=20 Xin LI http://www.delphij.net/ --=-efWsI2BtVBYfcy+E8XlV Content-Disposition: attachment; filename=patch-if_ethersubr.c Content-Type: text/x-patch; name=patch-if_ethersubr.c; charset=ISO-8859-1 Content-Transfer-Encoding: base64 SW5kZXg6IGlmX2V0aGVyc3Vici5jDQo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQpSQ1MgZmlsZTogL2hvbWUvbmN2cy9z cmMvc3lzL25ldC9pZl9ldGhlcnN1YnIuYyx2DQpyZXRyaWV2aW5nIHJldmlzaW9uIDEuMjE1DQpk aWZmIC11IC1yMS4yMTUgaWZfZXRoZXJzdWJyLmMNCi0tLSBpZl9ldGhlcnN1YnIuYwkzIE1hciAy MDA2IDE3OjIxOjA4IC0wMDAwCTEuMjE1DQorKysgaWZfZXRoZXJzdWJyLmMJMTMgSnVuIDIwMDYg MDE6NTU6MzEgLTAwMDANCkBAIC05OTcsNyArOTk3LDggQEANCiAJCXN3aXRjaCAoaWZhLT5pZmFf YWRkci0+c2FfZmFtaWx5KSB7DQogI2lmZGVmIElORVQNCiAJCWNhc2UgQUZfSU5FVDoNCi0JCQlp ZnAtPmlmX2luaXQoaWZwLT5pZl9zb2Z0Yyk7CS8qIGJlZm9yZSBhcnB3aG9oYXMgKi8NCisJCQlp ZiAoIShpZnAtPmlmX2Rydl9mbGFncyAmIElGRl9EUlZfUlVOTklORykpDQorCQkJCWlmcC0+aWZf aW5pdChpZnAtPmlmX3NvZnRjKTsJLyogYmVmb3JlIGFycHdob2hhcyAqLw0KIAkJCWFycF9pZmlu aXQoaWZwLCBpZmEpOw0KIAkJCWJyZWFrOw0KICNlbmRpZg0KQEAgLTEwMjcsNyArMTAyOCw4IEBA DQogCQkJfQ0KICNlbmRpZg0KIAkJZGVmYXVsdDoNCi0JCQlpZnAtPmlmX2luaXQoaWZwLT5pZl9z b2Z0Yyk7DQorCQkJaWYgKCEoaWZwLT5pZl9kcnZfZmxhZ3MgJiBJRkZfRFJWX1JVTk5JTkcpKQ0K KwkJCQlpZnAtPmlmX2luaXQoaWZwLT5pZl9zb2Z0Yyk7DQogCQkJYnJlYWs7DQogCQl9DQogCQli cmVhazsNCg== --=-efWsI2BtVBYfcy+E8XlV-- --=-Dpq9o/HbflHL57rEfR8e Content-Type: application/pgp-signature; name=signature.asc Content-Description: =?UTF-8?Q?=E8=BF=99=E6=98=AF=E4=BF=A1=E4=BB=B6=E7=9A=84=E6=95=B0?= =?UTF-8?Q?=E5=AD=97=E7=AD=BE=E5=90=8D=E9=83=A8=E5=88=86?= -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQBEjie+hcUczkLqiksRAlloAJsFPysHYjKQ6cf4Jh4RLZuZs8JlUQCfetc0 30gvCZreFVQjDAi7CXjR5vM= =gR+e -----END PGP SIGNATURE----- --=-Dpq9o/HbflHL57rEfR8e--