net/mlx5: add memory region callbacks in per-device cache
[dpdk.git] / drivers / net / mlx5 / linux / mlx5_os.c
index 844c6c0..f498d00 100644 (file)
@@ -42,6 +42,7 @@
 #include <mlx5_devx_cmds.h>
 #include <mlx5_common.h>
 #include <mlx5_common_mp.h>
+#include <mlx5_common_mr.h>
 
 #include "mlx5_defs.h"
 #include "mlx5.h"
@@ -2321,6 +2322,23 @@ free:
        rte_free(strings);
 }
 
+/**
+ * Set the reg_mr and dereg_mr call backs
+ *
+ * @param reg_mr_cb[out]
+ *   Pointer to reg_mr func
+ * @param dereg_mr_cb[out]
+ *   Pointer to dereg_mr func
+ *
+ */
+void
+mlx5_os_set_reg_mr_cb(mlx5_reg_mr_t *reg_mr_cb,
+                     mlx5_dereg_mr_t *dereg_mr_cb)
+{
+       *reg_mr_cb = mlx5_common_verbs_reg_mr;
+       *dereg_mr_cb = mlx5_common_verbs_dereg_mr;
+}
+
 const struct eth_dev_ops mlx5_os_dev_ops = {
        .dev_configure = mlx5_dev_configure,
        .dev_start = mlx5_dev_start,