cvs commit: src/sys/net if_ethersubr.c

Kip Macy kmacy at
Wed Mar 19 22:35:03 PDT 2008

kmacy       2008-03-20 05:35:02 UTC

  FreeBSD src repository

  Modified files:
    sys/net              if_ethersubr.c 
  Don't re-initialize the interface if it is already running.
  This one line change makes the following code found in many ethernet device drivers
  (at least em, igb, ixgbe, and cxgb) gratuitous
          case SIOCSIFADDR:
                  if (ifa->ifa_addr->sa_family == AF_INET) {
                           * XXX
                           * Since resetting hardware takes a very long time
                           * and results in link renegotiation we only
                           * initialize the hardware only when it is absolutely
                           * required.
                          ifp->if_flags |= IFF_UP;
                          if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) {
                          arp_ifinit(ifp, ifa);
                  } else
                          error = ether_ioctl(ifp, command, data);
  Revision  Changes    Path
  1.242     +2 -1      src/sys/net/if_ethersubr.c

More information about the cvs-src mailing list