diff options
author | rwatson <rwatson@FreeBSD.org> | 2009-03-15 14:21:05 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2009-03-15 14:21:05 +0000 |
commit | 70b6a8119c02ed07bc12918814c950d358cb1885 (patch) | |
tree | 27cbcf88d527d4a8b421eca8e088d73a000fb83f /sys/netinet/in_mcast.c | |
parent | 0592710988a69ee8c560a0e065d714f7ff578d43 (diff) | |
download | FreeBSD-src-70b6a8119c02ed07bc12918814c950d358cb1885.zip FreeBSD-src-70b6a8119c02ed07bc12918814c950d358cb1885.tar.gz |
Remove IFF_NEEDSGIANT, a compatibility infrastructure introduced
in FreeBSD 5.x to allow network device drivers to run with Giant
despite the network stack being Giant-free. This significantly
simplifies calls into ioctl() on network interfaces, especially
in the multicast code, as well as eliminates deferred invocation
of interface if_start routines.
Disable the build on device drivers still depending on
IFF_NEEDSGIANT as they no longer compile. They will be removed
in a few weeks if they haven't been made MPSAFE in that time.
Disabled drivers:
if_ar
if_axe
if_aue
if_cdce
if_cue
if_kue
if_ray
if_rue
if_rum
if_sr
if_udav
if_ural
if_zyd
Drivers that were already disabled because of tty changes:
if_ppp
if_sl
Discussed on: arch@
Diffstat (limited to 'sys/netinet/in_mcast.c')
-rw-r--r-- | sys/netinet/in_mcast.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c index 0c7e7e1..e91a5bf 100644 --- a/sys/netinet/in_mcast.c +++ b/sys/netinet/in_mcast.c @@ -1100,11 +1100,9 @@ in_joingroup(struct ifnet *ifp, const struct in_addr *gina, { int error; - IFF_LOCKGIANT(ifp); IN_MULTI_LOCK(); error = in_joingroup_locked(ifp, gina, imf, pinm); IN_MULTI_UNLOCK(); - IFF_UNLOCKGIANT(ifp); return (error); } @@ -1181,20 +1179,14 @@ int in_leavegroup(struct in_multi *inm, /*const*/ struct in_mfilter *imf) { struct ifnet *ifp; - int detached, error; + int error; - detached = inm_is_ifp_detached(inm); ifp = inm->inm_ifp; - if (!detached) - IFF_LOCKGIANT(ifp); IN_MULTI_LOCK(); error = in_leavegroup_locked(inm, imf); IN_MULTI_UNLOCK(); - if (!detached) - IFF_UNLOCKGIANT(ifp); - return (error); } @@ -1396,8 +1388,6 @@ inp_block_unblock_source(struct inpcb *inp, struct sockopt *sopt) if (!IN_MULTICAST(ntohl(gsa->sin.sin_addr.s_addr))) return (EINVAL); - IFF_LOCKGIANT(ifp); - /* * Check if we are actually a member of this group. */ @@ -1486,7 +1476,6 @@ out_imf_rollback: out_inp_locked: INP_WUNLOCK(inp); - IFF_UNLOCKGIANT(ifp); return (error); } @@ -1978,8 +1967,6 @@ inp_join_group(struct inpcb *inp, struct sockopt *sopt) if (ifp == NULL || (ifp->if_flags & IFF_MULTICAST) == 0) return (EADDRNOTAVAIL); - IFF_LOCKGIANT(ifp); - /* * MCAST_JOIN_SOURCE on an exclusive membership is an error. * On an existing inclusive membership, it just adds the @@ -2102,7 +2089,6 @@ out_imo_free: out_inp_locked: INP_WUNLOCK(inp); - IFF_UNLOCKGIANT(ifp); return (error); } @@ -2215,9 +2201,6 @@ inp_leave_group(struct inpcb *inp, struct sockopt *sopt) if (!IN_MULTICAST(ntohl(gsa->sin.sin_addr.s_addr))) return (EINVAL); - if (ifp) - IFF_LOCKGIANT(ifp); - /* * Find the membership in the membership array. */ @@ -2312,8 +2295,6 @@ out_imf_rollback: out_inp_locked: INP_WUNLOCK(inp); - if (ifp) - IFF_UNLOCKGIANT(ifp); return (error); } @@ -2432,8 +2413,6 @@ inp_set_source_filters(struct inpcb *inp, struct sockopt *sopt) if (ifp == NULL) return (EADDRNOTAVAIL); - IFF_LOCKGIANT(ifp); - /* * Take the INP write lock. * Check if this socket is a member of this group. @@ -2551,7 +2530,6 @@ out_imf_rollback: out_inp_locked: INP_WUNLOCK(inp); - IFF_UNLOCKGIANT(ifp); return (error); } |