src/dpdk/drivers/net/txgbe/base/txgbe_hw.c
s32 txgbe_set_vmdq(struct txgbe_hw *hw, u32 rar, u32 vmdq)
{
	u32 mpsar;
	u32 rar_entries = hw->mac.num_rar_entries;

	DEBUGFUNC("txgbe_set_vmdq");

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

	wr32(hw, TXGBE_ETHADDRIDX, rar);
	if (vmdq < 32) {
		mpsar = rd32(hw, TXGBE_ETHADDRASSL);
		mpsar |= 1 << vmdq;
		wr32(hw, TXGBE_ETHADDRASSL, mpsar);
	} else {
		mpsar = rd32(hw, TXGBE_ETHADDRASSH);
		mpsar |= 1 << (vmdq - 32);
		wr32(hw, TXGBE_ETHADDRASSH, mpsar);
	}
	return 0;
}
/**
 *  txgbe_set_vmdq - Associate a VMDq pool index with a rx address
 *  @hw: pointer to hardware struct
 *  @rar: receive address register index to associate with a VMDq index
 *  @vmdq: VMDq pool index
 **/
Associate a VMDq pool index with a rx address
@hw: pointer to hardware struct
@rar: receive address register index to associate with a VMDq index
@vmdq: VMDq pool index
Associate a VMDq pool index with a rx address @hw : pointer to hardware struct @rar : receive address register index to associate with a VMDq index @vmdq : VMDq pool index
s32 txgbe_set_vmdq(struct txgbe_hw *hw, u32 rar, u32 vmdq)
{
	u32 mpsar;
	u32 rar_entries = hw->mac.num_rar_entries;
	DEBUGFUNC("txgbe_set_vmdq");
	if (rar >= rar_entries) {
		DEBUGOUT("RAR index %d is out of range.\n", rar);
		return TXGBE_ERR_INVALID_ARGUMENT;
	}
	wr32(hw, TXGBE_ETHADDRIDX, rar);
	if (vmdq < 32) {
		mpsar = rd32(hw, TXGBE_ETHADDRASSL);
		mpsar |= 1 << vmdq;
		wr32(hw, TXGBE_ETHADDRASSL, mpsar);
	} else {
		mpsar = rd32(hw, TXGBE_ETHADDRASSH);
		mpsar |= 1 << (vmdq - 32);
		wr32(hw, TXGBE_ETHADDRASSH, mpsar);
	}
	return 0;
}
s32 txgbe_set_vmdq ( struct txgbe_hw * hw , u32 rar , u32 vmdq ) { u32 mpsar ; u32 rar_entries = hw -> mac . num_rar_entries ; DEBUGFUNC ( " " ) ; if ( rar >= rar_entries ) { DEBUGOUT ( " \n " , rar ) ; return TXGBE_ERR_INVALID_ARGUMENT ; } wr32 ( hw , TXGBE_ETHADDRIDX , rar ) ; if ( vmdq < 32 ) { mpsar = rd32 ( hw , TXGBE_ETHADDRASSL ) ; mpsar |= 1 << vmdq ; wr32 ( hw , TXGBE_ETHADDRASSL , mpsar ) ; } else { mpsar = rd32 ( hw , TXGBE_ETHADDRASSH ) ; mpsar |= 1 << ( vmdq - 32 ) ; wr32 ( hw , TXGBE_ETHADDRASSH , mpsar ) ; } return 0 ; }
txgbe_set_vmdq - Associate a VMDq pool index with a rx address
  @hw: pointer to hardware struct
  @rar: receive address register index to associate with a VMDq index
  @vmdq: VMDq pool index
txgbe_set_vmdq - Associate a VMDq pool index with a rx address @hw : pointer to hardware struct @rar : receive address register index to associate with a VMDq index @vmdq : VMDq pool index
/* Make sure we are using a valid rar index range */