net/mlx5: add a function to rdma-core glue