[dpdk-dev] [PATCH v1 23/72] mlx5/windows: add initialization routine for external lib

Ophir Munk ophirmu at nvidia.com
Wed Oct 28 00:22:46 CET 2020


Add function mlx5_glue_constructor() as an initialization routine for
run-time dependency on external lib.  Currently the routine has an empty
body. It is used for compatibility with Linux.

Signed-off-by: Ophir Munk <ophirmu at nvidia.com>
Acked-by: Matan Azrad <matan at nvidia.com>
---
 drivers/common/mlx5/windows/meson.build      |  1 +
 drivers/common/mlx5/windows/mlx5_common_os.c | 24 ++++++++++++++++++++++++
 2 files changed, 25 insertions(+)
 create mode 100644 drivers/common/mlx5/windows/mlx5_common_os.c

diff --git a/drivers/common/mlx5/windows/meson.build b/drivers/common/mlx5/windows/meson.build
index 2b2aa3b..9e74ebd 100644
--- a/drivers/common/mlx5/windows/meson.build
+++ b/drivers/common/mlx5/windows/meson.build
@@ -6,6 +6,7 @@ includes += include_directories('.')
 allow_experimental_apis = true
 sources += files(
 	'mlx5_glue.c',
+	'mlx5_common_os.c',
 )
 
 res_lib = run_command(python3, '-c', 'import os; print(os.environ["DEVX_LIB_PATH"])')
diff --git a/drivers/common/mlx5/windows/mlx5_common_os.c b/drivers/common/mlx5/windows/mlx5_common_os.c
new file mode 100644
index 0000000..5707fb6
--- /dev/null
+++ b/drivers/common/mlx5/windows/mlx5_common_os.c
@@ -0,0 +1,24 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright 2020 Mellanox Technologies, Ltd
+ */
+
+#include <unistd.h>
+#include <string.h>
+#include <stdio.h>
+
+#include <rte_errno.h>
+#include <rte_mempool.h>
+#include <rte_malloc.h>
+#include <rte_errno.h>
+
+#include "mlx5_devx_cmds.h"
+#include "mlx5_common_utils.h"
+#include <mlx5_common.h>
+
+/**
+ * Initialization routine for run-time dependency on external lib
+ */
+void
+mlx5_glue_constructor(void)
+{
+}
-- 
2.8.4



More information about the dev mailing list