> -----Original Message----- > From: Wodkowski, PawelX > Sent: Monday, January 19, 2015 5:14 PM > To: Ouyang, Changchun; dev at dpdk.org > Cc: Thomas Monjalon; Vlad Zolotarov > Subject: RE: [dpdk-dev] [PATCH v6 3/6] ixgbe: Get VF queue number > > > > > -----Original Message----- > > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Ouyang > Changchun > > Sent: Monday, January 12, 2015 6:59 AM > > To: dev at dpdk.org > > Subject: [dpdk-dev] [PATCH v6 3/6] ixgbe: Get VF queue number > > > > Get the available Rx and Tx queue number when receiving > > IXGBE_VF_GET_QUEUES message from VF. > > > > Signed-off-by: Changchun Ouyang <changchun.ouyang at intel.com> > > > > changes in v5 > > - Add some 'FIX ME' comments for IXGBE_VF_TRANS_VLAN. > > > > --- > > lib/librte_pmd_ixgbe/ixgbe_pf.c | 40 > > +++++++++++++++++++++++++++++++++++++++- > > 1 file changed, 39 insertions(+), 1 deletion(-) > > > > diff --git a/lib/librte_pmd_ixgbe/ixgbe_pf.c > > b/lib/librte_pmd_ixgbe/ixgbe_pf.c index 495aff5..dbda9b5 100644 > > --- a/lib/librte_pmd_ixgbe/ixgbe_pf.c > > +++ b/lib/librte_pmd_ixgbe/ixgbe_pf.c > > @@ -53,6 +53,8 @@ > > #include "ixgbe_ethdev.h" > > > > #define IXGBE_MAX_VFTA (128) > > +#define IXGBE_VF_MSG_SIZE_DEFAULT 1 > > +#define IXGBE_VF_GET_QUEUE_MSG_SIZE 5 > > > > static inline uint16_t > > dev_num_vf(struct rte_eth_dev *eth_dev) @@ -491,9 +493,41 @@ > > ixgbe_negotiate_vf_api(struct rte_eth_dev *dev, uint32_t vf, uint32_t > > *msgbuf) } > > > > static int > > +ixgbe_get_vf_queues(struct rte_eth_dev *dev, uint32_t vf, uint32_t > > +*msgbuf) { > > + struct ixgbe_vf_info *vfinfo = > > + *IXGBE_DEV_PRIVATE_TO_P_VFDATA(dev->data- > >dev_private); > > + uint32_t default_q = vf * RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool; > > + > > + /* Verify if the PF supports the mbox APIs version or not */ > > + switch (vfinfo[vf].api_version) { > > + case ixgbe_mbox_api_20: > > + case ixgbe_mbox_api_11: > > + break; > > + default: > > + return -1; > > + } > > + > > + /* Notify VF of Rx and Tx queue number */ > > + msgbuf[IXGBE_VF_RX_QUEUES] = > RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool; > > + msgbuf[IXGBE_VF_TX_QUEUES] = > RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool; > > Are you sure this is good approach to pass nb_q_per_pool to VF as the > number of available queues? What if PF does not use RSS nor DCB? Are thos > queues always available in that case? >
In that case(neither rss nor dcb), nb_q_per_pool is 1, so it also works, I have validated it. Thanks Changchun