MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ngbe_get_vf_queues

Function ngbe_get_vf_queues

dpdk/drivers/net/ngbe/ngbe_pf.c:491–518  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

489}
490
491static int
492ngbe_get_vf_queues(struct rte_eth_dev *eth_dev, uint32_t vf, uint32_t *msgbuf)
493{
494 struct ngbe_vf_info *vfinfo = *NGBE_DEV_VFDATA(eth_dev);
495 uint32_t default_q = 0;
496
497 /* Verify if the PF supports the mbox APIs version or not */
498 switch (vfinfo[vf].api_version) {
499 case ngbe_mbox_api_20:
500 case ngbe_mbox_api_11:
501 case ngbe_mbox_api_12:
502 case ngbe_mbox_api_13:
503 break;
504 default:
505 return -1;
506 }
507
508 /* Notify VF of Rx and Tx queue number */
509 msgbuf[NGBE_VF_RX_QUEUES] = RTE_ETH_DEV_SRIOV(eth_dev).nb_q_per_pool;
510 msgbuf[NGBE_VF_TX_QUEUES] = RTE_ETH_DEV_SRIOV(eth_dev).nb_q_per_pool;
511
512 /* Notify VF of default queue */
513 msgbuf[NGBE_VF_DEF_QUEUE] = default_q;
514
515 msgbuf[NGBE_VF_TRANS_VLAN] = 0;
516
517 return 0;
518}
519
520static int
521ngbe_set_vf_mc_promisc(struct rte_eth_dev *eth_dev,

Callers 1

ngbe_rcv_msg_from_vfFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected