> -----Original Message----- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Pawel Wodkowski > Sent: Thursday, February 19, 2015 11:55 PM > To: dev at dpdk.org > Subject: [dpdk-dev] [PATCH v4 3/7] pmd: igb/ixgbe split nb_q_per_pool to rx > and tx nb_q_per_pool > > rx and tx number of queue might be different if RX and TX are configured in > different mode. This allow to inform VF about proper number of queues. > > Signed-off-by: Pawel Wodkowski <pawelx.wodkowski at intel.com> > --- > lib/librte_ether/rte_ethdev.c | 12 ++++++------ > lib/librte_ether/rte_ethdev.h | 3 ++- > lib/librte_pmd_e1000/igb_pf.c | 3 ++- > lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 2 +- > lib/librte_pmd_ixgbe/ixgbe_pf.c | 9 +++++---- > 5 files changed, 16 insertions(+), 13 deletions(-) > > diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c > index 2e814db..4007054 100644 > --- a/lib/librte_ether/rte_ethdev.c > +++ b/lib/librte_ether/rte_ethdev.c > @@ -520,7 +520,7 @@ rte_eth_dev_check_vf_rss_rxq_num(uint8_t port_id, > uint16_t nb_rx_q) > return -EINVAL; > } > > - RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool = nb_rx_q; > + RTE_ETH_DEV_SRIOV(dev).nb_rx_q_per_pool = nb_rx_q; > RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx = > dev->pci_dev->max_vfs * nb_rx_q; > > @@ -567,7 +567,7 @@ rte_eth_dev_check_mq_mode(uint8_t port_id, > uint16_t nb_rx_q, uint16_t nb_tx_q, > dev->data- > >dev_conf.rxmode.mq_mode); > case ETH_MQ_RX_VMDQ_RSS: > dev->data->dev_conf.rxmode.mq_mode = > ETH_MQ_RX_VMDQ_RSS; > - if (nb_rx_q <= > RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool) > + if (nb_rx_q <= > RTE_ETH_DEV_SRIOV(dev).nb_rx_q_per_pool) > if > (rte_eth_dev_check_vf_rss_rxq_num(port_id, nb_rx_q) != 0) { > PMD_DEBUG_TRACE("ethdev > port_id=%d" > " SRIOV active, invalid queue" > @@ -580,8 +580,8 @@ rte_eth_dev_check_mq_mode(uint8_t port_id, > uint16_t nb_rx_q, uint16_t nb_tx_q, > default: /* ETH_MQ_RX_VMDQ_ONLY or > ETH_MQ_RX_NONE */ > /* if nothing mq mode configure, use default scheme > */ > dev->data->dev_conf.rxmode.mq_mode = > ETH_MQ_RX_VMDQ_ONLY; > - if (RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool > 1) > - RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool = > 1; > + if (RTE_ETH_DEV_SRIOV(dev).nb_rx_q_per_pool > 1) > + > RTE_ETH_DEV_SRIOV(dev).nb_rx_q_per_pool = 1; > break; > } > > @@ -600,8 +600,8 @@ rte_eth_dev_check_mq_mode(uint8_t port_id, > uint16_t nb_rx_q, uint16_t nb_tx_q, > } > > /* check valid queue number */ > - if ((nb_rx_q > RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool) || > - (nb_tx_q > RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool)) { > + if ((nb_rx_q > RTE_ETH_DEV_SRIOV(dev).nb_tx_q_per_pool)
Here, how about use nb_rx_q_per_pool to replace nb_tx_q_per_pool ? so it will be more clear to check rx queue number. > || > + (nb_tx_q > RTE_ETH_DEV_SRIOV(dev).nb_tx_q_per_pool)) > { > PMD_DEBUG_TRACE("ethdev port_id=%d SRIOV > active, " > "queue number must less equal to %d\n", > port_id, > RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool);