Date: Thu, 20 Mar 2008 05:35:02 +0000 (UTC) From: Kip Macy <kmacy@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/net if_ethersubr.c Message-ID: <200803200535.m2K5Z2wj031762@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
kmacy 2008-03-20 05:35:02 UTC FreeBSD src repository Modified files: sys/net if_ethersubr.c Log: 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)) { EM_CORE_LOCK(adapter); em_init_locked(adapter); EM_CORE_UNLOCK(adapter); } arp_ifinit(ifp, ifa); } else error = ether_ioctl(ifp, command, data); break; Revision Changes Path 1.242 +2 -1 src/sys/net/if_ethersubr.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803200535.m2K5Z2wj031762>