FreeBSD/sys/dev/ixl/if_ixlv.c
/*
** This routine is run via an vlan
** unconfig EVENT, remove our entry
** in the soft vfta.
*/
This routine is run via an vlan
unconfig EVENT, remove our entry
in the soft vfta.
This routine is run via an vlan unconfig EVENT remove our entry in the soft vfta .
static void
ixlv_unregister_vlan(void *arg, struct ifnet *ifp, u16 vtag)
{
	struct ixl_vsi		*vsi = arg;
	struct ixlv_sc		*sc = vsi->back;
	struct ixlv_vlan_filter	*v;
	int			i = 0;
	if (ifp->if_softc != arg)
		return;
	if ((vtag == 0) || (vtag > 4095))	
		return;
	mtx_lock(&sc->mtx);
	SLIST_FOREACH(v, sc->vlan_filters, next) {
		if (v->vlan == vtag) {
			v->flags = IXL_FILTER_DEL;
			++i;
			--vsi->num_vlans;
		}
	}
	if (i)
		ixl_vc_enqueue(&sc->vc_mgr, &sc->del_vlan_cmd,
		    IXLV_FLAG_AQ_DEL_VLAN_FILTER, ixl_init_cmd_complete, sc);
	mtx_unlock(&sc->mtx);
	return;
}
static void ixlv_unregister_vlan ( void * arg , struct ifnet * ifp , u16 vtag ) { struct ixl_vsi * vsi = arg ; struct ixlv_sc * sc = vsi -> back ; struct ixlv_vlan_filter * v ; int i = 0 ; if ( ifp -> if_softc != arg ) return ; if ( ( vtag == 0 ) || ( vtag > 4095 ) ) return ; mtx_lock ( & sc -> mtx ) ; SLIST_FOREACH ( v , sc -> vlan_filters , next ) { if ( v -> vlan == vtag ) { v -> flags = IXL_FILTER_DEL ; ++ i ; -- vsi -> num_vlans ; } } if ( i ) ixl_vc_enqueue ( & sc -> vc_mgr , & sc -> del_vlan_cmd , IXLV_FLAG_AQ_DEL_VLAN_FILTER , ixl_init_cmd_complete , sc ) ; mtx_unlock ( & sc -> mtx ) ; return ; }
This routine is run via an vlan
unconfig EVENT, remove our entry
in the soft vfta.
This routine is run via an vlan unconfig EVENT remove our entry in the soft vfta .
/* Invalid */