Date: Fri, 13 May 2005 14:36:08 -0400 From: gnn@freebsd.org To: Sebastien Petit <spe@phear.org> Cc: freebsd-net@freebsd.org Subject: Re: SIOCGIFMEDIA problems Message-ID: <m2mzqzc6sn.wl%gnn@neville-neil.com> In-Reply-To: <20050513191705.61d2b742.spe@phear.org> References: <20050513111013.41905e73.spe@phear.org> <m2wtq3cnkz.wl%gnn@neville-neil.com> <20050513191705.61d2b742.spe@phear.org>
next in thread | previous in thread | raw e-mail | index | archive | help
At Fri, 13 May 2005 19:17:05 +0200, Sebastien Petit wrote: > > 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 ? Actually, my mistake, it is the SIFMEDIA ioctl that causes a reset. GIFMEDIA should not cause a problem, at least not in that way so I'm not sure why this is happening. I don't see anything obvious in the code, but perhaps someone more expert in em/bge will chime in. Later, George
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m2mzqzc6sn.wl%gnn>