src/dpdk/drivers/net/txgbe/base/txgbe_hw.c
s32 txgbe_clear_rar(struct txgbe_hw *hw, u32 index)
{
	u32 rar_high;
	u32 rar_entries = hw->mac.num_rar_entries;

	DEBUGFUNC("txgbe_clear_rar");

	/* Make sure we are using a valid rar index range */
	if (index >= rar_entries) {
		DEBUGOUT("RAR index %d is out of range.\n", index);
		return TXGBE_ERR_INVALID_ARGUMENT;
	}

	/*
	 * Some parts put the VMDq setting in the extra RAH bits,
	 * so save everything except the lower 16 bits that hold part
	 * of the address and the address valid bit.
	 */
	wr32(hw, TXGBE_ETHADDRIDX, index);
	rar_high = rd32(hw, TXGBE_ETHADDRH);
	rar_high &= ~(TXGBE_ETHADDRH_AD_MASK | TXGBE_ETHADDRH_VLD);

	wr32(hw, TXGBE_ETHADDRL, 0);
	wr32(hw, TXGBE_ETHADDRH, rar_high);

	/* clear VMDq pool/queue selection for this RAR */
	hw->mac.clear_vmdq(hw, index, BIT_MASK32);

	return 0;
}
/**
 *  txgbe_clear_rar - Remove Rx address register
 *  @hw: pointer to hardware structure
 *  @index: Receive address register to write
 *
 *  Clears an ethernet address from a receive address register.
 **/
Remove Rx address register
@hw: pointer to hardware structure
@index: Receive address register to write

Clears an ethernet address from a receive address register.
Remove Rx address register @hw : pointer to hardware structure @index : Receive address register to write Clears an ethernet address from a receive address register .
s32 txgbe_clear_rar(struct txgbe_hw *hw, u32 index)
{
	u32 rar_high;
	u32 rar_entries = hw->mac.num_rar_entries;
	DEBUGFUNC("txgbe_clear_rar");
	if (index >= rar_entries) {
		DEBUGOUT("RAR index %d is out of range.\n", index);
		return TXGBE_ERR_INVALID_ARGUMENT;
	}
	wr32(hw, TXGBE_ETHADDRIDX, index);
	rar_high = rd32(hw, TXGBE_ETHADDRH);
	rar_high &= ~(TXGBE_ETHADDRH_AD_MASK | TXGBE_ETHADDRH_VLD);
	wr32(hw, TXGBE_ETHADDRL, 0);
	wr32(hw, TXGBE_ETHADDRH, rar_high);
	hw->mac.clear_vmdq(hw, index, BIT_MASK32);
	return 0;
}
s32 txgbe_clear_rar ( struct txgbe_hw * hw , u32 index ) { u32 rar_high ; u32 rar_entries = hw -> mac . num_rar_entries ; DEBUGFUNC ( " " ) ; if ( index >= rar_entries ) { DEBUGOUT ( " \n " , index ) ; return TXGBE_ERR_INVALID_ARGUMENT ; } wr32 ( hw , TXGBE_ETHADDRIDX , index ) ; rar_high = rd32 ( hw , TXGBE_ETHADDRH ) ; rar_high &= ~ ( TXGBE_ETHADDRH_AD_MASK | TXGBE_ETHADDRH_VLD ) ; wr32 ( hw , TXGBE_ETHADDRL , 0 ) ; wr32 ( hw , TXGBE_ETHADDRH , rar_high ) ; hw -> mac . clear_vmdq ( hw , index , BIT_MASK32 ) ; return 0 ; }
txgbe_clear_rar - Remove Rx address register
  @hw: pointer to hardware structure
  @index: Receive address register to write
txgbe_clear_rar - Remove Rx address register @hw : pointer to hardware structure @index : Receive address register to write
/* Make sure we are using a valid rar index range */ /*
	 * Some parts put the VMDq setting in the extra RAH bits,
	 * so save everything except the lower 16 bits that hold part
	 * of the address and the address valid bit.
	 */ /* clear VMDq pool/queue selection for this RAR */