]> git.droids-corp.org - dpdk.git/blobdiff - drivers/net/mlx5/mlx5_rxq.c
net/failsafe: fix RSS hash offload reporting
[dpdk.git] / drivers / net / mlx5 / mlx5_rxq.c
index 787b2b74dd99ab21f02060cdff7f22a9506a9540..8f9ee97f7a62f0d6b1366a17de0343655d8078e4 100644 (file)
@@ -12,7 +12,7 @@
 
 #include <rte_mbuf.h>
 #include <rte_malloc.h>
-#include <rte_ethdev_driver.h>
+#include <ethdev_driver.h>
 #include <rte_common.h>
 #include <rte_interrupts.h>
 #include <rte_debug.h>
@@ -2353,7 +2353,9 @@ uint32_t mlx5_hrxq_get(struct rte_eth_dev *dev,
                        return 0;
                hrxq = container_of(entry, typeof(*hrxq), entry);
        }
-       return hrxq->idx;
+       if (hrxq)
+               return hrxq->idx;
+       return 0;
 }
 
 /**