FreeBSD/sys/dev/ixgbe/if_ixv.c
/*
** This routine is run via an vlan config EVENT,
** it enables us to use the HW Filter table since
** we can get the vlan id. This just creates the
** entry in the soft version of the VFTA, init will
** repopulate the real table.
*/
This routine is run via an vlan config EVENT,
it enables us to use the HW Filter table since
we can get the vlan id. This just creates the
entry in the soft version of the VFTA, init will
repopulate the real table.
This routine is run via an vlan config EVENT it enables us to use the HW Filter table since we can get the vlan id . This just creates the entry in the soft version of the VFTA init will repopulate the real table .
static void
ixv_register_vlan(void *arg, struct ifnet *ifp, u16 vtag)
{
	struct adapter	*adapter = ifp->if_softc;
	u16		index, bit;
	if (ifp->if_softc != arg) 
		return;
	if ((vtag == 0) || (vtag > 4095)) 
		return;
	IXGBE_CORE_LOCK(adapter);
	index = (vtag >> 5) & 0x7F;
	bit = vtag & 0x1F;
	ixv_shadow_vfta[index] |= (1 << bit);
	++adapter->num_vlans;
	ixv_init_locked(adapter);
	IXGBE_CORE_UNLOCK(adapter);
}
static void ixv_register_vlan ( void * arg , struct ifnet * ifp , u16 vtag ) { struct adapter * adapter = ifp -> if_softc ; u16 index , bit ; if ( ifp -> if_softc != arg ) return ; if ( ( vtag == 0 ) || ( vtag > 4095 ) ) return ; IXGBE_CORE_LOCK ( adapter ) ; index = ( vtag >> 5 ) & 0x7F ; bit = vtag & 0x1F ; ixv_shadow_vfta [ index ] |= ( 1 << bit ) ; ++ adapter -> num_vlans ; ixv_init_locked ( adapter ) ; IXGBE_CORE_UNLOCK ( adapter ) ; }
This routine is run via an vlan config EVENT,
it enables us to use the HW Filter table since
we can get the vlan id.
This routine is run via an vlan config EVENT it enables us to use the HW Filter table since we can get the vlan id .
/* Not our event */ /* Invalid */ /* Re-init to load the changes */