src/dpdk/drivers/net/igc/base/igc_mac.c
void igc_update_mc_addr_list_generic(struct igc_hw *hw,
				       u8 *mc_addr_list, u32 mc_addr_count)
{
	u32 hash_value, hash_bit, hash_reg;
	int i;

	DEBUGFUNC("igc_update_mc_addr_list_generic");

	/* clear mta_shadow */
	memset(&hw->mac.mta_shadow, 0, sizeof(hw->mac.mta_shadow));

	/* update mta_shadow from mc_addr_list */
	for (i = 0; (u32)i < mc_addr_count; i++) {
		hash_value = igc_hash_mc_addr_generic(hw, mc_addr_list);

		hash_reg = (hash_value >> 5) & (hw->mac.mta_reg_count - 1);
		hash_bit = hash_value & 0x1F;

		hw->mac.mta_shadow[hash_reg] |= (1 << hash_bit);
		mc_addr_list += (ETH_ADDR_LEN);
	}

	/* replace the entire MTA table */
	for (i = hw->mac.mta_reg_count - 1; i >= 0; i--)
		IGC_WRITE_REG_ARRAY(hw, IGC_MTA, i, hw->mac.mta_shadow[i]);
	IGC_WRITE_FLUSH(hw);
}
/**
 *  igc_update_mc_addr_list_generic - Update Multicast addresses
 *  @hw: pointer to the HW structure
 *  @mc_addr_list: array of multicast addresses to program
 *  @mc_addr_count: number of multicast addresses to program
 *
 *  Updates entire Multicast Table Array.
 *  The caller must have a packed mc_addr_list of multicast addresses.
 **/
Update Multicast addresses
@hw: pointer to the HW structure
@mc_addr_list: array of multicast addresses to program
@mc_addr_count: number of multicast addresses to program

Updates entire Multicast Table Array.
The caller must have a packed mc_addr_list of multicast addresses.
Update Multicast addresses @hw : pointer to the HW structure @mc_addr_list : array of multicast addresses to program @mc_addr_count : number of multicast addresses to program Updates entire Multicast Table Array . The caller must have a packed mc_addr_list of multicast addresses .
void igc_update_mc_addr_list_generic(struct igc_hw *hw,
				       u8 *mc_addr_list, u32 mc_addr_count)
{
	u32 hash_value, hash_bit, hash_reg;
	int i;
	DEBUGFUNC("igc_update_mc_addr_list_generic");
	memset(&hw->mac.mta_shadow, 0, sizeof(hw->mac.mta_shadow));
	for (i = 0; (u32)i < mc_addr_count; i++) {
		hash_value = igc_hash_mc_addr_generic(hw, mc_addr_list);
		hash_reg = (hash_value >> 5) & (hw->mac.mta_reg_count - 1);
		hash_bit = hash_value & 0x1F;
		hw->mac.mta_shadow[hash_reg] |= (1 << hash_bit);
		mc_addr_list += (ETH_ADDR_LEN);
	}
	for (i = hw->mac.mta_reg_count - 1; i >= 0; i--)
		IGC_WRITE_REG_ARRAY(hw, IGC_MTA, i, hw->mac.mta_shadow[i]);
	IGC_WRITE_FLUSH(hw);
}
void igc_update_mc_addr_list_generic ( struct igc_hw * hw , u8 * mc_addr_list , u32 mc_addr_count ) { u32 hash_value , hash_bit , hash_reg ; int i ; DEBUGFUNC ( " " ) ; memset ( & hw -> mac . mta_shadow , 0 , sizeof ( hw -> mac . mta_shadow ) ) ; for ( i = 0 ; ( u32 ) i < mc_addr_count ; i ++ ) { hash_value = igc_hash_mc_addr_generic ( hw , mc_addr_list ) ; hash_reg = ( hash_value >> 5 ) & ( hw -> mac . mta_reg_count - 1 ) ; hash_bit = hash_value & 0x1F ; hw -> mac . mta_shadow [ hash_reg ] |= ( 1 << hash_bit ) ; mc_addr_list += ( ETH_ADDR_LEN ) ; } for ( i = hw -> mac . mta_reg_count - 1 ; i >= 0 ; i -- ) IGC_WRITE_REG_ARRAY ( hw , IGC_MTA , i , hw -> mac . mta_shadow [ i ] ) ; IGC_WRITE_FLUSH ( hw ) ; }
igc_update_mc_addr_list_generic - Update Multicast addresses
  @hw: pointer to the HW structure
  @mc_addr_list: array of multicast addresses to program
  @mc_addr_count: number of multicast addresses to program
igc_update_mc_addr_list_generic - Update Multicast addresses @hw : pointer to the HW structure @mc_addr_list : array of multicast addresses to program @mc_addr_count : number of multicast addresses to program
/* clear mta_shadow */ /* update mta_shadow from mc_addr_list */ /* replace the entire MTA table */