net/mlx: version rdma-core glue libraries
[dpdk.git] / drivers / net / mlx5 / mlx5.c
index e437818..53182aa 100644 (file)
@@ -1122,6 +1122,11 @@ rte_mlx5_pmd_init(void)
                        assert(((const void *const *)mlx5_glue)[i]);
        }
 #endif
+       if (strcmp(mlx5_glue->version, MLX5_GLUE_VERSION)) {
+               ERROR("rdma-core glue \"%s\" mismatch: \"%s\" is required",
+                     mlx5_glue->version, MLX5_GLUE_VERSION);
+               return;
+       }
        mlx5_glue->fork_init();
        rte_pci_register(&mlx5_driver);
 }