From: François Tigeot Date: Tue, 14 Aug 2012 09:25:19 +0000 (+0200) Subject: ixgbe: Remove the multicast spinlock X-Git-Tag: v3.2.0~399 X-Git-Url: https://gitweb.dragonflybsd.org/~tuxillo/dragonfly.git/commitdiff_plain/109323c5096b6a5b35af57acd8d9b2a1892154a6?ds=sidebyside ixgbe: Remove the multicast spinlock Multicast read/write is serialized by netisr0, there is no need to add another protection layer. Advised-by: Sepherosa Ziehau --- diff --git a/sys/dev/netif/ixgbe/ixgbe.c b/sys/dev/netif/ixgbe/ixgbe.c index 2ced28d93e..2361af65d3 100644 --- a/sys/dev/netif/ixgbe/ixgbe.c +++ b/sys/dev/netif/ixgbe/ixgbe.c @@ -418,7 +418,6 @@ ixgbe_attach(device_t dev) /* Core Lock Init*/ IXGBE_CORE_LOCK_INIT(adapter, device_get_nameunit(dev)); - spin_init(&adapter->mcast_spin); /* SYSCTL APIs */ @@ -709,7 +708,6 @@ ixgbe_detach(device_t dev) kfree(adapter->mta, M_DEVBUF); sysctl_ctx_free(&adapter->sysctl_ctx); - spin_uninit(&adapter->mcast_spin); IXGBE_CORE_LOCK_DESTROY(adapter); return (0); } @@ -1976,7 +1974,6 @@ ixgbe_set_multi(struct adapter *adapter) IXGBE_WRITE_REG(&adapter->hw, IXGBE_FCTRL, fctrl); - spin_lock(&adapter->mcast_spin); TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { if (ifma->ifma_addr->sa_family != AF_LINK) continue; @@ -1985,7 +1982,6 @@ ixgbe_set_multi(struct adapter *adapter) IXGBE_ETH_LENGTH_OF_ADDRESS); mcnt++; } - spin_unlock(&adapter->mcast_spin); update_ptr = mta; ixgbe_update_mc_addr_list(&adapter->hw, diff --git a/sys/dev/netif/ixgbe/ixgbe.h b/sys/dev/netif/ixgbe/ixgbe.h index f51014749e..1acee0524d 100644 --- a/sys/dev/netif/ixgbe/ixgbe.h +++ b/sys/dev/netif/ixgbe/ixgbe.h @@ -365,7 +365,6 @@ struct adapter { int if_flags; struct lock core_lock; - struct spinlock mcast_spin; eventhandler_tag vlan_attach; eventhandler_tag vlan_detach;