diff options
author | Matt Macy <mmacy@FreeBSD.org> | 2018-05-21 01:53:23 +0000 |
---|---|---|
committer | Matt Macy <mmacy@FreeBSD.org> | 2018-05-21 01:53:23 +0000 |
commit | fd04260d3ff2d1f80ccbe33921e9d73e7990384f (patch) | |
tree | c8e6c9f9ecbf3c9e50b5bc208972a12760c3f5bd /sys/net | |
parent | 986a5bafb1708322f547f8b4b8a684cedd122978 (diff) | |
download | src-fd04260d3ff2d1f80ccbe33921e9d73e7990384f.tar.gz src-fd04260d3ff2d1f80ccbe33921e9d73e7990384f.zip |
ck: simplify interface with libkvm consumers by defining ck_queue types
as their queue.h equivalents if !_KERNEL
Notes
Notes:
svn path=/head/; revision=333957
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_var.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 1e156ab5750a..c3618f5c5801 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -76,10 +76,10 @@ struct netdump_methods; #include <sys/mbuf.h> /* ifqueue only? */ #include <sys/buf_ring.h> #include <net/vnet.h> -#include <ck_queue.h> -#include <sys/epoch.h> #endif /* _KERNEL */ +#include <sys/ck.h> #include <sys/counter.h> +#include <sys/epoch.h> #include <sys/lock.h> /* XXX */ #include <sys/mutex.h> /* struct ifqueue */ #include <sys/rwlock.h> /* XXX */ @@ -90,13 +90,8 @@ struct netdump_methods; #include <net/altq/if_altq.h> TAILQ_HEAD(ifnethead, ifnet); /* we use TAILQs so that the order of */ -#ifdef _KERNEL CK_STAILQ_HEAD(ifaddrhead, ifaddr); /* instantiation is preserved in the list */ CK_STAILQ_HEAD(ifmultihead, ifmultiaddr); -#else -STAILQ_HEAD(ifaddrhead, ifaddr); /* instantiation is preserved in the list */ -STAILQ_HEAD(ifmultihead, ifmultiaddr); -#endif TAILQ_HEAD(ifgrouphead, ifg_group); #ifdef _KERNEL @@ -522,7 +517,7 @@ struct ifaddr { struct sockaddr *ifa_netmask; /* used to determine subnet */ struct ifnet *ifa_ifp; /* back-pointer to interface */ struct carp_softc *ifa_carp; /* pointer to CARP data */ - STAILQ_ENTRY(ifaddr) ifa_link; /* queue macro glue */ + CK_STAILQ_ENTRY(ifaddr) ifa_link; /* queue macro glue */ void (*ifa_rtrequest) /* check or clean routes (+ or -)'d */ (int, struct rtentry *, struct rt_addrinfo *); u_short ifa_flags; /* mostly rt_flags for cloning */ @@ -546,7 +541,7 @@ void ifa_ref(struct ifaddr *ifa); * structure except that it keeps track of multicast addresses. */ struct ifmultiaddr { - STAILQ_ENTRY(ifmultiaddr) ifma_link; /* queue macro glue */ + CK_STAILQ_ENTRY(ifmultiaddr) ifma_link; /* queue macro glue */ struct sockaddr *ifma_addr; /* address this membership is for */ struct sockaddr *ifma_lladdr; /* link-layer translation, if any */ struct ifnet *ifma_ifp; /* back-pointer to interface */ |