ifnet: Replace if_addr_lock rwlock with epoch + mutex
Run on LLNW canaries and tested by pho@ gallatin: Using a 14-core, 28-HTT single socket E5-2697 v3 with a 40GbE MLX5 based ConnectX 4-LX NIC, I see an almost 12% improvement in received packet rate, and a larger improvement in bytes delivered all the way to userspace. When the host receiving 64 streams of netperf -H $DUT -t UDP_STREAM -- -m 1, I see, using nstat -I mce0 1 before the patch: InMpps OMpps InGbs OGbs err TCP Est %CPU syscalls csw irq GBfree 4.98 0.00 4.42 0.00 4235592 33 83.80 4720653 2149771 1235 247.32 4.73 0.00 4.20 0.00 4025260 33 82.99 4724900 2139833 1204 247.32 4.72 0.00 4.20 0.00 4035252 33 82.14 4719162 2132023 1264 247.32 4.71 0.00 4.21 0.00 4073206 33 83.68 4744973 2123317 1347 247.32 4.72 0.00 4.21 0.00 4061118 33 80.82 4713615 2188091 1490 247.32 4.72 0.00 4.21 0.00 4051675 33 85.29 4727399 2109011 1205 247.32 4.73 0.00 4.21 0.00 4039056 33 84.65 4724735 2102603 1053 247.32 After the patch InMpps OMpps InGbs OGbs err TCP Est %CPU syscalls csw irq GBfree 5.43 0.00 4.20 0.00 3313143 33 84.96 5434214 1900162 2656 245.51 5.43 0.00 4.20 0.00 3308527 33 85.24 5439695 1809382 2521 245.51 5.42 0.00 4.19 0.00 3316778 33 87.54 5416028 1805835 2256 245.51 5.42 0.00 4.19 0.00 3317673 33 90.44 5426044 1763056 2332 245.51 5.42 0.00 4.19 0.00 3314839 33 88.11 5435732 1792218 2499 245.52 5.44 0.00 4.19 0.00 3293228 33 91.84 5426301 1668597 2121 245.52 Similarly, netperf reports 230Mb/s before the patch, and 270Mb/s after the patch Reviewed by: gallatin Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D15366
This commit is contained in:
parent
000432bf10
commit
7aeac9ef18
@ -240,7 +240,7 @@ emac_set_rx_mode(struct emac_softc *sc)
|
||||
hashes[1] = 0xffffffff;
|
||||
} else {
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &sc->emac_ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &sc->emac_ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
h = ether_crc32_be(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -535,7 +535,7 @@ ate_setmcast(struct ate_softc *sc)
|
||||
mcaf[0] = 0;
|
||||
mcaf[1] = 0;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
index = ate_mac_hash(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -1137,7 +1137,7 @@ set_filter(struct macb_softc *sc)
|
||||
multicast_filter[0] = 0;
|
||||
multicast_filter[1] = 0;
|
||||
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
count++;
|
||||
|
@ -1839,7 +1839,7 @@ set_filter(struct ece_softc *sc)
|
||||
return;
|
||||
}
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
add_mac_entry(sc,
|
||||
|
@ -227,7 +227,7 @@ fv_setfilt(struct fv_softc *sc)
|
||||
|
||||
i = 0;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
ma = LLADDR((struct sockaddr_dl *)ifma->ifma_addr);
|
||||
|
@ -2465,7 +2465,7 @@ cpswp_ale_update_addresses(struct cpswp_softc *sc, int purge)
|
||||
|
||||
/* Set other multicast addrs desired. */
|
||||
if_maddr_rlock(sc->ifp);
|
||||
TAILQ_FOREACH(ifma, &sc->ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &sc->ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
cpsw_ale_mc_entry_set(sc->swsc, portmask, sc->vlan,
|
||||
|
@ -435,7 +435,7 @@ npe_setmcast(struct npe_softc *sc)
|
||||
memset(set, 0xff, ETHER_ADDR_LEN);
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
mac = LLADDR((struct sockaddr_dl *) ifma->ifma_addr);
|
||||
|
@ -2241,7 +2241,7 @@ linux_ifconf(struct thread *td, struct ifconf *uifc)
|
||||
ifc.ifc_len = 0;
|
||||
IFNET_RLOCK();
|
||||
TAILQ_FOREACH(ifp, &V_ifnet, if_link) {
|
||||
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
|
||||
CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
|
||||
struct sockaddr *sa = ifa->ifa_addr;
|
||||
if (sa->sa_family == AF_INET)
|
||||
ifc.ifc_len += sizeof(ifr);
|
||||
@ -2282,7 +2282,7 @@ linux_ifconf(struct thread *td, struct ifconf *uifc)
|
||||
strlcpy(ifr.ifr_name, ifp->if_xname, LINUX_IFNAMSIZ);
|
||||
|
||||
/* Walk the address list */
|
||||
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
|
||||
CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
|
||||
struct sockaddr *sa = ifa->ifa_addr;
|
||||
|
||||
if (sa->sa_family == AF_INET) {
|
||||
@ -2361,7 +2361,7 @@ linux_gifhwaddr(struct ifnet *ifp, struct l_ifreq *ifr)
|
||||
if (ifp->if_type != IFT_ETHER)
|
||||
return (ENOENT);
|
||||
|
||||
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
|
||||
CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
|
||||
sdl = (struct sockaddr_dl*)ifa->ifa_addr;
|
||||
if (sdl != NULL && (sdl->sdl_family == AF_LINK) &&
|
||||
(sdl->sdl_type == IFT_ETHER)) {
|
||||
|
@ -227,7 +227,7 @@ struct route;
|
||||
struct mbuf;
|
||||
struct ifnet {
|
||||
char if_xname[IFNAMSIZ];
|
||||
TAILQ_HEAD(, ifaddr) if_addrlist;
|
||||
STAILQ_HEAD(, ifaddr) if_addrlist;
|
||||
int (*if_output)(struct ifnet *, struct mbuf *,
|
||||
const struct sockaddr *, struct route *);
|
||||
};
|
||||
|
@ -1021,7 +1021,7 @@ ipf_ifpaddr(softc, v, atype, ifptr, inp, inpmask)
|
||||
else if (v == 6)
|
||||
bzero((char *)inp, sizeof(*inp));
|
||||
#endif
|
||||
ifa = TAILQ_FIRST(&ifp->if_addrhead);
|
||||
ifa = CK_STAILQ_FIRST(&ifp->if_addrhead);
|
||||
|
||||
sock = ifa->ifa_addr;
|
||||
while (sock != NULL && ifa != NULL) {
|
||||
@ -1036,7 +1036,7 @@ ipf_ifpaddr(softc, v, atype, ifptr, inp, inpmask)
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
ifa = TAILQ_NEXT(ifa, ifa_link);
|
||||
ifa = CK_STAILQ_NEXT(ifa, ifa_link);
|
||||
if (ifa != NULL)
|
||||
sock = ifa->ifa_addr;
|
||||
}
|
||||
|
@ -2071,7 +2071,7 @@ ae_rxfilter(ae_softc_t *sc)
|
||||
*/
|
||||
bzero(mchash, sizeof(mchash));
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
crc = ether_crc32_be(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -3170,7 +3170,7 @@ age_rxfilter(struct age_softc *sc)
|
||||
bzero(mchash, sizeof(mchash));
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &sc->age_ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &sc->age_ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
crc = ether_crc32_be(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -2891,7 +2891,7 @@ al_eth_set_rx_mode(struct al_eth_adapter *adapter)
|
||||
unsigned char *mac;
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
if (mc == MAX_NUM_MULTICAST_ADDRESSES)
|
||||
@ -2905,7 +2905,7 @@ al_eth_set_rx_mode(struct al_eth_adapter *adapter)
|
||||
if_maddr_runlock(ifp);
|
||||
|
||||
if_addr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifua, &ifp->if_addrhead, ifa_link) {
|
||||
CK_STAILQ_FOREACH(ifua, &ifp->if_addrhead, ifa_link) {
|
||||
if (ifua->ifa_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
if (uc == MAX_NUM_ADDRESSES)
|
||||
@ -2951,7 +2951,7 @@ al_eth_set_rx_mode(struct al_eth_adapter *adapter)
|
||||
/* set new addresses */
|
||||
i = AL_ETH_MAC_TABLE_UNICAST_IDX_BASE + 1;
|
||||
if_addr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifua, &ifp->if_addrhead, ifa_link) {
|
||||
CK_STAILQ_FOREACH(ifua, &ifp->if_addrhead, ifa_link) {
|
||||
if (ifua->ifa_addr->sa_family != AF_LINK) {
|
||||
continue;
|
||||
}
|
||||
|
@ -4608,7 +4608,7 @@ alc_rxfilter(struct alc_softc *sc)
|
||||
}
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &sc->alc_ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &sc->alc_ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
crc = ether_crc32_be(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -3038,7 +3038,7 @@ ale_rxfilter(struct ale_softc *sc)
|
||||
bzero(mchash, sizeof(mchash));
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &sc->ale_ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &sc->ale_ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
crc = ether_crc32_be(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -485,7 +485,7 @@ atse_rxfilter_locked(struct atse_softc *sc)
|
||||
* do all the programming afterwards.
|
||||
*/
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK) {
|
||||
continue;
|
||||
}
|
||||
|
@ -3615,7 +3615,7 @@ ath_update_mcast_hw(struct ath_softc *sc)
|
||||
TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) {
|
||||
ifp = vap->iv_ifp;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
caddr_t dl;
|
||||
uint32_t val;
|
||||
uint8_t pos;
|
||||
|
@ -8117,7 +8117,7 @@ bce_set_rx_mode(struct bce_softc *sc)
|
||||
DBPRINT(sc, BCE_INFO_MISC, "Enabling selective multicast mode.\n");
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
h = ether_crc32_le(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -1109,7 +1109,7 @@ bfe_set_rx_mode(struct bfe_softc *sc)
|
||||
else {
|
||||
val &= ~BFE_RXCONF_ALLMULTI;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
bfe_cam_write(sc,
|
||||
|
@ -939,7 +939,7 @@ bm_setladrf(struct bm_softc *sc)
|
||||
memset(hash, 0, sizeof(hash));
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(inm, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(inm, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (inm->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
crc = ether_crc32_le(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -12004,7 +12004,7 @@ bxe_init_mcast_macs_list(struct bxe_softc *sc,
|
||||
struct ifmultiaddr *ifma;
|
||||
struct ecore_mcast_list_elem *mc_mac;
|
||||
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK) {
|
||||
continue;
|
||||
}
|
||||
@ -12027,7 +12027,7 @@ bxe_init_mcast_macs_list(struct bxe_softc *sc,
|
||||
}
|
||||
bzero(mc_mac, (sizeof(*mc_mac) * mc_count));
|
||||
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK) {
|
||||
continue;
|
||||
}
|
||||
@ -12130,7 +12130,7 @@ bxe_set_uc_list(struct bxe_softc *sc)
|
||||
ifa = if_getifaddr(ifp); /* XXX Is this structure */
|
||||
while (ifa) {
|
||||
if (ifa->ifa_addr->sa_family != AF_LINK) {
|
||||
ifa = TAILQ_NEXT(ifa, ifa_link);
|
||||
ifa = CK_STAILQ_NEXT(ifa, ifa_link);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -12150,7 +12150,7 @@ bxe_set_uc_list(struct bxe_softc *sc)
|
||||
return (rc);
|
||||
}
|
||||
|
||||
ifa = TAILQ_NEXT(ifa, ifa_link);
|
||||
ifa = CK_STAILQ_NEXT(ifa, ifa_link);
|
||||
}
|
||||
|
||||
#if __FreeBSD_version < 800000
|
||||
|
@ -2546,7 +2546,7 @@ cas_setladrf(struct cas_softc *sc)
|
||||
memset(hash, 0, sizeof(hash));
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(inm, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(inm, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (inm->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
crc = ether_crc32_le(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -1007,7 +1007,7 @@ cs_setmode(struct cs_softc *sc)
|
||||
* frames we're interested in.
|
||||
*/
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
struct sockaddr_dl *dl =
|
||||
(struct sockaddr_dl *)ifma->ifma_addr;
|
||||
|
||||
|
@ -471,7 +471,7 @@ t3_get_next_mcaddr(struct t3_rx_mode *rm)
|
||||
int i = 0;
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
if (i == rm->idx) {
|
||||
|
@ -4266,7 +4266,7 @@ update_mac_settings(struct ifnet *ifp, int flags)
|
||||
int i = 0, j;
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
mcaddr[i] =
|
||||
|
@ -965,7 +965,7 @@ update_clip_table(struct adapter *sc, struct tom_data *td)
|
||||
|
||||
/* XXX: races with if_vmove */
|
||||
CURVNET_SET(vi->ifp->if_vnet);
|
||||
TAILQ_FOREACH(ia, &V_in6_ifaddrhead, ia_link) {
|
||||
CK_STAILQ_FOREACH(ia, &V_in6_ifaddrhead, ia_link) {
|
||||
lip = &ia->ia_addr.sin6_addr;
|
||||
|
||||
KASSERT(!IN6_IS_ADDR_MULTICAST(lip),
|
||||
|
@ -997,7 +997,7 @@ dc_setfilt_21143(struct dc_softc *sc)
|
||||
DC_CLRBIT(sc, DC_NETCFG, DC_NETCFG_RX_ALLMULTI);
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
h = dc_mchash_le(sc,
|
||||
@ -1075,7 +1075,7 @@ dc_setfilt_admtek(struct dc_softc *sc)
|
||||
|
||||
/* Now program new ones. */
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
if (DC_IS_CENTAUR(sc))
|
||||
@ -1148,7 +1148,7 @@ dc_setfilt_asix(struct dc_softc *sc)
|
||||
|
||||
/* now program new ones */
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
h = dc_mchash_be(LLADDR((struct sockaddr_dl *)ifma->ifma_addr));
|
||||
@ -1209,7 +1209,7 @@ dc_setfilt_uli(struct dc_softc *sc)
|
||||
/* Now build perfect filters. */
|
||||
mcnt = 0;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
if (mcnt >= DC_ULI_FILTER_NPERF) {
|
||||
@ -1294,7 +1294,7 @@ dc_setfilt_xircom(struct dc_softc *sc)
|
||||
DC_CLRBIT(sc, DC_NETCFG, DC_NETCFG_RX_ALLMULTI);
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
h = dc_mchash_le(sc,
|
||||
|
@ -3053,7 +3053,7 @@ tulip_addr_filter(tulip_softc_t * const sc)
|
||||
else
|
||||
bcopy(sc->tulip_enaddr, eaddr, ETHER_ADDR_LEN);
|
||||
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
|
||||
if (ifma->ifma_addr->sa_family == AF_LINK)
|
||||
multicnt++;
|
||||
@ -3080,7 +3080,7 @@ tulip_addr_filter(tulip_softc_t * const sc)
|
||||
*/
|
||||
bzero(sc->tulip_setupdata, sizeof(sc->tulip_setupdata));
|
||||
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
@ -3112,7 +3112,7 @@ tulip_addr_filter(tulip_softc_t * const sc)
|
||||
/*
|
||||
* Else can get perfect filtering for 16 addresses.
|
||||
*/
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
addrp = LLADDR((struct sockaddr_dl *)ifma->ifma_addr);
|
||||
|
@ -607,7 +607,7 @@ dwc_setup_rxfilter(struct dwc_softc *sc)
|
||||
for (i = 0; i < nhash; i++)
|
||||
hash[i] = 0;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &sc->ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &sc->ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
crc = ether_crc32_le(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -1701,7 +1701,7 @@ ed_ds_getmcaf(struct ed_softc *sc, uint32_t *mcaf)
|
||||
mcaf[1] = 0;
|
||||
|
||||
if_maddr_rlock(sc->ifp);
|
||||
TAILQ_FOREACH(ifma, &sc->ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &sc->ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
index = ether_crc32_be(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -1581,7 +1581,7 @@ et_setmulti(struct et_softc *sc)
|
||||
|
||||
count = 0;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
uint32_t *hp, h;
|
||||
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
|
@ -866,7 +866,7 @@ ex_setmulti(struct ex_softc *sc)
|
||||
|
||||
count = 0;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(maddr, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(maddr, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (maddr->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
count++;
|
||||
@ -900,7 +900,7 @@ ex_setmulti(struct ex_softc *sc)
|
||||
CSR_WRITE_2(sc, IO_PORT_REG, (count + 1) * 6);
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(maddr, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(maddr, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (maddr->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
|
||||
|
@ -2076,7 +2076,7 @@ fe_mcaf ( struct fe_softc *sc )
|
||||
|
||||
filter = fe_filter_nothing;
|
||||
if_maddr_rlock(sc->ifp);
|
||||
TAILQ_FOREACH(ifma, &sc->ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &sc->ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
index = ether_crc32_le(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -994,7 +994,7 @@ ffec_setup_rxfilter(struct ffec_softc *sc)
|
||||
else {
|
||||
ghash = 0;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &sc->ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &sc->ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
/* 6 bits from MSB in LE CRC32 are used for hash. */
|
||||
|
@ -2249,7 +2249,7 @@ gem_setladrf(struct gem_softc *sc)
|
||||
memset(hash, 0, sizeof(hash));
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(inm, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(inm, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (inm->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
crc = ether_crc32_le(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -1723,7 +1723,7 @@ hme_setladrf(struct hme_softc *sc, int reenable)
|
||||
*/
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(inm, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(inm, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (inm->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
crc = ether_crc32_le(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -931,7 +931,7 @@ hn_rxfilter_config(struct hn_softc *sc)
|
||||
filter |= NDIS_PACKET_TYPE_BROADCAST;
|
||||
/* TODO: support multicast list */
|
||||
if ((ifp->if_flags & IFF_ALLMULTI) ||
|
||||
!TAILQ_EMPTY(&ifp->if_multiaddrs))
|
||||
!CK_STAILQ_EMPTY(&ifp->if_multiaddrs))
|
||||
filter |= NDIS_PACKET_TYPE_ALL_MULTICAST;
|
||||
}
|
||||
return (hn_set_rxfilter(sc, filter));
|
||||
@ -1323,7 +1323,7 @@ hn_xpnt_vf_saveifflags(struct hn_softc *sc)
|
||||
HN_LOCK_ASSERT(sc);
|
||||
|
||||
/* XXX vlan(4) style mcast addr maintenance */
|
||||
if (!TAILQ_EMPTY(&ifp->if_multiaddrs))
|
||||
if (!CK_STAILQ_EMPTY(&ifp->if_multiaddrs))
|
||||
allmulti = IFF_ALLMULTI;
|
||||
|
||||
/* Always set the VF's if_flags */
|
||||
|
@ -313,7 +313,7 @@ ndis_setmulti(sc)
|
||||
return;
|
||||
}
|
||||
|
||||
if (TAILQ_EMPTY(&ifp->if_multiaddrs))
|
||||
if (CK_STAILQ_EMPTY(&ifp->if_multiaddrs))
|
||||
return;
|
||||
|
||||
len = sizeof(mclistsz);
|
||||
@ -330,7 +330,7 @@ ndis_setmulti(sc)
|
||||
|
||||
len = 0;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
bcopy(LLADDR((struct sockaddr_dl *)ifma->ifma_addr),
|
||||
|
@ -846,7 +846,7 @@ ixv_if_multi_set(if_ctx_t ctx)
|
||||
|
||||
IOCTL_DEBUGOUT("ixv_if_multi_set: begin");
|
||||
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
bcopy(LLADDR((struct sockaddr_dl *)ifma->ifma_addr),
|
||||
|
@ -2433,7 +2433,7 @@ ixlv_add_multi(struct ixl_vsi *vsi)
|
||||
** Get a count, to decide if we
|
||||
** simply use multicast promiscuous.
|
||||
*/
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
mcnt++;
|
||||
@ -2454,7 +2454,7 @@ ixlv_add_multi(struct ixl_vsi *vsi)
|
||||
|
||||
mcnt = 0;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
if (!ixlv_add_mac_filter(sc,
|
||||
@ -2494,7 +2494,7 @@ ixlv_del_multi(struct ixl_vsi *vsi)
|
||||
&& (f->flags & IXL_FILTER_MC)) {
|
||||
/* check if mac address in filter is in sc's list */
|
||||
match = FALSE;
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
u8 *mc_addr =
|
||||
|
@ -876,7 +876,7 @@ ixl_set_promisc(struct ixl_vsi *vsi)
|
||||
else { /* Need to count the multicast addresses */
|
||||
struct ifmultiaddr *ifma;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
if (mcnt == MAX_MULTICAST_ADDR) {
|
||||
@ -916,7 +916,7 @@ ixl_add_multi(struct ixl_vsi *vsi)
|
||||
** First just get a count, to decide if we
|
||||
** we simply use multicast promiscuous.
|
||||
*/
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
mcnt++;
|
||||
@ -933,7 +933,7 @@ ixl_add_multi(struct ixl_vsi *vsi)
|
||||
|
||||
mcnt = 0;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
ixl_add_mc_filter(vsi,
|
||||
@ -966,7 +966,7 @@ ixl_del_multi(struct ixl_vsi *vsi)
|
||||
SLIST_FOREACH(f, &vsi->ftl, next) {
|
||||
if ((f->flags & IXL_FILTER_USED) && (f->flags & IXL_FILTER_MC)) {
|
||||
match = FALSE;
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
u8 *mc_addr = (u8 *)LLADDR((struct sockaddr_dl *)ifma->ifma_addr);
|
||||
|
@ -3278,7 +3278,7 @@ jme_set_filter(struct jme_softc *sc)
|
||||
bzero(mchash, sizeof(mchash));
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &sc->jme_ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &sc->jme_ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
crc = ether_crc32_be(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -602,7 +602,7 @@ lance_setladrf(struct lance_softc *sc, uint16_t *af)
|
||||
|
||||
af[0] = af[1] = af[2] = af[3] = 0x0000;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
|
||||
|
@ -393,7 +393,7 @@ lge_setmulti(sc)
|
||||
|
||||
/* now program new ones */
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
h = ether_crc32_be(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -519,7 +519,7 @@ lio_set_mcast_list(struct ifnet *ifp)
|
||||
/* to protect access to if_multiaddrs */
|
||||
if_maddr_rlock(ifp);
|
||||
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
*mc = 0;
|
||||
|
@ -1539,7 +1539,7 @@ malo_setmcastfilter(struct malo_softc *sc)
|
||||
|
||||
ifp = vap->iv_ifp;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
|
||||
|
@ -2052,7 +2052,7 @@ mge_setup_multicast(struct mge_softc *sc)
|
||||
memset(omt, 0, sizeof(omt));
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
|
||||
|
@ -623,7 +623,7 @@ static void mlx4_en_cache_uclist(struct net_device *dev)
|
||||
mlx4_en_clear_uclist(dev);
|
||||
|
||||
if_addr_rlock(dev);
|
||||
TAILQ_FOREACH(ifa, &dev->if_addrhead, ifa_link) {
|
||||
CK_STAILQ_FOREACH(ifa, &dev->if_addrhead, ifa_link) {
|
||||
if (ifa->ifa_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
if (((struct sockaddr_dl *)ifa->ifa_addr)->sdl_alen !=
|
||||
@ -661,7 +661,7 @@ static void mlx4_en_cache_mclist(struct net_device *dev)
|
||||
mlx4_en_clear_mclist(dev);
|
||||
|
||||
if_maddr_rlock(dev);
|
||||
TAILQ_FOREACH(ifma, &dev->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &dev->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
if (((struct sockaddr_dl *)ifma->ifma_addr)->sdl_alen !=
|
||||
|
@ -29,7 +29,6 @@
|
||||
|
||||
#include <linux/list.h>
|
||||
#include <dev/mlx5/fs.h>
|
||||
|
||||
#define MLX5_SET_CFG(p, f, v) MLX5_SET(create_flow_group_in, p, f, v)
|
||||
|
||||
enum {
|
||||
@ -767,7 +766,7 @@ mlx5e_sync_ifp_addr(struct mlx5e_priv *priv)
|
||||
LLADDR((struct sockaddr_dl *)(ifp->if_addr->ifa_addr)));
|
||||
|
||||
if_addr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
|
||||
CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
|
||||
if (ifa->ifa_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
mlx5e_add_eth_addr_to_hash(priv->eth_addr.if_uc,
|
||||
@ -776,7 +775,7 @@ mlx5e_sync_ifp_addr(struct mlx5e_priv *priv)
|
||||
if_addr_runlock(ifp);
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
mlx5e_add_eth_addr_to_hash(priv->eth_addr.if_mc,
|
||||
|
@ -600,7 +600,7 @@ msk_rxfilter(struct msk_if_softc *sc_if)
|
||||
} else {
|
||||
mode |= GM_RXCR_UCF_ENA;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
crc = ether_crc32_be(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -1146,7 +1146,7 @@ mxge_set_multicast_list(mxge_softc_t *sc)
|
||||
/* Walk the multicast list, and add each address */
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
bcopy(LLADDR((struct sockaddr_dl *)ifma->ifma_addr),
|
||||
|
@ -336,7 +336,7 @@ my_setmulti(struct my_softc * sc)
|
||||
|
||||
/* now program new ones */
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
h = ~ether_crc32_be(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -727,7 +727,7 @@ nge_rxfilter(struct nge_softc *sc)
|
||||
* which bit within that byte needs to be set.
|
||||
*/
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
h = ether_crc32_be(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -569,7 +569,7 @@ oce_hw_update_multicast(POCE_SOFTC sc)
|
||||
#if __FreeBSD_version > 800000
|
||||
if_maddr_rlock(ifp);
|
||||
#endif
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
|
||||
|
@ -2330,7 +2330,7 @@ otus_set_multi(struct otus_softc *sc)
|
||||
TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) {
|
||||
ifp = vap->iv_ifp;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
caddr_t dl;
|
||||
uint32_t val;
|
||||
|
||||
|
@ -371,7 +371,7 @@ pcn_setmulti(sc)
|
||||
|
||||
/* now program new ones */
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
h = ether_crc32_le(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -2278,7 +2278,7 @@ qlnx_set_multi(qlnx_host_t *ha, uint32_t add_multi)
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
|
@ -773,7 +773,7 @@ qla_set_multi(qla_host_t *ha, uint32_t add_multi)
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
|
@ -988,7 +988,7 @@ qla_set_multi(qla_host_t *ha, uint32_t add_multi)
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
|
@ -845,7 +845,7 @@ qls_set_multi(qla_host_t *ha, uint32_t add_multi)
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
|
@ -685,7 +685,7 @@ re_set_rxmode(struct rl_softc *sc)
|
||||
}
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
h = ether_crc32_be(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -538,7 +538,7 @@ rl_rxfilter(struct rl_softc *sc)
|
||||
} else {
|
||||
/* Now program new ones. */
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
h = ether_crc32_be(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -387,7 +387,7 @@ rtwn_set_multi(struct rtwn_softc *sc)
|
||||
TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) {
|
||||
ifp = vap->iv_ifp;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
caddr_t dl;
|
||||
uint8_t pos;
|
||||
|
||||
|
@ -484,8 +484,9 @@ sf_rxfilter(struct sf_softc *sc)
|
||||
|
||||
/* Now program new ones. */
|
||||
i = 1;
|
||||
/* XXX how do we maintain reverse semantics without impl */
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH_REVERSE(ifma, &ifp->if_multiaddrs, ifmultihead,
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs,
|
||||
ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
|
@ -369,7 +369,7 @@ sfxge_mac_multicast_list_set(struct sfxge_softc *sc)
|
||||
|
||||
port->mcast_count = 0;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family == AF_LINK) {
|
||||
if (port->mcast_count == EFX_MAC_MULTICAST_LIST_MAX) {
|
||||
device_printf(sc->dev,
|
||||
|
@ -469,7 +469,7 @@ sge_rxfilter(struct sge_softc *sc)
|
||||
hashes[0] = hashes[1] = 0;
|
||||
/* Now program new ones. */
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
crc = ether_crc32_be(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -744,7 +744,7 @@ sis_rxfilter_ns(struct sis_softc *sc)
|
||||
}
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
h = sis_mchash(sc,
|
||||
@ -802,7 +802,7 @@ sis_rxfilter_sis(struct sis_softc *sc)
|
||||
hashes[i] = 0;
|
||||
i = 0;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
h = sis_mchash(sc,
|
||||
|
@ -749,7 +749,8 @@ sk_rxfilter_genesis(sc_if)
|
||||
} else {
|
||||
i = 1;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH_REVERSE(ifma, &ifp->if_multiaddrs, ifmultihead,
|
||||
/* XXX want to maintain reverse semantics */
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs,
|
||||
ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
@ -801,7 +802,7 @@ sk_rxfilter_yukon(sc_if)
|
||||
} else {
|
||||
mode |= YU_RCR_UFLEN;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
crc = ether_crc32_be(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -1418,7 +1418,7 @@ sn_getmcf(struct ifnet *ifp, uint8_t *mcf)
|
||||
bzero(mcf, MCFSZ);
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK) {
|
||||
if_maddr_runlock(ifp);
|
||||
return 0;
|
||||
|
@ -434,7 +434,7 @@ ste_rxfilter(struct ste_softc *sc)
|
||||
rxcfg |= STE_RXMODE_MULTIHASH;
|
||||
/* Now program new ones. */
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
h = ether_crc32_be(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -2547,7 +2547,7 @@ stge_set_multi(struct stge_softc *sc)
|
||||
|
||||
count = 0;
|
||||
if_maddr_rlock(sc->sc_ifp);
|
||||
TAILQ_FOREACH(ifma, &sc->sc_ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &sc->sc_ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
crc = ether_crc32_be(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -1978,7 +1978,7 @@ ti_setmulti(struct ti_softc *sc)
|
||||
|
||||
/* Now program new ones. */
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
mc = malloc(sizeof(struct ti_mc_entry), M_DEVBUF, M_NOWAIT);
|
||||
|
@ -880,7 +880,8 @@ tl_setmulti(sc)
|
||||
} else {
|
||||
i = 1;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH_REVERSE(ifma, &ifp->if_multiaddrs, ifmultihead, ifma_link) {
|
||||
/* XXX want to maintain reverse semantics - pop list and re-add? */
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
/*
|
||||
|
@ -1905,7 +1905,7 @@ tsec_setup_multicast(struct tsec_softc *sc)
|
||||
}
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
|
@ -1399,7 +1399,7 @@ epic_set_mc_table(epic_softc_t *sc)
|
||||
filter[3] = 0;
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
h = ether_crc32_be(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -2742,7 +2742,7 @@ txp_set_filter(struct txp_softc *sc)
|
||||
mchash[0] = mchash[1] = 0;
|
||||
mcnt = 0;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
crc = ether_crc32_be(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -555,7 +555,7 @@ aue_setmulti(struct usb_ether *ue)
|
||||
|
||||
/* now program new ones */
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
h = ether_crc32_le(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -502,7 +502,7 @@ axe_setmulti(struct usb_ether *ue)
|
||||
rxmode &= ~AXE_RXCMD_ALLMULTI;
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link)
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link)
|
||||
{
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
|
@ -786,7 +786,7 @@ axge_rxfilter(struct usb_ether *ue)
|
||||
|
||||
rxmode |= RCR_ACPT_MCAST;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
h = ether_crc32_be(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -328,7 +328,7 @@ cue_setmulti(struct usb_ether *ue)
|
||||
|
||||
/* now program new ones */
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link)
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link)
|
||||
{
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
|
@ -377,7 +377,7 @@ kue_setmulti(struct usb_ether *ue)
|
||||
sc->sc_rxfilt &= ~KUE_RXFILT_ALLMULTI;
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link)
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link)
|
||||
{
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
|
@ -606,7 +606,7 @@ mos_setmulti(struct usb_ether *ue)
|
||||
|
||||
/* get all new ones */
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK) {
|
||||
allmulti = 1;
|
||||
continue;
|
||||
|
@ -500,7 +500,7 @@ rue_setmulti(struct usb_ether *ue)
|
||||
|
||||
/* now program new ones */
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH (ifma, &ifp->if_multiaddrs, ifma_link)
|
||||
CK_STAILQ_FOREACH (ifma, &ifp->if_multiaddrs, ifma_link)
|
||||
{
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
|
@ -714,14 +714,14 @@ smsc_setmulti(struct usb_ether *ue)
|
||||
/* Take the lock of the mac address list before hashing each of them */
|
||||
if_maddr_rlock(ifp);
|
||||
|
||||
if (!TAILQ_EMPTY(&ifp->if_multiaddrs)) {
|
||||
if (!CK_STAILQ_EMPTY(&ifp->if_multiaddrs)) {
|
||||
/* We are filtering on a set of address so calculate hashes of each
|
||||
* of the address and set the corresponding bits in the register.
|
||||
*/
|
||||
sc->sc_mac_csr |= SMSC_MAC_CSR_HPFILT;
|
||||
sc->sc_mac_csr &= ~(SMSC_MAC_CSR_PRMS | SMSC_MAC_CSR_MCPAS);
|
||||
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
|
||||
|
@ -522,7 +522,7 @@ udav_setmulti(struct usb_ether *ue)
|
||||
|
||||
/* now program new ones */
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link)
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link)
|
||||
{
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
|
@ -795,7 +795,7 @@ ure_rxfilter(struct usb_ether *ue)
|
||||
|
||||
rxmode |= URE_RCR_AM;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
h = ether_crc32_be(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -885,7 +885,7 @@ rsu_set_multi(struct rsu_softc *sc)
|
||||
TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) {
|
||||
ifp = vap->iv_ifp;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
caddr_t dl;
|
||||
uint8_t pos;
|
||||
|
||||
|
@ -2000,7 +2000,7 @@ zyd_set_multi(struct zyd_softc *sc)
|
||||
TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) {
|
||||
ifp = vap->iv_ifp;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
v = ((uint8_t *)LLADDR((struct sockaddr_dl *)
|
||||
|
@ -574,7 +574,7 @@ vge_rxfilter(struct vge_softc *sc)
|
||||
vge_cam_clear(sc);
|
||||
/* Now program new ones */
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
error = vge_cam_set(sc,
|
||||
@ -587,7 +587,7 @@ vge_rxfilter(struct vge_softc *sc)
|
||||
if (error) {
|
||||
vge_cam_clear(sc);
|
||||
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
h = ether_crc32_be(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -81,7 +81,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/virtio/virtqueue.h>
|
||||
#include <dev/virtio/network/virtio_net.h>
|
||||
#include <dev/virtio/network/if_vtnetvar.h>
|
||||
|
||||
#include "virtio_if.h"
|
||||
|
||||
#include "opt_inet.h"
|
||||
@ -3321,7 +3320,7 @@ vtnet_rx_filter_mac(struct vtnet_softc *sc)
|
||||
|
||||
/* Unicast MAC addresses: */
|
||||
if_addr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
|
||||
CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
|
||||
if (ifa->ifa_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
else if (memcmp(LLADDR((struct sockaddr_dl *)ifa->ifa_addr),
|
||||
@ -3348,7 +3347,7 @@ vtnet_rx_filter_mac(struct vtnet_softc *sc)
|
||||
|
||||
/* Multicast MAC addresses: */
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
else if (mcnt == VTNET_MAX_MAC_ENTRIES) {
|
||||
|
@ -3173,7 +3173,7 @@ vmxnet3_set_rxfilter(struct vmxnet3_softc *sc)
|
||||
int cnt = 0, overflow = 0;
|
||||
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
else if (cnt == VMXNET3_MULTICAST_MAX) {
|
||||
|
@ -474,7 +474,7 @@ vr_set_filter(struct vr_softc *sc)
|
||||
* 32 entries multicast perfect filter.
|
||||
*/
|
||||
cam_mask = 0;
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
error = vr_cam_data(sc, VR_MCAST_CAM, mcnt,
|
||||
@ -496,7 +496,7 @@ vr_set_filter(struct vr_softc *sc)
|
||||
* table based filtering.
|
||||
*/
|
||||
mcnt = 0;
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
h = ether_crc32_be(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -1996,7 +1996,7 @@ vte_rxfilter(struct vte_softc *sc)
|
||||
|
||||
nperf = 0;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &sc->vte_ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &sc->vte_ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
/*
|
||||
|
@ -440,7 +440,7 @@ wb_setmulti(sc)
|
||||
|
||||
/* now program new ones */
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
h = ~ether_crc32_be(LLADDR((struct sockaddr_dl *)
|
||||
|
@ -1528,7 +1528,7 @@ wi_write_multi(struct wi_softc *sc)
|
||||
|
||||
ifp = vap->iv_ifp;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
if (n >= 16)
|
||||
|
@ -1394,7 +1394,7 @@ xe_set_multicast(struct xe_softc *scp)
|
||||
/* Iterate over multicast address list */
|
||||
count = 0;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(maddr, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(maddr, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (maddr->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
|
||||
|
@ -944,7 +944,7 @@ netfront_send_fake_arp(device_t dev, struct netfront_info *info)
|
||||
struct ifaddr *ifa;
|
||||
|
||||
ifp = info->xn_ifp;
|
||||
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
|
||||
CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
|
||||
if (ifa->ifa_addr->sa_family == AF_INET) {
|
||||
arp_ifinit(ifp, ifa);
|
||||
}
|
||||
|
@ -636,7 +636,7 @@ xl_rxfilter_90x(struct xl_softc *sc)
|
||||
rxfilt |= XL_RXFILTER_ALLMULTI;
|
||||
} else {
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
rxfilt |= XL_RXFILTER_ALLMULTI;
|
||||
@ -691,7 +691,7 @@ xl_rxfilter_90xB(struct xl_softc *sc)
|
||||
/* Now program new ones. */
|
||||
mcnt = 0;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
continue;
|
||||
/*
|
||||
|
@ -537,7 +537,7 @@ static struct witness_order_list_entry order_lists[] = {
|
||||
{ "in_multi_list_mtx", &lock_class_mtx_sleep },
|
||||
{ "igmp_mtx", &lock_class_mtx_sleep },
|
||||
{ "ifnet_rw", &lock_class_rw },
|
||||
{ "if_addr_lock", &lock_class_rw },
|
||||
{ "if_addr_lock", &lock_class_mtx_sleep },
|
||||
{ NULL, NULL },
|
||||
/*
|
||||
* IPv6 multicast:
|
||||
@ -548,7 +548,7 @@ static struct witness_order_list_entry order_lists[] = {
|
||||
{ "in6_multi_list_mtx", &lock_class_mtx_sleep },
|
||||
{ "mld_mtx", &lock_class_mtx_sleep },
|
||||
{ "ifnet_rw", &lock_class_rw },
|
||||
{ "if_addr_lock", &lock_class_rw },
|
||||
{ "if_addr_lock", &lock_class_mtx_sleep },
|
||||
{ NULL, NULL },
|
||||
/*
|
||||
* UNIX Domain Sockets
|
||||
|
@ -121,6 +121,7 @@ SUBDIR= \
|
||||
${_ena} \
|
||||
${_ep} \
|
||||
${_epic} \
|
||||
epoch_test \
|
||||
esp \
|
||||
${_et} \
|
||||
evdev \
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user