[v9,03/10] eal/windows: add device event stubs

Message ID 1619805162-10684-4-git-send-email-jizh@linux.microsoft.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers
Series app/testpmd: enable testpmd on Windows |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Jie Zhou April 30, 2021, 5:52 p.m. UTC
  Add device event stubs in eal_dev.c for Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/eal/windows/eal_dev.c   | 33 +++++++++++++++++++++++++++++++++
 lib/eal/windows/meson.build |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 lib/eal/windows/eal_dev.c
  

Comments

Tal Shnaiderman May 3, 2021, 5:43 p.m. UTC | #1
> Subject: [PATCH v9 03/10] eal/windows: add device event stubs
> 
> External email: Use caution opening links or attachments
> 
> 
> Add device event stubs in eal_dev.c for Windows
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
>  lib/eal/windows/eal_dev.c   | 33 +++++++++++++++++++++++++++++++++
>  lib/eal/windows/meson.build |  1 +
>  2 files changed, 34 insertions(+)
>  create mode 100644 lib/eal/windows/eal_dev.c
> 
> diff --git a/lib/eal/windows/eal_dev.c b/lib/eal/windows/eal_dev.c new file
> mode 100644 index 000000000..35191056f
> --- /dev/null
> +++ b/lib/eal/windows/eal_dev.c
> @@ -0,0 +1,33 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright(c) 2021 Microsoft Corporation  */
> +
> +#include <rte_dev.h>
> +
> +int
> +rte_dev_event_monitor_start(void)
> +{
> +       RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
> +       return -1;
> +}
> +
> +int
> +rte_dev_event_monitor_stop(void)
> +{
> +       RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
> +       return -1;
> +}
> +
> +int
> +rte_dev_hotplug_handle_enable(void)
> +{
> +       RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
> +       return -1;
> +}
> +
> +int
> +rte_dev_hotplug_handle_disable(void)
> +{
> +       RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
> +       return -1;
> +}
> diff --git a/lib/eal/windows/meson.build b/lib/eal/windows/meson.build
> index ff9cbec41..fc12fefd0 100644
> --- a/lib/eal/windows/meson.build
> +++ b/lib/eal/windows/meson.build
> @@ -7,6 +7,7 @@ sources += files(
>          'eal.c',
>          'eal_alarm.c',
>          'eal_debug.c',
> +        'eal_dev.c',
>          'eal_file.c',
>          'eal_hugepages.c',
>          'eal_interrupts.c',
> --
> 2.30.0.vfs.0.2

Acked-by: Tal Shnaiderman <talshn@nvidia.com>
  

Patch

diff --git a/lib/eal/windows/eal_dev.c b/lib/eal/windows/eal_dev.c
new file mode 100644
index 000000000..35191056f
--- /dev/null
+++ b/lib/eal/windows/eal_dev.c
@@ -0,0 +1,33 @@ 
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2021 Microsoft Corporation
+ */
+
+#include <rte_dev.h>
+
+int
+rte_dev_event_monitor_start(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_event_monitor_stop(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_enable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_disable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
diff --git a/lib/eal/windows/meson.build b/lib/eal/windows/meson.build
index ff9cbec41..fc12fefd0 100644
--- a/lib/eal/windows/meson.build
+++ b/lib/eal/windows/meson.build
@@ -7,6 +7,7 @@  sources += files(
         'eal.c',
         'eal_alarm.c',
         'eal_debug.c',
+        'eal_dev.c',
         'eal_file.c',
         'eal_hugepages.c',
         'eal_interrupts.c',