DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] app/test-fib: enable test-fib on Windows
@ 2025-01-04 22:09 Andre Muezerie
  2025-03-05 19:52 ` Medvedkin, Vladimir
  0 siblings, 1 reply; 2+ messages in thread
From: Andre Muezerie @ 2025-01-04 22:09 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: dev, Andre Muezerie

Removed a few includes which were not needed and included
rte_os_shim.h to handle strtok_r which does not exist on
Windows with that exact name.

Signed-off-by: Andre Muezerie <andremue@linux.microsoft.com>
---
 app/test-fib/main.c      | 8 ++++++--
 app/test-fib/meson.build | 6 ------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/app/test-fib/main.c b/app/test-fib/main.c
index 6479f48cdf..dd1a6d7297 100644
--- a/app/test-fib/main.c
+++ b/app/test-fib/main.c
@@ -5,8 +5,6 @@
 #include <getopt.h>
 #include <stdlib.h>
 #include <string.h>
-#include <arpa/inet.h>
-#include <sys/socket.h>
 
 #include <rte_cycles.h>
 #include <rte_errno.h>
@@ -15,9 +13,15 @@
 #include <rte_malloc.h>
 #include <rte_lpm.h>
 #include <rte_lpm6.h>
+#include <rte_os_shim.h>
 #include <rte_fib.h>
 #include <rte_fib6.h>
 
+#ifndef LINE_MAX
+/* On Linux this constant is defined in limits.h, but not on Windows */
+#define LINE_MAX 2048
+#endif
+
 #define	PRINT_USAGE_START	"%s [EAL options] --\n"
 
 #define GET_CB_FIELD(in, fd, base, lim, dlm)	do {		\
diff --git a/app/test-fib/meson.build b/app/test-fib/meson.build
index eb36772cf3..f74ac651c0 100644
--- a/app/test-fib/meson.build
+++ b/app/test-fib/meson.build
@@ -1,11 +1,5 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
-if is_windows
-    build = false
-    reason = 'not supported on Windows'
-    subdir_done()
-endif
-
 sources = files('main.c')
 deps += ['fib', 'lpm', 'net']
-- 
2.47.0.vfs.0.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] app/test-fib: enable test-fib on Windows
  2025-01-04 22:09 [PATCH] app/test-fib: enable test-fib on Windows Andre Muezerie
@ 2025-03-05 19:52 ` Medvedkin, Vladimir
  0 siblings, 0 replies; 2+ messages in thread
From: Medvedkin, Vladimir @ 2025-03-05 19:52 UTC (permalink / raw)
  To: Andre Muezerie; +Cc: dev

Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>

On 04/01/2025 22:09, Andre Muezerie wrote:
> Removed a few includes which were not needed and included
> rte_os_shim.h to handle strtok_r which does not exist on
> Windows with that exact name.
>
> Signed-off-by: Andre Muezerie <andremue@linux.microsoft.com>
> ---
>   app/test-fib/main.c      | 8 ++++++--
>   app/test-fib/meson.build | 6 ------
>   2 files changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/app/test-fib/main.c b/app/test-fib/main.c
> index 6479f48cdf..dd1a6d7297 100644
> --- a/app/test-fib/main.c
> +++ b/app/test-fib/main.c
> @@ -5,8 +5,6 @@
>   #include <getopt.h>
>   #include <stdlib.h>
>   #include <string.h>
> -#include <arpa/inet.h>
> -#include <sys/socket.h>
>   
>   #include <rte_cycles.h>
>   #include <rte_errno.h>
> @@ -15,9 +13,15 @@
>   #include <rte_malloc.h>
>   #include <rte_lpm.h>
>   #include <rte_lpm6.h>
> +#include <rte_os_shim.h>
>   #include <rte_fib.h>
>   #include <rte_fib6.h>
>   
> +#ifndef LINE_MAX
> +/* On Linux this constant is defined in limits.h, but not on Windows */
> +#define LINE_MAX 2048
> +#endif
> +
>   #define	PRINT_USAGE_START	"%s [EAL options] --\n"
>   
>   #define GET_CB_FIELD(in, fd, base, lim, dlm)	do {		\
> diff --git a/app/test-fib/meson.build b/app/test-fib/meson.build
> index eb36772cf3..f74ac651c0 100644
> --- a/app/test-fib/meson.build
> +++ b/app/test-fib/meson.build
> @@ -1,11 +1,5 @@
>   # SPDX-License-Identifier: BSD-3-Clause
>   # Copyright(c) 2019 Intel Corporation
>   
> -if is_windows
> -    build = false
> -    reason = 'not supported on Windows'
> -    subdir_done()
> -endif
> -
>   sources = files('main.c')
>   deps += ['fib', 'lpm', 'net']

-- 
Regards,
Vladimir


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-03-05 19:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-04 22:09 [PATCH] app/test-fib: enable test-fib on Windows Andre Muezerie
2025-03-05 19:52 ` Medvedkin, Vladimir

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).