From owner-svn-src-projects@FreeBSD.ORG Mon Jan 12 11:25:09 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0FB3CB4; Mon, 12 Jan 2015 11:25:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBB1AD33; Mon, 12 Jan 2015 11:25:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0CBP8bt052553; Mon, 12 Jan 2015 11:25:08 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CBP5IE052526; Mon, 12 Jan 2015 11:25:05 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201501121125.t0CBP5IE052526@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 12 Jan 2015 11:25:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r277065 - in projects/ifnet/sys: dev/virtio/network net netinet netinet6 X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 11:25:09 -0000 Author: glebius Date: Mon Jan 12 11:25:04 2015 New Revision: 277065 URL: https://svnweb.freebsd.org/changeset/base/277065 Log: - Obsolete if_drv_flags. The IFF_DRV_RUNNING migrates to drivers softc. The flag IFF_RUNNING originates from ancient times when a) all ifnets were statically defined in the kernel b) there were no notion of link state. Today the IFF_UP is enough to describe administrative state of an interface, and if_link_state is enough to describe physical state. - Obsolete if_start. During convertion process all drivers would need to migrate to if_transmit. A dumb technique of doing that would be provided. Modified: projects/ifnet/sys/dev/virtio/network/if_vtnet.c projects/ifnet/sys/dev/virtio/network/if_vtnetvar.h projects/ifnet/sys/net/if.c projects/ifnet/sys/net/if.h projects/ifnet/sys/net/if_debug.c projects/ifnet/sys/net/if_ethersubr.c projects/ifnet/sys/net/if_loop.c projects/ifnet/sys/net/if_mib.c projects/ifnet/sys/net/if_var.h projects/ifnet/sys/net/ifq.h projects/ifnet/sys/net/rtsock.c projects/ifnet/sys/netinet/ip_fastfwd.c projects/ifnet/sys/netinet6/in6.c projects/ifnet/sys/netinet6/nd6_nbr.c Modified: projects/ifnet/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- projects/ifnet/sys/dev/virtio/network/if_vtnet.c Mon Jan 12 10:43:40 2015 (r277064) +++ projects/ifnet/sys/dev/virtio/network/if_vtnet.c Mon Jan 12 11:25:04 2015 (r277065) @@ -1004,8 +1004,8 @@ vtnet_change_mtu(struct vtnet_softc *sc, if_setflags(ifp, IF_MTU, new_mtu); sc->vtnet_rx_new_clsize = clsize; - if (if_getflags(ifp, IF_DRV_FLAGS) & IFF_DRV_RUNNING) { - if_clrflags(ifp, IF_DRV_FLAGS, IFF_DRV_RUNNING); + if (sc->vtnet_flags & VTNET_FLAG_RUNNING) { + sc->vtnet_flags &= ~VTNET_FLAG_RUNNING; vtnet_init_locked(sc); } @@ -1035,9 +1035,9 @@ vtnet_ioctl(if_t ifp, u_long cmd, caddr_ case SIOCSIFFLAGS: VTNET_CORE_LOCK(sc); if ((if_getflags(ifp, IF_FLAGS) & IFF_UP) == 0) { - if (if_getflags(ifp, IF_DRV_FLAGS) & IFF_DRV_RUNNING) + if (sc->vtnet_flags & VTNET_FLAG_RUNNING) vtnet_stop(sc); - } else if (if_getflags(ifp, IF_DRV_FLAGS) & IFF_DRV_RUNNING) { + } else if (sc->vtnet_flags & VTNET_FLAG_RUNNING) { if ((if_getflags(ifp, IF_FLAGS) ^ sc->vtnet_if_flags) & (IFF_PROMISC | IFF_ALLMULTI)) { if (sc->vtnet_flags & VTNET_FLAG_CTRL_RX) @@ -1058,7 +1058,7 @@ vtnet_ioctl(if_t ifp, u_long cmd, caddr_ if ((sc->vtnet_flags & VTNET_FLAG_CTRL_RX) == 0) break; VTNET_CORE_LOCK(sc); - if (if_getflags(ifp, IF_DRV_FLAGS) & IFF_DRV_RUNNING) + if (sc->vtnet_flags & VTNET_FLAG_RUNNING) vtnet_rx_filter_mac(sc); VTNET_CORE_UNLOCK(sc); break; @@ -1103,9 +1103,8 @@ vtnet_ioctl(if_t ifp, u_long cmd, caddr_ if (mask & IFCAP_VLAN_HWTAGGING) capenable ^= IFCAP_VLAN_HWTAGGING; - if (reinit && - (if_getflags(ifp, IF_DRV_FLAGS) & IFF_DRV_RUNNING)) { - if_clrflags(ifp, IF_DRV_FLAGS, IFF_DRV_RUNNING); + if (reinit && (sc->vtnet_flags & VTNET_FLAG_RUNNING)) { + sc->vtnet_flags &= ~VTNET_FLAG_RUNNING; vtnet_init_locked(sc); } @@ -1776,7 +1775,7 @@ vtnet_rxq_eof(struct vtnet_rxq *rxq) vtnet_rxq_input(rxq, m, hdr); /* Must recheck after dropping the Rx lock. */ - if ((if_getflags(ifp, IF_DRV_FLAGS) & IFF_DRV_RUNNING) == 0) + if ((sc->vtnet_flags & VTNET_FLAG_RUNNING) == 0) break; } @@ -1813,7 +1812,7 @@ vtnet_rx_vq_intr(void *xrxq) VTNET_RXQ_LOCK(rxq); again: - if ((if_getflags(ifp, IF_DRV_FLAGS) & IFF_DRV_RUNNING) == 0) { + if ((sc->vtnet_flags & VTNET_FLAG_RUNNING) == 0) { VTNET_RXQ_UNLOCK(rxq); return; } @@ -1850,7 +1849,7 @@ vtnet_rxq_tq_intr(void *xrxq, int pendin VTNET_RXQ_LOCK(rxq); - if ((if_getflags(ifp, IF_DRV_FLAGS) & IFF_DRV_RUNNING) == 0) { + if ((sc->vtnet_flags & VTNET_FLAG_RUNNING) == 0) { VTNET_RXQ_UNLOCK(rxq); return; } @@ -2188,7 +2187,7 @@ vtnet_txq_mq_start_locked(struct vtnet_t VTNET_TXQ_LOCK_ASSERT(txq); - if ((if_getflags(ifp, IF_DRV_FLAGS) & IFF_DRV_RUNNING) == 0 || + if ((sc->vtnet_flags & VTNET_FLAG_RUNNING) == 0 || sc->vtnet_link_active == 0) { if (m != NULL) error = buf_ring_enqueue(br, m); @@ -2304,7 +2303,7 @@ vtnet_txq_tq_intr(void *xtxq, int pendin VTNET_TXQ_LOCK(txq); - if ((if_getflags(ifp, IF_DRV_FLAGS) & IFF_DRV_RUNNING) == 0) { + if ((sc->vtnet_flags & VTNET_FLAG_RUNNING) == 0) { VTNET_TXQ_UNLOCK(txq); return; } @@ -2377,7 +2376,7 @@ vtnet_tx_vq_intr(void *xtxq) VTNET_TXQ_LOCK(txq); - if ((if_getflags(ifp, IF_DRV_FLAGS) & IFF_DRV_RUNNING) == 0) { + if ((sc->vtnet_flags & VTNET_FLAG_RUNNING) == 0) { VTNET_TXQ_UNLOCK(txq); return; } @@ -2530,7 +2529,7 @@ vtnet_tick(void *xsc) timedout |= vtnet_watchdog(&sc->vtnet_txqs[i]); if (timedout != 0) { - if_clrflags(ifp, IF_DRV_FLAGS, IFF_DRV_RUNNING); + sc->vtnet_flags &= ~VTNET_FLAG_RUNNING; vtnet_init_locked(sc); } else callout_schedule(&sc->vtnet_tick_ch, hz); @@ -2667,7 +2666,7 @@ vtnet_stop(struct vtnet_softc *sc) VTNET_CORE_LOCK_ASSERT(sc); - if_clrflags(ifp, IF_DRV_FLAGS, IFF_DRV_RUNNING); + sc->vtnet_flags &= ~VTNET_FLAG_RUNNING; sc->vtnet_link_active = 0; callout_stop(&sc->vtnet_tick_ch); @@ -2902,7 +2901,7 @@ vtnet_reinit(struct vtnet_softc *sc) return (error); vtnet_enable_interrupts(sc); - if_addflags(ifp, IF_DRV_FLAGS, IFF_DRV_RUNNING); + sc->vtnet_flags |= VTNET_FLAG_RUNNING; return (0); } @@ -2918,7 +2917,7 @@ vtnet_init_locked(struct vtnet_softc *sc VTNET_CORE_LOCK_ASSERT(sc); - if (if_getflags(ifp, IF_DRV_FLAGS) & IFF_DRV_RUNNING) + if (sc->vtnet_flags & VTNET_FLAG_RUNNING) return; vtnet_stop(sc); Modified: projects/ifnet/sys/dev/virtio/network/if_vtnetvar.h ============================================================================== --- projects/ifnet/sys/dev/virtio/network/if_vtnetvar.h Mon Jan 12 10:43:40 2015 (r277064) +++ projects/ifnet/sys/dev/virtio/network/if_vtnetvar.h Mon Jan 12 11:25:04 2015 (r277065) @@ -142,6 +142,7 @@ struct vtnet_softc { #define VTNET_FLAG_MULTIQ 0x0200 #define VTNET_FLAG_INDIRECT 0x0400 #define VTNET_FLAG_EVENT_IDX 0x0800 +#define VTNET_FLAG_RUNNING 0x1000 int vtnet_link_active; int vtnet_hdr_size; Modified: projects/ifnet/sys/net/if.c ============================================================================== --- projects/ifnet/sys/net/if.c Mon Jan 12 10:43:40 2015 (r277064) +++ projects/ifnet/sys/net/if.c Mon Jan 12 11:25:04 2015 (r277065) @@ -162,7 +162,6 @@ static void if_freemulti(struct ifmultia static void if_grow(void); static void if_route(struct ifnet *, int flag, int fam); static int if_setflag(struct ifnet *, int, int, int *, int); -static int if_transmit_start(struct ifnet *ifp, struct mbuf *m); static void if_unroute(struct ifnet *, int flag, int fam); static void link_rtrequest(int, struct rtentry *, struct rt_addrinfo *); static int if_rtdel(struct radix_node *, void *); @@ -444,7 +443,6 @@ ifdriver_bless(struct ifdriver *ifdrv, s COPY(ifop_ioctl); COPY(ifop_get_counter); COPY(ifop_init); - COPY(ifop_start); COPY(ifop_qflush); COPY(ifop_resolvemulti); COPY(ifop_reassign); @@ -463,10 +461,6 @@ ifdriver_bless(struct ifdriver *ifdrv, s (ifdrv->ifdrv_ops.ifop_transmit != NULL && ifdrv->ifdrv_ops.ifop_qflush != NULL), ("transmit and qflush must both either be set or both be NULL")); - if (ifdrv->ifdrv_ops.ifop_transmit == NULL) { - ifdrv->ifdrv_ops.ifop_transmit = if_transmit_start; - ifdrv->ifdrv_ops.ifop_qflush = if_qflush; - } if (ifdrv->ifdrv_ops.ifop_get_counter == NULL) ifdrv->ifdrv_ops.ifop_get_counter = if_get_counter_default; @@ -1526,9 +1520,6 @@ if_getfeature(if_t ifp, ift_feature f, u case IF_FLAGS: *f32 = &ifp->if_flags; break; - case IF_DRV_FLAGS: - *f32 = &ifp->if_drv_flags; - break; case IF_CAPABILITIES: *f32 = &ifp->if_capabilities; break; @@ -2453,7 +2444,7 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, break; case SIOCGIFFLAGS: - temp_flags = ifp->if_flags | ifp->if_drv_flags; + temp_flags = ifp->if_flags; ifr->ifr_flags = temp_flags & 0xffff; ifr->ifr_flagshigh = temp_flags >> 16; break; @@ -2974,10 +2965,6 @@ if_setflag(struct ifnet *ifp, int flag, int error; int oldflags, oldcount; - /* Sanity checks to catch programming errors */ - KASSERT((flag & (IFF_DRV_OACTIVE|IFF_DRV_RUNNING)) == 0, - ("%s: setting driver-owned flag %d", __func__, flag)); - if (onswitch) KASSERT(*refcount >= 0, ("%s: increment negative refcount %d for flag %d", @@ -3653,44 +3640,6 @@ if_printf(struct ifnet *ifp, const char return (retval); } -/* - * Backwards compatibility interface for drivers - * that have not implemented if_transmit. - */ -static int -if_transmit_start(struct ifnet *ifp, struct mbuf *m) -{ - int error; - - IFQ_HANDOFF(ifp, m, error); - return (error); -} - -int -if_handoff(struct ifqueue *ifq, struct mbuf *m, struct ifnet *ifp, int adjust) -{ - int active = 0; - - IF_LOCK(ifq); - if (_IF_QFULL(ifq)) { - IF_UNLOCK(ifq); - if_inc_counter(ifp, IFCOUNTER_OQDROPS, 1); - m_freem(m); - return (0); - } - if (ifp != NULL) { - if_inc_counter(ifp, IFCOUNTER_OBYTES, m->m_pkthdr.len + adjust); - if (m->m_flags & (M_BCAST|M_MCAST)) - if_inc_counter(ifp, IFCOUNTER_OMCASTS, 1); - active = ifp->if_drv_flags & IFF_DRV_OACTIVE; - } - _IF_ENQUEUE(ifq, m); - IF_UNLOCK(ifq); - if (ifp != NULL && !active) - if_start(ifp); - return (1); -} - int if_getmtu_family(if_t ifp, int family) { Modified: projects/ifnet/sys/net/if.h ============================================================================== --- projects/ifnet/sys/net/if.h Mon Jan 12 10:43:40 2015 (r277064) +++ projects/ifnet/sys/net/if.h Mon Jan 12 11:25:04 2015 (r277065) @@ -143,11 +143,11 @@ struct if_data { #define IFF_LOOPBACK 0x8 /* (i) is a loopback net */ #define IFF_POINTOPOINT 0x10 /* (i) is a point-to-point link */ /* 0x20 was IFF_SMART */ -#define IFF_DRV_RUNNING 0x40 /* (d) resources allocated */ +#define IFF_RUNNING 0x40 /* (d) resources allocated */ #define IFF_NOARP 0x80 /* (n) no address resolution protocol */ #define IFF_PROMISC 0x100 /* (n) receive all packets */ #define IFF_ALLMULTI 0x200 /* (n) receive all multicast packets */ -#define IFF_DRV_OACTIVE 0x400 /* (d) tx hardware queue is full */ +#define IFF_OACTIVE 0x400 /* (d) tx hardware queue is full */ #define IFF_SIMPLEX 0x800 /* (i) can't hear own transmissions */ #define IFF_LINK0 0x1000 /* per link layer defined bit */ #define IFF_LINK1 0x2000 /* per link layer defined bit */ @@ -160,18 +160,10 @@ struct if_data { #define IFF_STATICARP 0x80000 /* (n) static ARP */ #define IFF_DYING 0x200000 /* (n) interface is winding down */ #define IFF_RENAMING 0x400000 /* (n) interface is being renamed */ -/* - * Old names for driver flags so that user space tools can continue to use - * the old (portable) names. - */ -#ifndef _KERNEL -#define IFF_RUNNING IFF_DRV_RUNNING -#define IFF_OACTIVE IFF_DRV_OACTIVE -#endif /* flags set internally only: */ #define IFF_CANTCHANGE \ - (IFF_BROADCAST|IFF_POINTOPOINT|IFF_DRV_RUNNING|IFF_DRV_OACTIVE|\ + (IFF_BROADCAST|IFF_POINTOPOINT|IFF_RUNNING|IFF_OACTIVE|\ IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI|IFF_PROMISC|\ IFF_DYING|IFF_CANTCONFIG) @@ -578,7 +570,6 @@ typedef enum { typedef enum { /* uint32_t */ IF_FLAGS = 1, - IF_DRV_FLAGS, IF_CAPABILITIES, IF_CAPENABLE, IF_MTU, @@ -598,7 +589,6 @@ typedef int (*if_output_t)(if_t, struct struct route *); typedef int (*if_ioctl_t)(if_t, u_long, caddr_t); typedef uint64_t (*if_get_counter_t)(if_t, ift_counter); -typedef void (*if_start_t)(if_t); typedef void (*if_qflush_t)(if_t); typedef int (*if_resolvemulti_t)(if_t, struct sockaddr **, struct sockaddr *); @@ -616,7 +606,6 @@ struct ifops { if_ioctl_t ifop_ioctl; /* ioctl routine */ if_get_counter_t ifop_get_counter; /* get counter values */ if_init_t ifop_init; /* init routine */ - if_start_t ifop_start; /* initiate output routine */ if_qflush_t ifop_qflush; /* flush any queue */ if_resolvemulti_t ifop_resolvemulti; /* validate/resolve multicast */ if_reassign_t ifop_reassign; /* reassign to vnet routine */ Modified: projects/ifnet/sys/net/if_debug.c ============================================================================== --- projects/ifnet/sys/net/if_debug.c Mon Jan 12 10:43:40 2015 (r277064) +++ projects/ifnet/sys/net/if_debug.c Mon Jan 12 11:25:04 2015 (r277065) @@ -69,7 +69,6 @@ if_show_ifnet(struct ifnet *ifp) IF_DB_PRINTF("%p", if_label); IF_DB_PRINTF("%u", if_pcount); IF_DB_PRINTF("0x%08x", if_flags); - IF_DB_PRINTF("0x%08x", if_drv_flags); IF_DB_PRINTF("0x%08x", if_capabilities); IF_DB_PRINTF("0x%08x", if_capenable); IF_DB_PRINTF("%p", if_snd.ifq_head); Modified: projects/ifnet/sys/net/if_ethersubr.c ============================================================================== --- projects/ifnet/sys/net/if_ethersubr.c Mon Jan 12 10:43:40 2015 (r277064) +++ projects/ifnet/sys/net/if_ethersubr.c Mon Jan 12 11:25:04 2015 (r277065) @@ -176,8 +176,7 @@ ether_output(struct ifnet *ifp, struct m M_PROFILE(m); if (ifp->if_flags & IFF_MONITOR) senderr(ENETDOWN); - if (!((ifp->if_flags & IFF_UP) && - (ifp->if_drv_flags & IFF_DRV_RUNNING))) + if ((ifp->if_flags & IFF_UP) == 0) senderr(ENETDOWN); hlen = ETHER_HDR_LEN; @@ -386,13 +385,6 @@ ether_input_internal(struct ifnet *ifp, m_freem(m); return; } -#ifdef DIAGNOSTIC - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { - if_printf(ifp, "discard frame at !IFF_DRV_RUNNING\n"); - m_freem(m); - return; - } -#endif /* * Do consistency checks to verify assumptions * made by code past this point. Modified: projects/ifnet/sys/net/if_loop.c ============================================================================== --- projects/ifnet/sys/net/if_loop.c Mon Jan 12 10:43:40 2015 (r277064) +++ projects/ifnet/sys/net/if_loop.c Mon Jan 12 11:25:04 2015 (r277065) @@ -367,7 +367,6 @@ loioctl(if_t ifp, u_long cmd, caddr_t da switch (cmd) { case SIOCSIFADDR: if_addflags(ifp, IF_FLAGS, IFF_UP); - if_addflags(ifp, IF_DRV_FLAGS, IFF_DRV_RUNNING); /* * Everything else is done at a higher level. */ Modified: projects/ifnet/sys/net/if_mib.c ============================================================================== --- projects/ifnet/sys/net/if_mib.c Mon Jan 12 10:43:40 2015 (r277064) +++ projects/ifnet/sys/net/if_mib.c Mon Jan 12 11:25:04 2015 (r277065) @@ -102,7 +102,7 @@ sysctl_ifdata(SYSCTL_HANDLER_ARGS) /* XX ifmd.ifmd_pcount = ifp->if_pcount; if_data_copy(ifp, &ifmd.ifmd_data); - ifmd.ifmd_flags = ifp->if_flags | ifp->if_drv_flags; + ifmd.ifmd_flags = ifp->if_flags; ifmd.ifmd_snd_len = ifp->if_snd.ifq_len; ifmd.ifmd_snd_maxlen = ifp->if_snd.ifq_maxlen; ifmd.ifmd_snd_drops = if_get_counter(ifp, IFCOUNTER_OQDROPS); Modified: projects/ifnet/sys/net/if_var.h ============================================================================== --- projects/ifnet/sys/net/if_var.h Mon Jan 12 10:43:40 2015 (r277064) +++ projects/ifnet/sys/net/if_var.h Mon Jan 12 11:25:04 2015 (r277065) @@ -109,7 +109,6 @@ struct ifnet { /* Variable fields that are touched by the stack and drivers. */ uint32_t if_flags; /* up/down, broadcast, etc. */ - uint32_t if_drv_flags; /* driver-managed status flags */ uint32_t if_capabilities;/* interface features & capabilities */ uint32_t if_capenable; /* enabled features & capabilities */ void *if_linkmib; /* link-type-specific MIB data */ @@ -465,13 +464,6 @@ if_transmit(if_t ifp, struct mbuf *m) return (ifp->if_ops->ifop_transmit(ifp, m)); } -static inline void -if_start(if_t ifp) -{ - - return (ifp->if_ops->ifop_start(ifp)); -} - static inline int if_output(if_t ifp, struct mbuf *m, const struct sockaddr *dst, struct route *ro) Modified: projects/ifnet/sys/net/ifq.h ============================================================================== --- projects/ifnet/sys/net/ifq.h Mon Jan 12 10:43:40 2015 (r277064) +++ projects/ifnet/sys/net/ifq.h Mon Jan 12 11:25:04 2015 (r277065) @@ -157,8 +157,6 @@ int if_handoff(struct ifqueue *ifq, stru #define IF_HANDOFF_ADJ(ifq, m, ifp, adj) \ if_handoff((struct ifqueue *)ifq, m, ifp, adj) -void if_start(struct ifnet *); - #define IFQ_ENQUEUE(ifq, m, err) \ do { \ IF_LOCK(ifq); \ Modified: projects/ifnet/sys/net/rtsock.c ============================================================================== --- projects/ifnet/sys/net/rtsock.c Mon Jan 12 10:43:40 2015 (r277064) +++ projects/ifnet/sys/net/rtsock.c Mon Jan 12 11:25:04 2015 (r277065) @@ -1252,7 +1252,7 @@ rt_ifmsg(struct ifnet *ifp) return; ifm = mtod(m, struct if_msghdr *); ifm->ifm_index = ifp->if_index; - ifm->ifm_flags = ifp->if_flags | ifp->if_drv_flags; + ifm->ifm_flags = ifp->if_flags; if_data_copy(ifp, &ifm->ifm_data); ifm->ifm_addrs = 0; rt_dispatch(m, AF_UNSPEC); @@ -1557,7 +1557,7 @@ sysctl_iflist_ifml(struct ifnet *ifp, st ifm32 = (struct if_msghdrl32 *)ifm; ifm32->ifm_addrs = info->rti_addrs; - ifm32->ifm_flags = ifp->if_flags | ifp->if_drv_flags; + ifm32->ifm_flags = ifp->if_flags; ifm32->ifm_index = ifp->if_index; ifm32->_ifm_spare1 = 0; ifm32->ifm_len = sizeof(*ifm32); @@ -1567,7 +1567,7 @@ sysctl_iflist_ifml(struct ifnet *ifp, st #endif { ifm->ifm_addrs = info->rti_addrs; - ifm->ifm_flags = ifp->if_flags | ifp->if_drv_flags; + ifm->ifm_flags = ifp->if_flags; ifm->ifm_index = ifp->if_index; ifm->_ifm_spare1 = 0; ifm->ifm_len = sizeof(*ifm); @@ -1595,14 +1595,14 @@ sysctl_iflist_ifm(struct ifnet *ifp, str ifm32 = (struct if_msghdr32 *)ifm; ifm32->ifm_addrs = info->rti_addrs; - ifm32->ifm_flags = ifp->if_flags | ifp->if_drv_flags; + ifm32->ifm_flags = ifp->if_flags; ifm32->ifm_index = ifp->if_index; ifd = &ifm32->ifm_data; } else #endif { ifm->ifm_addrs = info->rti_addrs; - ifm->ifm_flags = ifp->if_flags | ifp->if_drv_flags; + ifm->ifm_flags = ifp->if_flags; ifm->ifm_index = ifp->if_index; ifd = &ifm->ifm_data; } Modified: projects/ifnet/sys/netinet/ip_fastfwd.c ============================================================================== --- projects/ifnet/sys/netinet/ip_fastfwd.c Mon Jan 12 10:43:40 2015 (r277064) +++ projects/ifnet/sys/netinet/ip_fastfwd.c Mon Jan 12 11:25:04 2015 (r277065) @@ -134,9 +134,7 @@ ip_findroute(struct route *ro, struct in * Route there and interface still up? */ rt = ro->ro_rt; - if (rt && (rt->rt_flags & RTF_UP) && - (rt->rt_ifp->if_flags & IFF_UP) && - (rt->rt_ifp->if_drv_flags & IFF_DRV_RUNNING)) { + if (rt && (rt->rt_flags & RTF_UP) && (rt->rt_ifp->if_flags & IFF_UP)) { if (rt->rt_flags & RTF_GATEWAY) dst = (struct sockaddr_in *)rt->rt_gateway; } else { Modified: projects/ifnet/sys/netinet6/in6.c ============================================================================== --- projects/ifnet/sys/netinet6/in6.c Mon Jan 12 10:43:40 2015 (r277064) +++ projects/ifnet/sys/netinet6/in6.c Mon Jan 12 11:25:04 2015 (r277065) @@ -1917,8 +1917,7 @@ in6if_do_dad(struct ifnet *ifp) * XXX: we should rather mark "tentative" on such addresses, * and do DAD after the interface becomes ready. */ - if (!((ifp->if_flags & IFF_UP) && - (ifp->if_drv_flags & IFF_DRV_RUNNING))) + if ((ifp->if_flags & IFF_UP) == 0) return (0); return (1); Modified: projects/ifnet/sys/netinet6/nd6_nbr.c ============================================================================== --- projects/ifnet/sys/netinet6/nd6_nbr.c Mon Jan 12 10:43:40 2015 (r277064) +++ projects/ifnet/sys/netinet6/nd6_nbr.c Mon Jan 12 11:25:04 2015 (r277065) @@ -1483,10 +1483,6 @@ nd6_dad_ns_output(struct dadq *dp, struc if ((ifp->if_flags & IFF_UP) == 0) { return; } - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { - return; - } - dp->dad_ns_ocount++; nd6_ns_output(ifp, NULL, &ia->ia_addr.sin6_addr, NULL, 1); }