[dpdk-dev] [PATCH v1 02/20] net/txgbe: add base code for VF driver
Ferruh Yigit
ferruh.yigit at intel.com
Tue Feb 2 18:51:48 CET 2021
On 1/22/2021 9:47 AM, Jiawen Wu wrote:
> Implement VF device init and uninit function with hardware operations,
> and negotiate with PF in mailbox.
>
> Signed-off-by: Jiawen Wu <jiawenwu at trustnetic.com>
<...>
> +int txgbevf_get_queues(struct txgbe_hw *hw, unsigned int *num_tcs,
> + unsigned int *default_tc)
> +{
> + int err, i;
> + u32 msg[5];
> +
> + /* do nothing if API doesn't support txgbevf_get_queues */
> + switch (hw->api_version) {
> + case txgbe_mbox_api_11:
> + case txgbe_mbox_api_12:
> + case txgbe_mbox_api_13:
> + break;
> + default:
> + return 0;
> + }
> +
> + /* Fetch queue configuration from the PF */
> + msg[0] = TXGBE_VF_GET_QUEUES;
> + for (i = 1; i < 5; i++)
> + msg[i] = 0;
> +
> + err = txgbevf_write_msg_read_ack(hw, msg, msg, 5);
> + if (!err) {
> + msg[0] &= ~TXGBE_VT_MSGTYPE_CTS;
> +
> + /*
> + * if we we didn't get an ACK there must have been
typo on 'we', it is dublicated.
More information about the dev
mailing list