From owner-freebsd-net@FreeBSD.ORG Fri May 13 17:16:03 2005 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E2CEA16A4CE; Fri, 13 May 2005 17:16:03 +0000 (GMT) Received: from smtp.hispeed.ch (mxout.hispeed.ch [62.2.95.247]) by mx1.FreeBSD.org (Postfix) with ESMTP id 47AEC43D2F; Fri, 13 May 2005 17:16:03 +0000 (GMT) (envelope-from spe@phear.org) Received: from localhost (80-218-34-172.dclient.hispeed.ch [80.218.34.172]) j4DHG1IP004417; Fri, 13 May 2005 19:16:01 +0200 Date: Fri, 13 May 2005 19:17:05 +0200 From: Sebastien Petit To: gnn@freebsd.org Message-Id: <20050513191705.61d2b742.spe@phear.org> In-Reply-To: References: <20050513111013.41905e73.spe@phear.org> Organization: Phear / B0l X-Mailer: Sylpheed version 1.0.1 (GTK+ 1.2.10; i386--netbsdelf) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.84, clamav-milter version 0.84e on smtp-05.tornado.cablecom.ch X-Virus-Status: Clean X-DCC-spamcheck-02.tornado.cablecom.ch-Metrics: smtp-05.tornado.cablecom.ch 32701; Body=2 Fuz1=2 Fuz2=2 cc: freebsd-net@freebsd.org Subject: Re: SIOCGIFMEDIA problems X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2005 17:16:04 -0000 On Fri, 13 May 2005 08:33:32 -0400 gnn@freebsd.org wrote: > At Fri, 13 May 2005 11:10:13 +0200, > Sebastien Petit wrote: > > > > Hi -net hackers, > > > > A little question about SIOCGIFMEDIA ioctl: > > > > Somebody reports me that some interfaces (bge / em but anothers > > perhaps) seem to discard packet(s) during SIOCGIFMEDIA ioctl, Is it > > true and why ? > > At least in the case of the em driver it's because eventually > em_init_locked() is called which re-initializes the whole device, > including the memory buffers. It is unlikely that packets in the > buffers would survive that :-) I suspect the same is true of bge. Hmm. Ok, My question is oriented for my software freevrrpd, for checking the state of the network cards and do some monitoring on the network cards, I use the SIOCGIFMEDIA ioctl in a regular interval. But some VRRP packets from the MASTER server are dropped by the SLAVE server if this ioctl occurs in the same time. A solution will be to disable this ioctl but I cannot check the network card status anymore without perturbating communications. Why it's necessary to reinitialize the device for that ?! I propose to modify the SIOCGIFMEDIA for no resetting cards if it's not necessary for checking state :) btw, em and bge cards under FreeBSD 4.x are very long for changing state (down to up in 2 or 3 seconds before packets can be sent/received), I don't know if this is the case under FreeBSD 5.x but this can cause some problems :/ What do you think about that ? Regards, Sebastien. -- spe@b0l.org