net/mlx5: fix using flow tunnel before null check
[dpdk.git] / drivers / net / i40e / i40e_ethdev_vf.c
index 5d7db7f..0c9bd8d 100644 (file)
@@ -25,8 +25,8 @@
 #include <rte_eal.h>
 #include <rte_alarm.h>
 #include <rte_ether.h>
-#include <rte_ethdev_driver.h>
-#include <rte_ethdev_pci.h>
+#include <ethdev_driver.h>
+#include <ethdev_pci.h>
 #include <rte_malloc.h>
 #include <rte_dev.h>
 
@@ -2746,7 +2746,7 @@ i40evf_config_rss(struct i40e_vf *vf)
                }
 
                for (i = 0; i < rss_lut_size; i++)
-                       lut_info[i] = i % vf->num_queue_pairs;
+                       lut_info[i] = i % num;
 
                ret = i40evf_set_rss_lut(&vf->vsi, lut_info,
                                         rss_lut_size);