src/dpdk/drivers/net/txgbe/base/txgbe_hw.c
static s32 txgbe_mta_vector(struct txgbe_hw *hw, u8 *mc_addr)
{
	u32 vector = 0;

	DEBUGFUNC("txgbe_mta_vector");

	switch (hw->mac.mc_filter_type) {
	case 0:   /* use bits [47:36] of the address */
		vector = ((mc_addr[4] >> 4) | (((u16)mc_addr[5]) << 4));
		break;
	case 1:   /* use bits [46:35] of the address */
		vector = ((mc_addr[4] >> 3) | (((u16)mc_addr[5]) << 5));
		break;
	case 2:   /* use bits [45:34] of the address */
		vector = ((mc_addr[4] >> 2) | (((u16)mc_addr[5]) << 6));
		break;
	case 3:   /* use bits [43:32] of the address */
		vector = ((mc_addr[4]) | (((u16)mc_addr[5]) << 8));
		break;
	default:  /* Invalid mc_filter_type */
		DEBUGOUT("MC filter type param set incorrectly\n");
		ASSERT(0);
		break;
	}

	/* vector can only be 12-bits or boundary will be exceeded */
	vector &= 0xFFF;
	return vector;
}
/**
 *  txgbe_mta_vector - Determines bit-vector in multicast table to set
 *  @hw: pointer to hardware structure
 *  @mc_addr: the multicast address
 *
 *  Extracts the 12 bits, from a multicast address, to determine which
 *  bit-vector to set in the multicast table. The hardware uses 12 bits, from
 *  incoming rx multicast addresses, to determine the bit-vector to check in
 *  the MTA. Which of the 4 combination, of 12-bits, the hardware uses is set
 *  by the MO field of the PSRCTRL. The MO field is set during initialization
 *  to mc_filter_type.
 **/
Determines bit-vector in multicast table to set
@hw: pointer to hardware structure
@mc_addr: the multicast address

Extracts the 12 bits, from a multicast address, to determine which
bit-vector to set in the multicast table. The hardware uses 12 bits, from
incoming rx multicast addresses, to determine the bit-vector to check in
the MTA. Which of the 4 combination, of 12-bits, the hardware uses is set
by the MO field of the PSRCTRL. The MO field is set during initialization
to mc_filter_type.
Determines bit - vector in multicast table to set @hw : pointer to hardware structure @mc_addr : the multicast address Extracts the 12 bits from a multicast address to determine which bit - vector to set in the multicast table . The hardware uses 12 bits from incoming rx multicast addresses to determine the bit - vector to check in the MTA . Which of the 4 combination of 12 - bits the hardware uses is set by the MO field of the PSRCTRL . The MO field is set during initialization to mc_filter_type .
static s32 txgbe_mta_vector(struct txgbe_hw *hw, u8 *mc_addr)
{
	u32 vector = 0;
	DEBUGFUNC("txgbe_mta_vector");
	switch (hw->mac.mc_filter_type) {
	case 0:   
		vector = ((mc_addr[4] >> 4) | (((u16)mc_addr[5]) << 4));
		break;
	case 1:   
		vector = ((mc_addr[4] >> 3) | (((u16)mc_addr[5]) << 5));
		break;
	case 2:   
		vector = ((mc_addr[4] >> 2) | (((u16)mc_addr[5]) << 6));
		break;
	case 3:   
		vector = ((mc_addr[4]) | (((u16)mc_addr[5]) << 8));
		break;
	default:  
		DEBUGOUT("MC filter type param set incorrectly\n");
		ASSERT(0);
		break;
	}
	vector &= 0xFFF;
	return vector;
}
static s32 txgbe_mta_vector ( struct txgbe_hw * hw , u8 * mc_addr ) { u32 vector = 0 ; DEBUGFUNC ( " " ) ; switch ( hw -> mac . mc_filter_type ) { case 0 : vector = ( ( mc_addr [ 4 ] >> 4 ) | ( ( ( u16 ) mc_addr [ 5 ] ) << 4 ) ) ; break ; case 1 : vector = ( ( mc_addr [ 4 ] >> 3 ) | ( ( ( u16 ) mc_addr [ 5 ] ) << 5 ) ) ; break ; case 2 : vector = ( ( mc_addr [ 4 ] >> 2 ) | ( ( ( u16 ) mc_addr [ 5 ] ) << 6 ) ) ; break ; case 3 : vector = ( ( mc_addr [ 4 ] ) | ( ( ( u16 ) mc_addr [ 5 ] ) << 8 ) ) ; break ; default : DEBUGOUT ( " \n " ) ; ASSERT ( 0 ) ; break ; } vector &= 0xFFF ; return vector ; }
txgbe_mta_vector - Determines bit-vector in multicast table to set
  @hw: pointer to hardware structure
  @mc_addr: the multicast address
txgbe_mta_vector - Determines bit - vector in multicast table to set @hw : pointer to hardware structure @mc_addr : the multicast address
/* use bits [47:36] of the address */ /* use bits [46:35] of the address */ /* use bits [45:34] of the address */ /* use bits [43:32] of the address */ /* Invalid mc_filter_type */ /* vector can only be 12-bits or boundary will be exceeded */