[v4,1/5] eal: added interrupts empty stubs
diff mbox series

Message ID 20200804062947.6176-2-fady@mellanox.com
State Superseded
Delegated to: Thomas Monjalon
Headers show
Series
  • compiling ethdev lib under windows
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Fady Bader Aug. 4, 2020, 6:29 a.m. UTC
The ethdev lib uses interrupts. Interrupts are not implemented for Windows.
To solve this, empty interrupt stubs were added under Windows.

Signed-off-by: Fady Bader <fady@mellanox.com>
---
 lib/librte_eal/windows/eal_interrupts.c | 17 +++++++++++++++++
 lib/librte_eal/windows/meson.build      |  1 +
 2 files changed, 18 insertions(+)
 create mode 100644 lib/librte_eal/windows/eal_interrupts.c

Comments

Narcisa Ana Maria Vasile Aug. 4, 2020, 6:45 p.m. UTC | #1
On Tue, Aug 04, 2020 at 09:29:43AM +0300, Fady Bader wrote:
> The ethdev lib uses interrupts. Interrupts are not implemented for Windows.
> To solve this, empty interrupt stubs were added under Windows.
> 
> Signed-off-by: Fady Bader <fady@mellanox.com>
> ---
>  lib/librte_eal/windows/eal_interrupts.c | 17 +++++++++++++++++
>  lib/librte_eal/windows/meson.build      |  1 +
>  2 files changed, 18 insertions(+)
>  create mode 100644 lib/librte_eal/windows/eal_interrupts.c
> 
Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>
Dmitry Kozlyuk Aug. 4, 2020, 11:43 p.m. UTC | #2
On Tue,  4 Aug 2020 09:29:43 +0300, Fady Bader wrote:
[snip]
> diff --git a/lib/librte_eal/windows/eal_interrupts.c b/lib/librte_eal/windows/eal_interrupts.c
> new file mode 100644
> index 0000000000..1e3c6d20d2
> --- /dev/null
> +++ b/lib/librte_eal/windows/eal_interrupts.c
> @@ -0,0 +1,17 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright 2020 Mellanox Technologies, Ltd
> + */

Blank line is needed here, like in other files.

> +#include <rte_interrupts.h>
[snip]
> diff --git a/lib/librte_eal/windows/meson.build b/lib/librte_eal/windows/meson.build
> index 08c888e018..c5a19648d6 100644
> --- a/lib/librte_eal/windows/meson.build
> +++ b/lib/librte_eal/windows/meson.build
> @@ -17,6 +17,7 @@ sources += files(
>  	'eal_timer.c',
>  	'fnmatch.c',
>  	'getopt.c',
> +	'eal_interrupts.c',
>  )

Please keep the list sorted.

Patch
diff mbox series

diff --git a/lib/librte_eal/windows/eal_interrupts.c b/lib/librte_eal/windows/eal_interrupts.c
new file mode 100644
index 0000000000..1e3c6d20d2
--- /dev/null
+++ b/lib/librte_eal/windows/eal_interrupts.c
@@ -0,0 +1,17 @@ 
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright 2020 Mellanox Technologies, Ltd
+ */
+#include <rte_interrupts.h>
+
+int
+rte_intr_rx_ctl(struct rte_intr_handle *intr_handle,
+		int epfd, int op, unsigned int vec, void *data)
+{
+	RTE_SET_USED(intr_handle);
+	RTE_SET_USED(epfd);
+	RTE_SET_USED(op);
+	RTE_SET_USED(vec);
+	RTE_SET_USED(data);
+
+	return -ENOTSUP;
+}
diff --git a/lib/librte_eal/windows/meson.build b/lib/librte_eal/windows/meson.build
index 08c888e018..c5a19648d6 100644
--- a/lib/librte_eal/windows/meson.build
+++ b/lib/librte_eal/windows/meson.build
@@ -17,6 +17,7 @@  sources += files(
 	'eal_timer.c',
 	'fnmatch.c',
 	'getopt.c',
+	'eal_interrupts.c',
 )
 
 dpdk_conf.set10('RTE_EAL_NUMA_AWARE_HUGEPAGES', true)