src/dpdk/drivers/net/txgbe/base/txgbe_mbx.c
s32 txgbe_read_mbx_pf(struct txgbe_hw *hw, u32 *msg, u16 size, u16 vf_number)
{
	s32 ret_val;
	u16 i;

	DEBUGFUNC("txgbe_read_mbx_pf");

	/* lock the mailbox to prevent pf/vf race condition */
	ret_val = txgbe_obtain_mbx_lock_pf(hw, vf_number);
	if (ret_val)
		goto out_no_read;

	/* copy the message to the mailbox memory buffer */
	for (i = 0; i < size; i++)
		msg[i] = rd32a(hw, TXGBE_MBMEM(vf_number), i);

	/* Acknowledge the message and release buffer */
	wr32(hw, TXGBE_MBCTL(vf_number), TXGBE_MBCTL_ACK);

	/* update stats */
	hw->mbx.stats.msgs_rx++;

out_no_read:
	return ret_val;
}
/**
 *  txgbe_read_mbx_pf - Read a message from the mailbox
 *  @hw: pointer to the HW structure
 *  @msg: The message buffer
 *  @size: Length of buffer
 *  @vf_number: the VF index
 *
 *  This function copies a message from the mailbox buffer to the caller's
 *  memory buffer.  The presumption is that the caller knows that there was
 *  a message due to a VF request so no polling for message is needed.
 **/
Read a message from the mailbox
@hw: pointer to the HW structure
@msg: The message buffer
@size: Length of buffer
@vf_number: the VF index

This function copies a message from the mailbox buffer to the caller's
memory buffer.  The presumption is that the caller knows that there was
a message due to a VF request so no polling for message is needed.
Read a message from the mailbox @hw : pointer to the HW structure @msg : The message buffer @size : Length of buffer @vf_number : the VF index This function copies a message from the mailbox buffer to the caller ' s memory buffer . The presumption is that the caller knows that there was a message due to a VF request so no polling for message is needed .
s32 txgbe_read_mbx_pf(struct txgbe_hw *hw, u32 *msg, u16 size, u16 vf_number)
{
	s32 ret_val;
	u16 i;
	DEBUGFUNC("txgbe_read_mbx_pf");
	ret_val = txgbe_obtain_mbx_lock_pf(hw, vf_number);
	if (ret_val)
		goto out_no_read;
	for (i = 0; i < size; i++)
		msg[i] = rd32a(hw, TXGBE_MBMEM(vf_number), i);
	wr32(hw, TXGBE_MBCTL(vf_number), TXGBE_MBCTL_ACK);
	hw->mbx.stats.msgs_rx++;
out_no_read:
	return ret_val;
}
s32 txgbe_read_mbx_pf ( struct txgbe_hw * hw , u32 * msg , u16 size , u16 vf_number ) { s32 ret_val ; u16 i ; DEBUGFUNC ( " " ) ; ret_val = txgbe_obtain_mbx_lock_pf ( hw , vf_number ) ; if ( ret_val ) goto out_no_read ; for ( i = 0 ; i < size ; i ++ ) msg [ i ] = rd32a ( hw , TXGBE_MBMEM ( vf_number ) , i ) ; wr32 ( hw , TXGBE_MBCTL ( vf_number ) , TXGBE_MBCTL_ACK ) ; hw -> mbx . stats . msgs_rx ++ ; out_no_read : return ret_val ; }
txgbe_read_mbx_pf - Read a message from the mailbox
  @hw: pointer to the HW structure
  @msg: The message buffer
  @size: Length of buffer
  @vf_number: the VF index
txgbe_read_mbx_pf - Read a message from the mailbox @hw : pointer to the HW structure @msg : The message buffer @size : Length of buffer @vf_number : the VF index
/* lock the mailbox to prevent pf/vf race condition */ /* copy the message to the mailbox memory buffer */ /* Acknowledge the message and release buffer */ /* update stats */