X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fi40e%2Fi40e_ethdev_vf.c;h=f3470e6c4e9aa806ea6aa118925154432e9f7545;hb=999a867c936aa14f7791592cc8627b622ad71f58;hp=568a685c543f535e2057cb0e274ea808245d5fbd;hpb=492a028c659c3d34900eccb33a347243d28dcd77;p=dpdk.git diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index 568a685c54..f3470e6c4e 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -1524,6 +1524,8 @@ i40evf_rx_init(struct rte_eth_dev *dev) i40evf_config_rss(vf); for (i = 0; i < dev->data->nb_rx_queues; i++) { + if (!rxq[i] || !rxq[i]->q_set) + continue; if (i40evf_rxq_init(dev, rxq[i]) < 0) return -EFAULT; } @@ -1905,6 +1907,7 @@ i40evf_config_rss(struct i40e_vf *vf) struct i40e_hw *hw = I40E_VF_TO_HW(vf); struct rte_eth_rss_conf rss_conf; uint32_t i, j, lut = 0, nb_q = (I40E_VFQF_HLUT_MAX_INDEX + 1) * 4; + uint16_t num; if (vf->dev_data->dev_conf.rxmode.mq_mode != ETH_MQ_RX_RSS) { i40evf_disable_rss(vf); @@ -1912,9 +1915,10 @@ i40evf_config_rss(struct i40e_vf *vf) return 0; } + num = i40e_align_floor(vf->dev_data->nb_rx_queues); /* Fill out the look up table */ for (i = 0, j = 0; i < nb_q; i++, j++) { - if (j >= vf->num_queue_pairs) + if (j >= num) j = 0; lut = (lut << 8) | j; if ((i & 3) == 3)