Hi Michael, Pls review the latest version (v4).
Thanks for your effort Changchun > -----Original Message----- > From: Qiu, Michael > Sent: Monday, August 24, 2015 6:42 PM > To: Ouyang, Changchun; dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH 1/6] ixgbe: Support VMDq RSS in non-SRIOV > environment > > On 5/21/2015 3:50 PM, Ouyang Changchun wrote: > > In non-SRIOV environment, VMDq RSS could be enabled by MRQC register. > > In theory, the queue number per pool could be 2 or 4, but only 2 > > queues are available due to HW limitation, the same limit also exist in > > Linux > ixgbe driver. > > > > Signed-off-by: Changchun Ouyang <changchun.ouyang at intel.com> > > --- > > lib/librte_ether/rte_ethdev.c | 40 +++++++++++++++++++ > > lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 82 > > +++++++++++++++++++++++++++++++++------ > > 2 files changed, 111 insertions(+), 11 deletions(-) > > > > diff --git a/lib/librte_ether/rte_ethdev.c > > b/lib/librte_ether/rte_ethdev.c index 024fe8b..6535715 100644 > > --- a/lib/librte_ether/rte_ethdev.c > > +++ b/lib/librte_ether/rte_ethdev.c > > @@ -933,6 +933,16 @@ rte_eth_dev_check_vf_rss_rxq_num(uint8_t > port_id, uint16_t nb_rx_q) > > return 0; > > } > > > > +#define VMDQ_RSS_RX_QUEUE_NUM_MAX 4 > > + > > +static int > > +rte_eth_dev_check_vmdq_rss_rxq_num(__rte_unused uint8_t port_id, > > +uint16_t nb_rx_q) { > > + if (nb_rx_q > VMDQ_RSS_RX_QUEUE_NUM_MAX) > > + return -EINVAL; > > + return 0; > > +} > > + > > static int > > rte_eth_dev_check_mq_mode(uint8_t port_id, uint16_t nb_rx_q, > uint16_t nb_tx_q, > > const struct rte_eth_conf *dev_conf) @@ -1093,6 > +1103,36 @@ > > rte_eth_dev_check_mq_mode(uint8_t port_id, uint16_t nb_rx_q, > uint16_t nb_tx_q, > > return -EINVAL; > > } > > } > > + > > + if (dev_conf->rxmode.mq_mode == > ETH_MQ_RX_VMDQ_RSS) { > > + uint32_t nb_queue_pools = > > + dev_conf- > >rx_adv_conf.vmdq_rx_conf.nb_queue_pools; > > + struct rte_eth_dev_info dev_info; > > + > > + rte_eth_dev_info_get(port_id, &dev_info); > > + dev->data->dev_conf.rxmode.mq_mode = > ETH_MQ_RX_VMDQ_RSS; > > + if (nb_queue_pools == ETH_32_POOLS || > nb_queue_pools == ETH_64_POOLS) > > + RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool = > > + > dev_info.max_rx_queues/nb_queue_pools; > > + else { > > + PMD_DEBUG_TRACE("ethdev port_id=%d > VMDQ " > > + "nb_queue_pools=%d invalid > " > > + "in VMDQ RSS\n" > > Does here miss "," ? Yes, it is fixed in later version. > > Thanks, > Michael > > > + port_id, > > + nb_queue_pools); > > + return -EINVAL; > > + } > > + > > + if (rte_eth_dev_check_vmdq_rss_rxq_num(port_id, > > + > RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool) != 0) { > > + PMD_DEBUG_TRACE("ethdev port_id=%d" > > + " SRIOV active, invalid queue" > > + " number for VMDQ RSS, allowed" > > + " value are 1, 2 or 4\n", > > + port_id); > > + return -EINVAL; > > + } > > + } > > } > > return 0; > > } > >