Re: dev/em: Link is not up until 2 seconds after "ifconfig up"

From: Jacques A. Vidrine <nectar_at_FreeBSD.org>
Date: Mon, 8 Dec 2003 11:23:23 -0600
On Sun, Dec 07, 2003 at 04:41:39PM +0900, Jun Kuriyama wrote:
> 
> My experimental 1U box which has em0 and em1 shows following result.
> Doing "ifconfig em1 up" after "ifconfig em1 down", link is down 1 or
> more seconds.  

A co-worker of mine noticed this same issue, but when adding alias IP
addresses, e.g. `ifconfig em0 ... alias' causes a 1-2 second delay
each time it is invoked.  The workaround he used here was to make the
code match the comment in in_ifinit():

     671         /*                                                            
     672          * Give the interface a chance to initialize                  
     673          * if this is its first address,                              
     674          * and to validate the address if necessary.                  
     675          */                                                           
     676         if (ifp->if_ioctl &&                                          
     677             (error = (*ifp->if_ioctl)(ifp, SIOCSIFADDR, (caddr_t)ia))) {

(e.g. add a IFF_RUNNING check to this condition.)  Ultimately this
just avoids calling the driver's if_init routine every time `ifconfig
... alias' is run.  But, I don't think this workaround will work for
you, since you actually *are* bringing the interface up and down.

I suspect there is something amiss in the driver, but I haven't been
able to figure out the real issue myself, and I haven't gotten a
response from pdeuskar_at_ (I reported the issue several months back).

Cheers,
-- 
Jacques Vidrine   NTT/Verio SME      FreeBSD UNIX       Heimdal
nectar_at_celabo.org jvidrine_at_verio.net nectar_at_freebsd.org nectar_at_kth.se
Received on Mon Dec 08 2003 - 08:23:26 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:32 UTC