]> 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 df08f977bf3bc83b9a1d9191445e66fda00824a1..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>
@@ -1620,6 +1620,7 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
        LIST_INSERT_HEAD(&priv->rxqsctrl, tmpl, next);
        return tmpl;
 error:
+       mlx5_mr_btree_free(&tmpl->rxq.mr_ctrl.cache_bh);
        mlx5_free(tmpl);
        return NULL;
 }
@@ -2352,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;
 }
 
 /**