* Re: [dpdk-dev] [PATCH v3 4/4] net/ixgbe: Add support for Windows
2021-10-02 0:33 ` [dpdk-dev] [PATCH v3 4/4] net/ixgbe: Add support for Windows William Tu
@ 2021-10-01 19:03 ` Dmitry Kozlyuk
0 siblings, 0 replies; 27+ messages in thread
From: Dmitry Kozlyuk @ 2021-10-01 19:03 UTC (permalink / raw)
To: William Tu; +Cc: dev, pallavi.kadam, talshn
Hi William,
Recommended title: "net/ixgbe: build on Windows".
2021-10-01 17:33 (UTC-0700), William Tu:
> This patch enables building the ixgbe driver for Windows.
> It also enables its dependencies on security and cryptodev.
> I tested on AWS using ixgbe VF device, using dpdk-testpmd.
>
> Signed-off-by: William Tu <u9012063@gmail.com>
I'm getting this error when building with MinGW:
../drivers/net/ixgbe/ixgbe_ethdev.c:6416:29: error: ‘IPPROTO_SCTP’
undeclared (first use in this function); did you mean ‘IPPROTO_TCP’?
Can be fixed by defining IPPROTO_SCTP in e.g. ixgbe_osdep.h if not defined.
Note that rte_os_shim.h cannot be used even in ixgbe_ethdev.c, because it
defines `read()` macro, which causes another error:
../drivers/net/ixgbe/ixgbe_ethdev.c:4097:37: error: macro "read"
passed 4 arguments, but takes just 3
4097 | if (mbx->ops.read(hw, &in_msg, 1, 0))
> [...]
> diff --git a/drivers/net/ixgbe/base/meson.build b/drivers/net/ixgbe/base/meson.build
> index 22972c6b56..51a58a3183 100644
> --- a/drivers/net/ixgbe/base/meson.build
> +++ b/drivers/net/ixgbe/base/meson.build
> @@ -28,7 +28,14 @@ foreach flag: error_cflags
> endif
> endforeach
>
> +inc = []
> +inc += include_directories('../../../../lib/net')
> +inc += include_directories('../../../../lib/mbuf')
> +inc += include_directories('../../../../lib/mempool')
> +inc += include_directories('../../../../lib/ring')
> +
> base_lib = static_library('ixgbe_base', sources,
> dependencies: static_rte_eal,
> + include_directories: inc,
> c_args: c_args)
> base_objs = base_lib.extract_all_objects(recursive: true)
Looks messy, you could just do this:
dependencies: [static_rte_eal, static_rte_net]
This works because all drivers/net have a standard dependency on lib/ethdev,
which pulls lib/net in its turn.
^ permalink raw reply [flat|nested] 27+ messages in thread
* [dpdk-dev] [PATCH v3 0/4] net/ixgbe: Add support for Windows
@ 2021-10-02 0:33 William Tu
2021-10-02 0:33 ` [dpdk-dev] [PATCH v3 1/4] security: use the net library for IP structs William Tu
` (4 more replies)
0 siblings, 5 replies; 27+ messages in thread
From: William Tu @ 2021-10-02 0:33 UTC (permalink / raw)
To: dev; +Cc: pallavi.kadam, talshn, Dmitry.Kozliuk
This patch enables building the ixgbe driver for Windows.
It also enables its dependencies on security and cryptodev.
I tested on AWS using ixgbe VF device, using dpdk-testpmd.
Signed-off-by: William Tu <u9012063@gmail.com>
Tal Shnaiderman (3):
security: use the net library for IP structs
security: build on Windows
cryptodev: build on Windows
William Tu (1):
net/ixgbe: Add support for Windows
---
v3:
* I include Tal's patch series due to some fixes.
* apply on master, after commit f1f6ebc0eaf6
("eal: remove sys/queue.h from public headers")
ixgbe needs to add "include <sys/queue.h>"
* For "cryptodev: build on Windows",
need to add "include <sys/queue.h>"
* For "security: build on Windows",
remove unresolved external symbols, reported
by Pallavi at:
http://inbox.dpdk.org/dev/CALDO+SZ-iL4jhcSZPZZKkbY+dTa1OP+dGKZs86iRE6b2pUsvBw@mail.gmail.com/T/#m0160fb800fe8e8d83624f3bdb39a01b7ef9b5f35
v2:
* add dependencies on cryptodev and security
* add #include <rte_ip.h>, instead of doing
#ifndef RTE_EXEC_ENV_WINDOWS
#include <netinet/in.h>
#else
#include <Ws2tcpip.h>
#endif
however, including rte_ip.h requires including another
set of dependent headers, see the
drivers/net/ixgbe/base/meson.build
drivers/net/ixgbe/base/ixgbe_hv_vf.c | 1 +
drivers/net/ixgbe/base/ixgbe_osdep.h | 5 +++++
drivers/net/ixgbe/base/meson.build | 7 +++++++
drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
drivers/net/ixgbe/ixgbe_ethdev.h | 1 +
drivers/net/ixgbe/ixgbe_flow.c | 2 +-
drivers/net/ixgbe/ixgbe_tm.c | 2 +-
drivers/net/ixgbe/meson.build | 6 ------
lib/cryptodev/cryptodev_pmd.c | 2 ++
lib/cryptodev/rte_cryptodev.c | 1 -
lib/cryptodev/version.map | 2 --
lib/meson.build | 2 ++
lib/net/rte_ip.h | 1 +
lib/security/meson.build | 2 +-
lib/security/rte_security.h | 5 +----
lib/security/version.map | 3 ---
16 files changed, 24 insertions(+), 20 deletions(-)
--
2.33.0.windows.2
^ permalink raw reply [flat|nested] 27+ messages in thread
* [dpdk-dev] [PATCH v3 1/4] security: use the net library for IP structs
2021-10-02 0:33 [dpdk-dev] [PATCH v3 0/4] net/ixgbe: Add support for Windows William Tu
@ 2021-10-02 0:33 ` William Tu
2021-10-05 10:52 ` [dpdk-dev] [EXT] " Akhil Goyal
2021-10-02 0:33 ` [dpdk-dev] [PATCH v3 2/4] security: build on Windows William Tu
` (3 subsequent siblings)
4 siblings, 1 reply; 27+ messages in thread
From: William Tu @ 2021-10-02 0:33 UTC (permalink / raw)
To: dev; +Cc: pallavi.kadam, talshn, Dmitry.Kozliuk
From: Tal Shnaiderman <talshn@nvidia.com>
Remove the netinet includes and replaces them
with rte_ip.h to support the in_addr/in6_addr structs
on all operating systems.
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: William Tu <u9012063@gmail.com>
---
lib/net/rte_ip.h | 1 +
lib/security/meson.build | 2 +-
lib/security/rte_security.h | 5 +----
3 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/lib/net/rte_ip.h b/lib/net/rte_ip.h
index 05948b69b7..bbd8650962 100644
--- a/lib/net/rte_ip.h
+++ b/lib/net/rte_ip.h
@@ -25,6 +25,7 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netinet/ip.h>
+#include <netinet/ip6.h>
#endif
#include <rte_byteorder.h>
diff --git a/lib/security/meson.build b/lib/security/meson.build
index 5679c8b5c2..1034a7a299 100644
--- a/lib/security/meson.build
+++ b/lib/security/meson.build
@@ -3,4 +3,4 @@
sources = files('rte_security.c')
headers = files('rte_security.h', 'rte_security_driver.h')
-deps += ['mempool', 'cryptodev']
+deps += ['mempool', 'cryptodev', 'net']
diff --git a/lib/security/rte_security.h b/lib/security/rte_security.h
index a10c9b5f00..2013e65e49 100644
--- a/lib/security/rte_security.h
+++ b/lib/security/rte_security.h
@@ -19,13 +19,10 @@ extern "C" {
#include <sys/types.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <netinet/ip6.h>
-
#include <rte_compat.h>
#include <rte_common.h>
#include <rte_crypto.h>
+#include <rte_ip.h>
#include <rte_mbuf.h>
#include <rte_mbuf_dyn.h>
#include <rte_memory.h>
--
2.33.0.windows.2
^ permalink raw reply [flat|nested] 27+ messages in thread
* [dpdk-dev] [PATCH v3 2/4] security: build on Windows
2021-10-02 0:33 [dpdk-dev] [PATCH v3 0/4] net/ixgbe: Add support for Windows William Tu
2021-10-02 0:33 ` [dpdk-dev] [PATCH v3 1/4] security: use the net library for IP structs William Tu
@ 2021-10-02 0:33 ` William Tu
2021-10-05 10:53 ` [dpdk-dev] [EXT] " Akhil Goyal
2021-10-02 0:33 ` [dpdk-dev] [PATCH v3 3/4] cryptodev: " William Tu
` (2 subsequent siblings)
4 siblings, 1 reply; 27+ messages in thread
From: William Tu @ 2021-10-02 0:33 UTC (permalink / raw)
To: dev; +Cc: pallavi.kadam, talshn, Dmitry.Kozliuk
From: Tal Shnaiderman <talshn@nvidia.com>
Build the security library on Windows.
Remove unneeded export from version file.
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: William Tu <u9012063@gmail.com>
---
lib/meson.build | 1 +
lib/security/version.map | 3 ---
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/lib/meson.build b/lib/meson.build
index 1673ca4323..95b0ea41c4 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -85,6 +85,7 @@ if is_windows
'gso',
'latencystats',
'pdump',
+ 'security',
] # only supported libraries for windows
endif
diff --git a/lib/security/version.map b/lib/security/version.map
index b377be602a..a1f46bfd27 100644
--- a/lib/security/version.map
+++ b/lib/security/version.map
@@ -1,13 +1,11 @@
DPDK_22 {
global:
- rte_security_attach_session;
rte_security_capabilities_get;
rte_security_capability_get;
rte_security_session_create;
rte_security_session_destroy;
rte_security_session_get_size;
- rte_security_set_pkt_metadata;
local: *;
};
@@ -19,7 +17,6 @@ EXPERIMENTAL {
__rte_security_set_pkt_metadata;
rte_security_dynfield_offset;
rte_security_dynfield_register;
- rte_security_get_userdata;
rte_security_session_stats_get;
rte_security_session_update;
};
--
2.33.0.windows.2
^ permalink raw reply [flat|nested] 27+ messages in thread
* [dpdk-dev] [PATCH v3 3/4] cryptodev: build on Windows
2021-10-02 0:33 [dpdk-dev] [PATCH v3 0/4] net/ixgbe: Add support for Windows William Tu
2021-10-02 0:33 ` [dpdk-dev] [PATCH v3 1/4] security: use the net library for IP structs William Tu
2021-10-02 0:33 ` [dpdk-dev] [PATCH v3 2/4] security: build on Windows William Tu
@ 2021-10-02 0:33 ` William Tu
2021-10-05 10:53 ` [dpdk-dev] [EXT] " Akhil Goyal
2021-10-02 0:33 ` [dpdk-dev] [PATCH v3 4/4] net/ixgbe: Add support for Windows William Tu
2021-10-05 17:02 ` [dpdk-dev] [PATCH v4 0/4] net/ixgbe: build on Windows William Tu
4 siblings, 1 reply; 27+ messages in thread
From: William Tu @ 2021-10-02 0:33 UTC (permalink / raw)
To: dev; +Cc: pallavi.kadam, talshn, Dmitry.Kozliuk
From: Tal Shnaiderman <talshn@nvidia.com>
Build the cryptography device library on Windows OS
by removing unneeded include and exports blocking the
compilation.
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: William Tu <u9012063@gmail.com>
---
lib/cryptodev/cryptodev_pmd.c | 2 ++
lib/cryptodev/rte_cryptodev.c | 1 -
lib/cryptodev/version.map | 2 --
lib/meson.build | 1 +
4 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/cryptodev/cryptodev_pmd.c b/lib/cryptodev/cryptodev_pmd.c
index 71e34140cd..44a70ecb35 100644
--- a/lib/cryptodev/cryptodev_pmd.c
+++ b/lib/cryptodev/cryptodev_pmd.c
@@ -2,6 +2,8 @@
* Copyright(c) 2017 Intel Corporation
*/
+#include <sys/queue.h>
+
#include <rte_string_fns.h>
#include <rte_malloc.h>
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 9fa3aff1d3..b913c434c5 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -12,7 +12,6 @@
#include <errno.h>
#include <stdint.h>
#include <inttypes.h>
-#include <netinet/in.h>
#include <rte_byteorder.h>
#include <rte_log.h>
diff --git a/lib/cryptodev/version.map b/lib/cryptodev/version.map
index 8294c9f64f..43cf937e40 100644
--- a/lib/cryptodev/version.map
+++ b/lib/cryptodev/version.map
@@ -93,10 +93,8 @@ EXPERIMENTAL {
# added in 20.11
rte_cryptodev_configure_raw_dp_ctx;
rte_cryptodev_get_raw_dp_ctx_size;
- rte_cryptodev_raw_dequeue;
rte_cryptodev_raw_dequeue_burst;
rte_cryptodev_raw_dequeue_done;
- rte_cryptodev_raw_enqueue;
rte_cryptodev_raw_enqueue_burst;
rte_cryptodev_raw_enqueue_done;
diff --git a/lib/meson.build b/lib/meson.build
index 95b0ea41c4..e5f0094a82 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -80,6 +80,7 @@ if is_windows
'hash',
'timer',
'bitratestats',
+ 'cryptodev',
'cfgfile',
'gro',
'gso',
--
2.33.0.windows.2
^ permalink raw reply [flat|nested] 27+ messages in thread
* [dpdk-dev] [PATCH v3 4/4] net/ixgbe: Add support for Windows
2021-10-02 0:33 [dpdk-dev] [PATCH v3 0/4] net/ixgbe: Add support for Windows William Tu
` (2 preceding siblings ...)
2021-10-02 0:33 ` [dpdk-dev] [PATCH v3 3/4] cryptodev: " William Tu
@ 2021-10-02 0:33 ` William Tu
2021-10-01 19:03 ` Dmitry Kozlyuk
2021-10-05 17:02 ` [dpdk-dev] [PATCH v4 0/4] net/ixgbe: build on Windows William Tu
4 siblings, 1 reply; 27+ messages in thread
From: William Tu @ 2021-10-02 0:33 UTC (permalink / raw)
To: dev; +Cc: pallavi.kadam, talshn, Dmitry.Kozliuk
This patch enables building the ixgbe driver for Windows.
It also enables its dependencies on security and cryptodev.
I tested on AWS using ixgbe VF device, using dpdk-testpmd.
Signed-off-by: William Tu <u9012063@gmail.com>
---
drivers/net/ixgbe/base/ixgbe_hv_vf.c | 1 +
drivers/net/ixgbe/base/ixgbe_osdep.h | 5 +++++
drivers/net/ixgbe/base/meson.build | 7 +++++++
drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
drivers/net/ixgbe/ixgbe_ethdev.h | 1 +
drivers/net/ixgbe/ixgbe_flow.c | 2 +-
drivers/net/ixgbe/ixgbe_tm.c | 2 +-
drivers/net/ixgbe/meson.build | 6 ------
8 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ixgbe/base/ixgbe_hv_vf.c b/drivers/net/ixgbe/base/ixgbe_hv_vf.c
index b7ad44ab8c..4572411d39 100644
--- a/drivers/net/ixgbe/base/ixgbe_hv_vf.c
+++ b/drivers/net/ixgbe/base/ixgbe_hv_vf.c
@@ -4,6 +4,7 @@
#include "ixgbe_vf.h"
#include "ixgbe_hv_vf.h"
+#include "ixgbe_osdep.h"
/**
* Hyper-V variant - just a stub.
diff --git a/drivers/net/ixgbe/base/ixgbe_osdep.h b/drivers/net/ixgbe/base/ixgbe_osdep.h
index cacf724198..2c44e7bf35 100644
--- a/drivers/net/ixgbe/base/ixgbe_osdep.h
+++ b/drivers/net/ixgbe/base/ixgbe_osdep.h
@@ -16,6 +16,7 @@
#include <rte_log.h>
#include <rte_byteorder.h>
#include <rte_io.h>
+#include <rte_ip.h>
#include "../ixgbe_logs.h"
#include "../ixgbe_bypass_defines.h"
@@ -43,12 +44,16 @@
#define false 0
#define true 1
+#ifndef RTE_EXEC_ENV_WINDOWS
#define min(a,b) RTE_MIN(a,b)
+#endif
#define EWARN(hw, S, args...) DEBUGOUT1(S, ##args)
/* Bunch of defines for shared code bogosity */
+#ifndef UNREFERENCED_PARAMETER
#define UNREFERENCED_PARAMETER(_p)
+#endif
#define UNREFERENCED_1PARAMETER(_p)
#define UNREFERENCED_2PARAMETER(_p, _q)
#define UNREFERENCED_3PARAMETER(_p, _q, _r)
diff --git a/drivers/net/ixgbe/base/meson.build b/drivers/net/ixgbe/base/meson.build
index 22972c6b56..51a58a3183 100644
--- a/drivers/net/ixgbe/base/meson.build
+++ b/drivers/net/ixgbe/base/meson.build
@@ -28,7 +28,14 @@ foreach flag: error_cflags
endif
endforeach
+inc = []
+inc += include_directories('../../../../lib/net')
+inc += include_directories('../../../../lib/mbuf')
+inc += include_directories('../../../../lib/mempool')
+inc += include_directories('../../../../lib/ring')
+
base_lib = static_library('ixgbe_base', sources,
dependencies: static_rte_eal,
+ include_directories: inc,
c_args: c_args)
base_objs = base_lib.extract_all_objects(recursive: true)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 47693c0c47..8b33897ca1 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -10,7 +10,6 @@
#include <unistd.h>
#include <stdarg.h>
#include <inttypes.h>
-#include <netinet/in.h>
#include <rte_string_fns.h>
#include <rte_byteorder.h>
#include <rte_common.h>
@@ -46,6 +45,7 @@
#include "ixgbe_rxtx.h"
#include "base/ixgbe_type.h"
#include "base/ixgbe_phy.h"
+#include "base/ixgbe_osdep.h"
#include "ixgbe_regs.h"
/*
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
index a0ce18ca24..645207e130 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -6,6 +6,7 @@
#define _IXGBE_ETHDEV_H_
#include <stdint.h>
+#include <sys/queue.h>
#include "base/ixgbe_type.h"
#include "base/ixgbe_dcb.h"
diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index 511b612f7f..27322ab903 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -10,7 +10,6 @@
#include <unistd.h>
#include <stdarg.h>
#include <inttypes.h>
-#include <netinet/in.h>
#include <rte_byteorder.h>
#include <rte_common.h>
#include <rte_cycles.h>
@@ -37,6 +36,7 @@
#include "base/ixgbe_api.h"
#include "base/ixgbe_vf.h"
#include "base/ixgbe_common.h"
+#include "base/ixgbe_osdep.h"
#include "ixgbe_ethdev.h"
#include "ixgbe_bypass.h"
#include "ixgbe_rxtx.h"
diff --git a/drivers/net/ixgbe/ixgbe_tm.c b/drivers/net/ixgbe/ixgbe_tm.c
index a8407e742e..ae03ea6e9d 100644
--- a/drivers/net/ixgbe/ixgbe_tm.c
+++ b/drivers/net/ixgbe/ixgbe_tm.c
@@ -665,7 +665,7 @@ ixgbe_node_add(struct rte_eth_dev *dev, uint32_t node_id,
}
/* check level */
if (level_id != RTE_TM_NODE_LEVEL_ID_ANY &&
- level_id != parent_node_type + 1) {
+ level_id != (uint32_t)parent_node_type + 1) {
error->type = RTE_TM_ERROR_TYPE_NODE_PARAMS;
error->message = "Wrong level";
return -EINVAL;
diff --git a/drivers/net/ixgbe/meson.build b/drivers/net/ixgbe/meson.build
index 55ac91fcd1..4b18e47273 100644
--- a/drivers/net/ixgbe/meson.build
+++ b/drivers/net/ixgbe/meson.build
@@ -1,12 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-if is_windows
- build = false
- reason = 'not supported on Windows'
- subdir_done()
-endif
-
cflags += ['-DRTE_LIBRTE_IXGBE_BYPASS']
subdir('base')
--
2.33.0.windows.2
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [dpdk-dev] [EXT] [PATCH v3 1/4] security: use the net library for IP structs
2021-10-02 0:33 ` [dpdk-dev] [PATCH v3 1/4] security: use the net library for IP structs William Tu
@ 2021-10-05 10:52 ` Akhil Goyal
0 siblings, 0 replies; 27+ messages in thread
From: Akhil Goyal @ 2021-10-05 10:52 UTC (permalink / raw)
To: William Tu, dev; +Cc: pallavi.kadam, talshn, Dmitry.Kozliuk
> From: Tal Shnaiderman <talshn@nvidia.com>
>
> Remove the netinet includes and replaces them
> with rte_ip.h to support the in_addr/in6_addr structs
> on all operating systems.
>
> Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
> Acked-by: William Tu <u9012063@gmail.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [dpdk-dev] [EXT] [PATCH v3 2/4] security: build on Windows
2021-10-02 0:33 ` [dpdk-dev] [PATCH v3 2/4] security: build on Windows William Tu
@ 2021-10-05 10:53 ` Akhil Goyal
0 siblings, 0 replies; 27+ messages in thread
From: Akhil Goyal @ 2021-10-05 10:53 UTC (permalink / raw)
To: William Tu, dev; +Cc: pallavi.kadam, talshn, Dmitry.Kozliuk
> From: Tal Shnaiderman <talshn@nvidia.com>
>
> Build the security library on Windows.
>
> Remove unneeded export from version file.
>
> Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
> Acked-by: William Tu <u9012063@gmail.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [dpdk-dev] [EXT] [PATCH v3 3/4] cryptodev: build on Windows
2021-10-02 0:33 ` [dpdk-dev] [PATCH v3 3/4] cryptodev: " William Tu
@ 2021-10-05 10:53 ` Akhil Goyal
0 siblings, 0 replies; 27+ messages in thread
From: Akhil Goyal @ 2021-10-05 10:53 UTC (permalink / raw)
To: William Tu, dev; +Cc: pallavi.kadam, talshn, Dmitry.Kozliuk
> From: Tal Shnaiderman <talshn@nvidia.com>
>
> Build the cryptography device library on Windows OS
> by removing unneeded include and exports blocking the
> compilation.
>
> Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
> Acked-by: William Tu <u9012063@gmail.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
^ permalink raw reply [flat|nested] 27+ messages in thread
* [dpdk-dev] [PATCH v4 0/4] net/ixgbe: build on Windows
2021-10-02 0:33 [dpdk-dev] [PATCH v3 0/4] net/ixgbe: Add support for Windows William Tu
` (3 preceding siblings ...)
2021-10-02 0:33 ` [dpdk-dev] [PATCH v3 4/4] net/ixgbe: Add support for Windows William Tu
@ 2021-10-05 17:02 ` William Tu
2021-10-05 17:02 ` [dpdk-dev] [PATCH v4 1/4] security: use the net library for IP structs William Tu
` (5 more replies)
4 siblings, 6 replies; 27+ messages in thread
From: William Tu @ 2021-10-05 17:02 UTC (permalink / raw)
To: dev; +Cc: Dmitry.Kozliuk
This patch enables building the ixgbe driver for Windows.
It also enables its dependencies on security and cryptodev.
I tested on AWS using ixgbe VF device, using dpdk-testpmd.
Tal Shnaiderman (3):
security: use the net library for IP structs
security: build on Windows
cryptodev: build on Windows
William Tu (1):
net/ixgbe: build on Windows
---
v4:
* fix mingw build by defining the IPPROTO_SCTP if needed
* simplify the meson file
* change patch title, rebase to main
v3:
* I include Tal's patch series due to some fixes.
* apply on master, after commit f1f6ebc0eaf6
("eal: remove sys/queue.h from public headers")
ixgbe needs to add "include <sys/queue.h>"
* For "cryptodev: build on Windows",
need to add "include <sys/queue.h>"
* For "security: build on Windows",
remove unresolved external symbols, reported
by Pallavi at:
http://inbox.dpdk.org/dev/CALDO+SZ-iL4jhcSZPZZKkbY+dTa1OP+dGKZs86iRE6b2pUsvBw@mail.gmail.com/T/#m0160fb800fe8e8d83624f3bdb39a01b7ef9b5f35
v2:
* add dependencies on cryptodev and security
* add #include <rte_ip.h>, instead of doing
#ifndef RTE_EXEC_ENV_WINDOWS
#include <netinet/in.h>
#else
#include <Ws2tcpip.h>
#endif
however, including rte_ip.h requires including another
set of dependent headers, see the
drivers/net/ixgbe/base/meson.build
drivers/net/ixgbe/base/ixgbe_hv_vf.c | 1 +
drivers/net/ixgbe/base/ixgbe_osdep.h | 9 +++++++++
drivers/net/ixgbe/base/meson.build | 2 +-
drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
drivers/net/ixgbe/ixgbe_ethdev.h | 1 +
drivers/net/ixgbe/ixgbe_flow.c | 2 +-
drivers/net/ixgbe/ixgbe_tm.c | 2 +-
drivers/net/ixgbe/meson.build | 6 ------
lib/cryptodev/cryptodev_pmd.c | 2 ++
lib/cryptodev/rte_cryptodev.c | 1 -
lib/cryptodev/version.map | 2 --
lib/meson.build | 2 ++
lib/net/rte_ip.h | 1 +
lib/security/meson.build | 2 +-
lib/security/rte_security.h | 5 +----
lib/security/version.map | 3 ---
16 files changed, 22 insertions(+), 21 deletions(-)
--
2.33.0.windows.2
^ permalink raw reply [flat|nested] 27+ messages in thread
* [dpdk-dev] [PATCH v4 1/4] security: use the net library for IP structs
2021-10-05 17:02 ` [dpdk-dev] [PATCH v4 0/4] net/ixgbe: build on Windows William Tu
@ 2021-10-05 17:02 ` William Tu
2021-10-05 17:02 ` [dpdk-dev] [PATCH v4 2/4] security: build on Windows William Tu
` (4 subsequent siblings)
5 siblings, 0 replies; 27+ messages in thread
From: William Tu @ 2021-10-05 17:02 UTC (permalink / raw)
To: dev; +Cc: Tal Shnaiderman, Dmitry.Kozliuk, Akhil Goyal
From: Tal Shnaiderman <talshn@nvidia.com>
Remove the netinet includes and replaces them
with rte_ip.h to support the in_addr/in6_addr structs
on all operating systems.
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: William Tu <u9012063@gmail.com>
---
lib/net/rte_ip.h | 1 +
lib/security/meson.build | 2 +-
lib/security/rte_security.h | 5 +----
3 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/lib/net/rte_ip.h b/lib/net/rte_ip.h
index 05948b69b7..bbd8650962 100644
--- a/lib/net/rte_ip.h
+++ b/lib/net/rte_ip.h
@@ -25,6 +25,7 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netinet/ip.h>
+#include <netinet/ip6.h>
#endif
#include <rte_byteorder.h>
diff --git a/lib/security/meson.build b/lib/security/meson.build
index 5679c8b5c2..1034a7a299 100644
--- a/lib/security/meson.build
+++ b/lib/security/meson.build
@@ -3,4 +3,4 @@
sources = files('rte_security.c')
headers = files('rte_security.h', 'rte_security_driver.h')
-deps += ['mempool', 'cryptodev']
+deps += ['mempool', 'cryptodev', 'net']
diff --git a/lib/security/rte_security.h b/lib/security/rte_security.h
index a10c9b5f00..2013e65e49 100644
--- a/lib/security/rte_security.h
+++ b/lib/security/rte_security.h
@@ -19,13 +19,10 @@ extern "C" {
#include <sys/types.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <netinet/ip6.h>
-
#include <rte_compat.h>
#include <rte_common.h>
#include <rte_crypto.h>
+#include <rte_ip.h>
#include <rte_mbuf.h>
#include <rte_mbuf_dyn.h>
#include <rte_memory.h>
--
2.33.0.windows.2
^ permalink raw reply [flat|nested] 27+ messages in thread
* [dpdk-dev] [PATCH v4 2/4] security: build on Windows
2021-10-05 17:02 ` [dpdk-dev] [PATCH v4 0/4] net/ixgbe: build on Windows William Tu
2021-10-05 17:02 ` [dpdk-dev] [PATCH v4 1/4] security: use the net library for IP structs William Tu
@ 2021-10-05 17:02 ` William Tu
2021-10-05 17:02 ` [dpdk-dev] [PATCH v4 3/4] cryptodev: " William Tu
` (3 subsequent siblings)
5 siblings, 0 replies; 27+ messages in thread
From: William Tu @ 2021-10-05 17:02 UTC (permalink / raw)
To: dev; +Cc: Tal Shnaiderman, Dmitry.Kozliuk, Akhil Goyal
From: Tal Shnaiderman <talshn@nvidia.com>
Build the security library on Windows.
Remove unneeded export from version file.
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: William Tu <u9012063@gmail.com>
---
lib/meson.build | 1 +
lib/security/version.map | 3 ---
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/lib/meson.build b/lib/meson.build
index 9c4841fe40..8183dd92da 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -86,6 +86,7 @@ if is_windows
'latencystats',
'pdump',
'stack',
+ 'security',
] # only supported libraries for windows
endif
diff --git a/lib/security/version.map b/lib/security/version.map
index b377be602a..a1f46bfd27 100644
--- a/lib/security/version.map
+++ b/lib/security/version.map
@@ -1,13 +1,11 @@
DPDK_22 {
global:
- rte_security_attach_session;
rte_security_capabilities_get;
rte_security_capability_get;
rte_security_session_create;
rte_security_session_destroy;
rte_security_session_get_size;
- rte_security_set_pkt_metadata;
local: *;
};
@@ -19,7 +17,6 @@ EXPERIMENTAL {
__rte_security_set_pkt_metadata;
rte_security_dynfield_offset;
rte_security_dynfield_register;
- rte_security_get_userdata;
rte_security_session_stats_get;
rte_security_session_update;
};
--
2.33.0.windows.2
^ permalink raw reply [flat|nested] 27+ messages in thread
* [dpdk-dev] [PATCH v4 3/4] cryptodev: build on Windows
2021-10-05 17:02 ` [dpdk-dev] [PATCH v4 0/4] net/ixgbe: build on Windows William Tu
2021-10-05 17:02 ` [dpdk-dev] [PATCH v4 1/4] security: use the net library for IP structs William Tu
2021-10-05 17:02 ` [dpdk-dev] [PATCH v4 2/4] security: build on Windows William Tu
@ 2021-10-05 17:02 ` William Tu
2021-10-05 17:02 ` [dpdk-dev] [PATCH v4 4/4] net/ixgbe: " William Tu
` (2 subsequent siblings)
5 siblings, 0 replies; 27+ messages in thread
From: William Tu @ 2021-10-05 17:02 UTC (permalink / raw)
To: dev; +Cc: Tal Shnaiderman, Dmitry.Kozliuk, Akhil Goyal
From: Tal Shnaiderman <talshn@nvidia.com>
Build the cryptography device library on Windows OS
by removing unneeded include and exports blocking the
compilation.
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: William Tu <u9012063@gmail.com>
---
lib/cryptodev/cryptodev_pmd.c | 2 ++
lib/cryptodev/rte_cryptodev.c | 1 -
lib/cryptodev/version.map | 2 --
lib/meson.build | 1 +
4 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/cryptodev/cryptodev_pmd.c b/lib/cryptodev/cryptodev_pmd.c
index 71e34140cd..44a70ecb35 100644
--- a/lib/cryptodev/cryptodev_pmd.c
+++ b/lib/cryptodev/cryptodev_pmd.c
@@ -2,6 +2,8 @@
* Copyright(c) 2017 Intel Corporation
*/
+#include <sys/queue.h>
+
#include <rte_string_fns.h>
#include <rte_malloc.h>
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 9fa3aff1d3..b913c434c5 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -12,7 +12,6 @@
#include <errno.h>
#include <stdint.h>
#include <inttypes.h>
-#include <netinet/in.h>
#include <rte_byteorder.h>
#include <rte_log.h>
diff --git a/lib/cryptodev/version.map b/lib/cryptodev/version.map
index 8294c9f64f..43cf937e40 100644
--- a/lib/cryptodev/version.map
+++ b/lib/cryptodev/version.map
@@ -93,10 +93,8 @@ EXPERIMENTAL {
# added in 20.11
rte_cryptodev_configure_raw_dp_ctx;
rte_cryptodev_get_raw_dp_ctx_size;
- rte_cryptodev_raw_dequeue;
rte_cryptodev_raw_dequeue_burst;
rte_cryptodev_raw_dequeue_done;
- rte_cryptodev_raw_enqueue;
rte_cryptodev_raw_enqueue_burst;
rte_cryptodev_raw_enqueue_done;
diff --git a/lib/meson.build b/lib/meson.build
index 8183dd92da..b2ba7258d8 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -80,6 +80,7 @@ if is_windows
'hash',
'timer',
'bitratestats',
+ 'cryptodev',
'cfgfile',
'gro',
'gso',
--
2.33.0.windows.2
^ permalink raw reply [flat|nested] 27+ messages in thread
* [dpdk-dev] [PATCH v4 4/4] net/ixgbe: build on Windows
2021-10-05 17:02 ` [dpdk-dev] [PATCH v4 0/4] net/ixgbe: build on Windows William Tu
` (2 preceding siblings ...)
2021-10-05 17:02 ` [dpdk-dev] [PATCH v4 3/4] cryptodev: " William Tu
@ 2021-10-05 17:02 ` William Tu
2021-10-05 22:52 ` Dmitry Kozlyuk
2021-10-06 5:32 ` Kadam, Pallavi
2021-10-06 12:09 ` [dpdk-dev] [PATCH v4 0/4] " David Marchand
2021-10-06 22:35 ` William Tu
5 siblings, 2 replies; 27+ messages in thread
From: William Tu @ 2021-10-05 17:02 UTC (permalink / raw)
To: dev; +Cc: Dmitry.Kozliuk, pallavi.kadam
This patch enables building the ixgbe driver for Windows.
It also enables its dependencies on security and cryptodev.
I tested on AWS using ixgbe VF device, using dpdk-testpmd.
Signed-off-by: William Tu <u9012063@gmail.com>
---
drivers/net/ixgbe/base/ixgbe_hv_vf.c | 1 +
drivers/net/ixgbe/base/ixgbe_osdep.h | 9 +++++++++
drivers/net/ixgbe/base/meson.build | 2 +-
drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
drivers/net/ixgbe/ixgbe_ethdev.h | 1 +
drivers/net/ixgbe/ixgbe_flow.c | 2 +-
drivers/net/ixgbe/ixgbe_tm.c | 2 +-
drivers/net/ixgbe/meson.build | 6 ------
8 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ixgbe/base/ixgbe_hv_vf.c b/drivers/net/ixgbe/base/ixgbe_hv_vf.c
index b7ad44ab8c..4572411d39 100644
--- a/drivers/net/ixgbe/base/ixgbe_hv_vf.c
+++ b/drivers/net/ixgbe/base/ixgbe_hv_vf.c
@@ -4,6 +4,7 @@
#include "ixgbe_vf.h"
#include "ixgbe_hv_vf.h"
+#include "ixgbe_osdep.h"
/**
* Hyper-V variant - just a stub.
diff --git a/drivers/net/ixgbe/base/ixgbe_osdep.h b/drivers/net/ixgbe/base/ixgbe_osdep.h
index cacf724198..6c25f608b1 100644
--- a/drivers/net/ixgbe/base/ixgbe_osdep.h
+++ b/drivers/net/ixgbe/base/ixgbe_osdep.h
@@ -16,10 +16,15 @@
#include <rte_log.h>
#include <rte_byteorder.h>
#include <rte_io.h>
+#include <rte_ip.h>
#include "../ixgbe_logs.h"
#include "../ixgbe_bypass_defines.h"
+#ifndef IPPROTO_SCTP
+#define IPPROTO_SCTP 132
+#endif
+
#define ASSERT(x) if(!(x)) rte_panic("IXGBE: x")
#define DELAY(x) rte_delay_us_sleep(x)
@@ -43,12 +48,16 @@
#define false 0
#define true 1
+#ifndef RTE_EXEC_ENV_WINDOWS
#define min(a,b) RTE_MIN(a,b)
+#endif
#define EWARN(hw, S, args...) DEBUGOUT1(S, ##args)
/* Bunch of defines for shared code bogosity */
+#ifndef UNREFERENCED_PARAMETER
#define UNREFERENCED_PARAMETER(_p)
+#endif
#define UNREFERENCED_1PARAMETER(_p)
#define UNREFERENCED_2PARAMETER(_p, _q)
#define UNREFERENCED_3PARAMETER(_p, _q, _r)
diff --git a/drivers/net/ixgbe/base/meson.build b/drivers/net/ixgbe/base/meson.build
index 22972c6b56..f6497014da 100644
--- a/drivers/net/ixgbe/base/meson.build
+++ b/drivers/net/ixgbe/base/meson.build
@@ -29,6 +29,6 @@ foreach flag: error_cflags
endforeach
base_lib = static_library('ixgbe_base', sources,
- dependencies: static_rte_eal,
+ dependencies: [static_rte_eal, static_rte_net],
c_args: c_args)
base_objs = base_lib.extract_all_objects(recursive: true)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 47693c0c47..8b33897ca1 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -10,7 +10,6 @@
#include <unistd.h>
#include <stdarg.h>
#include <inttypes.h>
-#include <netinet/in.h>
#include <rte_string_fns.h>
#include <rte_byteorder.h>
#include <rte_common.h>
@@ -46,6 +45,7 @@
#include "ixgbe_rxtx.h"
#include "base/ixgbe_type.h"
#include "base/ixgbe_phy.h"
+#include "base/ixgbe_osdep.h"
#include "ixgbe_regs.h"
/*
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
index a0ce18ca24..645207e130 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -6,6 +6,7 @@
#define _IXGBE_ETHDEV_H_
#include <stdint.h>
+#include <sys/queue.h>
#include "base/ixgbe_type.h"
#include "base/ixgbe_dcb.h"
diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index 511b612f7f..27322ab903 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -10,7 +10,6 @@
#include <unistd.h>
#include <stdarg.h>
#include <inttypes.h>
-#include <netinet/in.h>
#include <rte_byteorder.h>
#include <rte_common.h>
#include <rte_cycles.h>
@@ -37,6 +36,7 @@
#include "base/ixgbe_api.h"
#include "base/ixgbe_vf.h"
#include "base/ixgbe_common.h"
+#include "base/ixgbe_osdep.h"
#include "ixgbe_ethdev.h"
#include "ixgbe_bypass.h"
#include "ixgbe_rxtx.h"
diff --git a/drivers/net/ixgbe/ixgbe_tm.c b/drivers/net/ixgbe/ixgbe_tm.c
index a8407e742e..ae03ea6e9d 100644
--- a/drivers/net/ixgbe/ixgbe_tm.c
+++ b/drivers/net/ixgbe/ixgbe_tm.c
@@ -665,7 +665,7 @@ ixgbe_node_add(struct rte_eth_dev *dev, uint32_t node_id,
}
/* check level */
if (level_id != RTE_TM_NODE_LEVEL_ID_ANY &&
- level_id != parent_node_type + 1) {
+ level_id != (uint32_t)parent_node_type + 1) {
error->type = RTE_TM_ERROR_TYPE_NODE_PARAMS;
error->message = "Wrong level";
return -EINVAL;
diff --git a/drivers/net/ixgbe/meson.build b/drivers/net/ixgbe/meson.build
index 55ac91fcd1..4b18e47273 100644
--- a/drivers/net/ixgbe/meson.build
+++ b/drivers/net/ixgbe/meson.build
@@ -1,12 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-if is_windows
- build = false
- reason = 'not supported on Windows'
- subdir_done()
-endif
-
cflags += ['-DRTE_LIBRTE_IXGBE_BYPASS']
subdir('base')
--
2.33.0.windows.2
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [dpdk-dev] [PATCH v4 4/4] net/ixgbe: build on Windows
2021-10-05 17:02 ` [dpdk-dev] [PATCH v4 4/4] net/ixgbe: " William Tu
@ 2021-10-05 22:52 ` Dmitry Kozlyuk
2021-10-06 5:32 ` Kadam, Pallavi
1 sibling, 0 replies; 27+ messages in thread
From: Dmitry Kozlyuk @ 2021-10-05 22:52 UTC (permalink / raw)
To: William Tu; +Cc: dev, pallavi.kadam
2021-10-05 17:02 (UTC+0000), William Tu:
> This patch enables building the ixgbe driver for Windows.
> It also enables its dependencies on security and cryptodev.
> I tested on AWS using ixgbe VF device, using dpdk-testpmd.
>
> Signed-off-by: William Tu <u9012063@gmail.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [dpdk-dev] [PATCH v4 4/4] net/ixgbe: build on Windows
2021-10-05 17:02 ` [dpdk-dev] [PATCH v4 4/4] net/ixgbe: " William Tu
2021-10-05 22:52 ` Dmitry Kozlyuk
@ 2021-10-06 5:32 ` Kadam, Pallavi
2021-10-06 21:26 ` William Tu
1 sibling, 1 reply; 27+ messages in thread
From: Kadam, Pallavi @ 2021-10-06 5:32 UTC (permalink / raw)
To: William Tu, dev; +Cc: Dmitry.Kozliuk
On 10/5/2021 10:02 AM, William Tu wrote:
> This patch enables building the ixgbe driver for Windows.
> It also enables its dependencies on security and cryptodev.
> I tested on AWS using ixgbe VF device, using dpdk-testpmd.
>
> Signed-off-by: William Tu <u9012063@gmail.com>
> ---
should we mention the added support in the release notes?
Otherwise,
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [dpdk-dev] [PATCH v4 0/4] net/ixgbe: build on Windows
2021-10-05 17:02 ` [dpdk-dev] [PATCH v4 0/4] net/ixgbe: build on Windows William Tu
` (3 preceding siblings ...)
2021-10-05 17:02 ` [dpdk-dev] [PATCH v4 4/4] net/ixgbe: " William Tu
@ 2021-10-06 12:09 ` David Marchand
2021-10-06 21:48 ` William Tu
2021-10-06 22:35 ` William Tu
5 siblings, 1 reply; 27+ messages in thread
From: David Marchand @ 2021-10-06 12:09 UTC (permalink / raw)
To: William Tu; +Cc: dev, Dmitry Kozlyuk, Pallavi Kadam
Hello William,
On Tue, Oct 5, 2021 at 7:03 PM William Tu <u9012063@gmail.com> wrote:
>
> This patch enables building the ixgbe driver for Windows.
> It also enables its dependencies on security and cryptodev.
> I tested on AWS using ixgbe VF device, using dpdk-testpmd.
>
> Tal Shnaiderman (3):
> security: use the net library for IP structs
> security: build on Windows
> cryptodev: build on Windows
>
> William Tu (1):
> net/ixgbe: build on Windows
> ---
> v4:
> * fix mingw build by defining the IPPROTO_SCTP if needed
> * simplify the meson file
> * change patch title, rebase to main
>
In case you did not notice, mingw build is broken with this series.
https://lab.dpdk.org/results/dashboard/patchsets/19183/
[412/464] Compiling C object
drivers/libtmp_rte_net_ixgbe.a.p/net_ixgbe_ixgbe_82599_bypass.c.obj
[413/464] Compiling C object
drivers/libtmp_rte_net_ixgbe.a.p/net_ixgbe_ixgbe_ethdev.c.obj
FAILED: drivers/libtmp_rte_net_ixgbe.a.p/net_ixgbe_ixgbe_ethdev.c.obj
"gcc" "-Idrivers\libtmp_rte_net_ixgbe.a.p" "-Idrivers" "-I..\drivers"
"-Idrivers\net\ixgbe" "-I..\drivers\net\ixgbe"
"-Idrivers\net\ixgbe\base" "-I..\drivers\net\ixgbe\base"
"-Ilib\ethdev" "-I..\lib\ethdev" "-I." "-I.." "-Iconfig" "-I..\config"
"-Ilib\eal\include" "-I..\lib\eal\include" "-Ilib\eal\windows\include"
"-I..\lib\eal\windows\include" "-Ilib\eal\x86\include"
"-I..\lib\eal\x86\include" "-Ilib\eal\common" "-I..\lib\eal\common"
"-Ilib\eal" "-I..\lib\eal" "-Ilib\kvargs" "-I..\lib\kvargs"
"-Ilib\net" "-I..\lib\net" "-Ilib\mbuf" "-I..\lib\mbuf"
"-Ilib\mempool" "-I..\lib\mempool" "-Ilib\ring" "-I..\lib\ring"
"-Ilib\meter" "-I..\lib\meter" "-Ilib\metrics" "-I..\lib\metrics"
"-Ilib\telemetry" "-I..\lib\telemetry" "-Idrivers\bus\pci"
"-I..\drivers\bus\pci" "-I..\drivers\bus\pci\windows" "-Ilib\pci"
"-I..\lib\pci" "-Idrivers\bus\vdev" "-I..\drivers\bus\vdev"
"-Ilib\hash" "-I..\lib\hash" "-Ilib\rcu" "-I..\lib\rcu"
"-Ilib\security" "-I..\lib\security" "-Ilib\cryptodev"
"-I..\lib\cryptodev" "-fdiagnostics-color=always" "-pipe"
"-D_FILE_OFFSET_BITS=64" "-Wall" "-Winvalid-pch" "-Werror" "-O3"
"-include" "rte_config.h" "-Wextra" "-Wcast-qual" "-Wdeprecated"
"-Wformat" "-Wformat-nonliteral" "-Wformat-security"
"-Wmissing-declarations" "-Wmissing-prototypes" "-Wnested-externs"
"-Wold-style-definition" "-Wpointer-arith" "-Wsign-compare"
"-Wstrict-prototypes" "-Wundef" "-Wwrite-strings"
"-Wno-packed-not-aligned" "-Wno-missing-field-initializers"
"-D_GNU_SOURCE" "-D_WIN32_WINNT=0x0A00" "-D__USE_MINGW_ANSI_STDIO"
"-march=native" "-DALLOW_EXPERIMENTAL_API" "-DALLOW_INTERNAL_API"
"-Wno-format-truncation" "-DRTE_LIBRTE_IXGBE_BYPASS"
"-DRTE_LOG_DEFAULT_LOGTYPE=pmd.net.ixgbe" -MD -MQ
drivers/libtmp_rte_net_ixgbe.a.p/net_ixgbe_ixgbe_ethdev.c.obj -MF
"drivers\libtmp_rte_net_ixgbe.a.p\net_ixgbe_ixgbe_ethdev.c.obj.d" -o
drivers/libtmp_rte_net_ixgbe.a.p/net_ixgbe_ixgbe_ethdev.c.obj "-c"
../drivers/net/ixgbe/ixgbe_ethdev.c
{standard input}: Assembler messages:
{standard input}:7067: Error: invalid register for .seh_savexmm
{standard input}:7069: Error: invalid register for .seh_savexmm
{standard input}:7071: Error: invalid register for .seh_savexmm
{standard input}:7073: Error: invalid register for .seh_savexmm
[414/464] Compiling C object
drivers/libtmp_rte_net_ixgbe.a.p/net_ixgbe_ixgbe_bypass.c.obj
You may want to look at:
https://git.dpdk.org/dpdk/commit/?id=419c6e9af69e
--
David Marchand
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [dpdk-dev] [PATCH v4 4/4] net/ixgbe: build on Windows
2021-10-06 5:32 ` Kadam, Pallavi
@ 2021-10-06 21:26 ` William Tu
0 siblings, 0 replies; 27+ messages in thread
From: William Tu @ 2021-10-06 21:26 UTC (permalink / raw)
To: Kadam, Pallavi; +Cc: dpdk-dev, Dmitry Kozliuk
On Tue, Oct 5, 2021 at 10:33 PM Kadam, Pallavi <pallavi.kadam@intel.com> wrote:
>
>
> On 10/5/2021 10:02 AM, William Tu wrote:
> > This patch enables building the ixgbe driver for Windows.
> > It also enables its dependencies on security and cryptodev.
> > I tested on AWS using ixgbe VF device, using dpdk-testpmd.
> >
> > Signed-off-by: William Tu <u9012063@gmail.com>
> > ---
>
> should we mention the added support in the release notes?
Hi Pallavi,
Thanks! I will add it to my next version.
William
>
> Otherwise,
>
> Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
>
> >
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [dpdk-dev] [PATCH v4 0/4] net/ixgbe: build on Windows
2021-10-06 12:09 ` [dpdk-dev] [PATCH v4 0/4] " David Marchand
@ 2021-10-06 21:48 ` William Tu
0 siblings, 0 replies; 27+ messages in thread
From: William Tu @ 2021-10-06 21:48 UTC (permalink / raw)
To: David Marchand; +Cc: dev, Dmitry Kozlyuk, Pallavi Kadam
Hi David,
Thank you for pointing this out.
On Wed, Oct 6, 2021 at 5:10 AM David Marchand <david.marchand@redhat.com> wrote:
>
> Hello William,
>
> {standard input}: Assembler messages:
> {standard input}:7067: Error: invalid register for .seh_savexmm
> {standard input}:7069: Error: invalid register for .seh_savexmm
> {standard input}:7071: Error: invalid register for .seh_savexmm
> {standard input}:7073: Error: invalid register for .seh_savexmm
> [414/464] Compiling C object
> drivers/libtmp_rte_net_ixgbe.a.p/net_ixgbe_ixgbe_bypass.c.obj
I should add
"cflags += ['-fno-asynchronous-unwind-tables']"
I will send a newer version.
William
^ permalink raw reply [flat|nested] 27+ messages in thread
* [dpdk-dev] [PATCH v4 0/4] net/ixgbe: build on Windows
2021-10-05 17:02 ` [dpdk-dev] [PATCH v4 0/4] net/ixgbe: build on Windows William Tu
` (4 preceding siblings ...)
2021-10-06 12:09 ` [dpdk-dev] [PATCH v4 0/4] " David Marchand
@ 2021-10-06 22:35 ` William Tu
2021-10-06 22:35 ` [dpdk-dev] [PATCH v5 1/4] security: use the net library for IP structs William Tu
` (4 more replies)
5 siblings, 5 replies; 27+ messages in thread
From: William Tu @ 2021-10-06 22:35 UTC (permalink / raw)
To: dev; +Cc: Dmitry.Kozliuk, david.marchand
This patch enables building the ixgbe driver for Windows.
It also enables its dependencies on security and cryptodev.
I tested on AWS using ixgbe VF device, using dpdk-testpmd.
Tal Shnaiderman (3):
security: use the net library for IP structs
security: build on Windows
cryptodev: build on Windows
William Tu (1):
net/ixgbe: build on Windows
---
v5:
* fix error due to "invalid register for .seh_savexmm"
However, I'm not able to reproduce the error on my mingw.
I will check the DPDK CI...
* add release notes and documentation suggested by Pallavi
v4:
* fix mingw build by defining the IPPROTO_SCTP if needed
* simplify the meson file
* change patch title, rebase to main
v3:
* I include Tal's patch series due to some fixes.
* apply on master, after commit f1f6ebc0eaf6
("eal: remove sys/queue.h from public headers")
ixgbe needs to add "include <sys/queue.h>"
* For "cryptodev: build on Windows",
need to add "include <sys/queue.h>"
* For "security: build on Windows",
remove unresolved external symbols, reported
by Pallavi at:
http://inbox.dpdk.org/dev/CALDO+SZ-iL4jhcSZPZZKkbY+dTa1OP+dGKZs86iRE6b2pUsvBw@mail.gmail.com/T/#m0160fb800fe8e8d83624f3bdb39a01b7ef9b5f35
v2:
* add dependencies on cryptodev and security
* add #include <rte_ip.h>, instead of doing
#ifndef RTE_EXEC_ENV_WINDOWS
#include <netinet/in.h>
#else
#include <Ws2tcpip.h>
#endif
however, including rte_ip.h requires including another
set of dependent headers, see the
drivers/net/ixgbe/base/meson.build
doc/guides/nics/features/ixgbe.ini | 1 +
doc/guides/nics/features/ixgbe_vf.ini | 1 +
doc/guides/nics/ixgbe.rst | 19 +++++++++++++++++--
doc/guides/rel_notes/release_21_11.rst | 4 ++++
drivers/net/ixgbe/base/ixgbe_hv_vf.c | 1 +
drivers/net/ixgbe/base/ixgbe_osdep.h | 9 +++++++++
drivers/net/ixgbe/base/meson.build | 2 +-
drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
drivers/net/ixgbe/ixgbe_ethdev.h | 1 +
drivers/net/ixgbe/ixgbe_flow.c | 2 +-
drivers/net/ixgbe/ixgbe_tm.c | 2 +-
drivers/net/ixgbe/meson.build | 9 +++------
lib/cryptodev/cryptodev_pmd.c | 2 ++
lib/cryptodev/rte_cryptodev.c | 1 -
lib/cryptodev/version.map | 2 --
lib/meson.build | 2 ++
lib/net/rte_ip.h | 1 +
lib/security/meson.build | 2 +-
lib/security/rte_security.h | 5 +----
lib/security/version.map | 3 ---
20 files changed, 48 insertions(+), 23 deletions(-)
--
2.33.0.windows.2
^ permalink raw reply [flat|nested] 27+ messages in thread
* [dpdk-dev] [PATCH v5 1/4] security: use the net library for IP structs
2021-10-06 22:35 ` William Tu
@ 2021-10-06 22:35 ` William Tu
2021-10-06 22:35 ` [dpdk-dev] [PATCH v5 2/4] security: build on Windows William Tu
` (3 subsequent siblings)
4 siblings, 0 replies; 27+ messages in thread
From: William Tu @ 2021-10-06 22:35 UTC (permalink / raw)
To: dev; +Cc: Tal Shnaiderman, Akhil Goyal
From: Tal Shnaiderman <talshn@nvidia.com>
Remove the netinet includes and replaces them
with rte_ip.h to support the in_addr/in6_addr structs
on all operating systems.
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: William Tu <u9012063@gmail.com>
---
lib/net/rte_ip.h | 1 +
lib/security/meson.build | 2 +-
lib/security/rte_security.h | 5 +----
3 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/lib/net/rte_ip.h b/lib/net/rte_ip.h
index 05948b69b7..bbd8650962 100644
--- a/lib/net/rte_ip.h
+++ b/lib/net/rte_ip.h
@@ -25,6 +25,7 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netinet/ip.h>
+#include <netinet/ip6.h>
#endif
#include <rte_byteorder.h>
diff --git a/lib/security/meson.build b/lib/security/meson.build
index 5679c8b5c2..1034a7a299 100644
--- a/lib/security/meson.build
+++ b/lib/security/meson.build
@@ -3,4 +3,4 @@
sources = files('rte_security.c')
headers = files('rte_security.h', 'rte_security_driver.h')
-deps += ['mempool', 'cryptodev']
+deps += ['mempool', 'cryptodev', 'net']
diff --git a/lib/security/rte_security.h b/lib/security/rte_security.h
index a10c9b5f00..2013e65e49 100644
--- a/lib/security/rte_security.h
+++ b/lib/security/rte_security.h
@@ -19,13 +19,10 @@ extern "C" {
#include <sys/types.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <netinet/ip6.h>
-
#include <rte_compat.h>
#include <rte_common.h>
#include <rte_crypto.h>
+#include <rte_ip.h>
#include <rte_mbuf.h>
#include <rte_mbuf_dyn.h>
#include <rte_memory.h>
--
2.33.0.windows.2
^ permalink raw reply [flat|nested] 27+ messages in thread
* [dpdk-dev] [PATCH v5 2/4] security: build on Windows
2021-10-06 22:35 ` William Tu
2021-10-06 22:35 ` [dpdk-dev] [PATCH v5 1/4] security: use the net library for IP structs William Tu
@ 2021-10-06 22:35 ` William Tu
2021-10-07 7:44 ` Thomas Monjalon
2021-10-06 22:35 ` [dpdk-dev] [PATCH v5 3/4] cryptodev: " William Tu
` (2 subsequent siblings)
4 siblings, 1 reply; 27+ messages in thread
From: William Tu @ 2021-10-06 22:35 UTC (permalink / raw)
To: dev; +Cc: Tal Shnaiderman, Akhil Goyal
From: Tal Shnaiderman <talshn@nvidia.com>
Build the security library on Windows.
Remove unneeded export from version file.
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: William Tu <u9012063@gmail.com>
---
lib/meson.build | 1 +
lib/security/version.map | 3 ---
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/lib/meson.build b/lib/meson.build
index 9c4841fe40..8183dd92da 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -86,6 +86,7 @@ if is_windows
'latencystats',
'pdump',
'stack',
+ 'security',
] # only supported libraries for windows
endif
diff --git a/lib/security/version.map b/lib/security/version.map
index b377be602a..a1f46bfd27 100644
--- a/lib/security/version.map
+++ b/lib/security/version.map
@@ -1,13 +1,11 @@
DPDK_22 {
global:
- rte_security_attach_session;
rte_security_capabilities_get;
rte_security_capability_get;
rte_security_session_create;
rte_security_session_destroy;
rte_security_session_get_size;
- rte_security_set_pkt_metadata;
local: *;
};
@@ -19,7 +17,6 @@ EXPERIMENTAL {
__rte_security_set_pkt_metadata;
rte_security_dynfield_offset;
rte_security_dynfield_register;
- rte_security_get_userdata;
rte_security_session_stats_get;
rte_security_session_update;
};
--
2.33.0.windows.2
^ permalink raw reply [flat|nested] 27+ messages in thread
* [dpdk-dev] [PATCH v5 3/4] cryptodev: build on Windows
2021-10-06 22:35 ` William Tu
2021-10-06 22:35 ` [dpdk-dev] [PATCH v5 1/4] security: use the net library for IP structs William Tu
2021-10-06 22:35 ` [dpdk-dev] [PATCH v5 2/4] security: build on Windows William Tu
@ 2021-10-06 22:35 ` William Tu
2021-10-06 22:35 ` [dpdk-dev] [PATCH v5 4/4] net/ixgbe: " William Tu
2021-10-07 11:53 ` [dpdk-dev] [PATCH v4 0/4] " Thomas Monjalon
4 siblings, 0 replies; 27+ messages in thread
From: William Tu @ 2021-10-06 22:35 UTC (permalink / raw)
To: dev; +Cc: Tal Shnaiderman, Akhil Goyal
From: Tal Shnaiderman <talshn@nvidia.com>
Build the cryptography device library on Windows OS
by removing unneeded include and exports blocking the
compilation.
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: William Tu <u9012063@gmail.com>
---
lib/cryptodev/cryptodev_pmd.c | 2 ++
lib/cryptodev/rte_cryptodev.c | 1 -
lib/cryptodev/version.map | 2 --
lib/meson.build | 1 +
4 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/cryptodev/cryptodev_pmd.c b/lib/cryptodev/cryptodev_pmd.c
index 71e34140cd..44a70ecb35 100644
--- a/lib/cryptodev/cryptodev_pmd.c
+++ b/lib/cryptodev/cryptodev_pmd.c
@@ -2,6 +2,8 @@
* Copyright(c) 2017 Intel Corporation
*/
+#include <sys/queue.h>
+
#include <rte_string_fns.h>
#include <rte_malloc.h>
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 9fa3aff1d3..b913c434c5 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -12,7 +12,6 @@
#include <errno.h>
#include <stdint.h>
#include <inttypes.h>
-#include <netinet/in.h>
#include <rte_byteorder.h>
#include <rte_log.h>
diff --git a/lib/cryptodev/version.map b/lib/cryptodev/version.map
index 8294c9f64f..43cf937e40 100644
--- a/lib/cryptodev/version.map
+++ b/lib/cryptodev/version.map
@@ -93,10 +93,8 @@ EXPERIMENTAL {
# added in 20.11
rte_cryptodev_configure_raw_dp_ctx;
rte_cryptodev_get_raw_dp_ctx_size;
- rte_cryptodev_raw_dequeue;
rte_cryptodev_raw_dequeue_burst;
rte_cryptodev_raw_dequeue_done;
- rte_cryptodev_raw_enqueue;
rte_cryptodev_raw_enqueue_burst;
rte_cryptodev_raw_enqueue_done;
diff --git a/lib/meson.build b/lib/meson.build
index 8183dd92da..b2ba7258d8 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -80,6 +80,7 @@ if is_windows
'hash',
'timer',
'bitratestats',
+ 'cryptodev',
'cfgfile',
'gro',
'gso',
--
2.33.0.windows.2
^ permalink raw reply [flat|nested] 27+ messages in thread
* [dpdk-dev] [PATCH v5 4/4] net/ixgbe: build on Windows
2021-10-06 22:35 ` William Tu
` (2 preceding siblings ...)
2021-10-06 22:35 ` [dpdk-dev] [PATCH v5 3/4] cryptodev: " William Tu
@ 2021-10-06 22:35 ` William Tu
2021-10-07 7:51 ` Thomas Monjalon
2021-10-07 11:53 ` [dpdk-dev] [PATCH v4 0/4] " Thomas Monjalon
4 siblings, 1 reply; 27+ messages in thread
From: William Tu @ 2021-10-06 22:35 UTC (permalink / raw)
To: dev; +Cc: Pallavi Kadam, Dmitry Kozlyuk
This patch enables building the ixgbe driver for Windows.
It also enables its dependencies on security and cryptodev.
I tested on AWS using ixgbe VF device, using dpdk-testpmd.
Signed-off-by: William Tu <u9012063@gmail.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
doc/guides/nics/features/ixgbe.ini | 1 +
doc/guides/nics/features/ixgbe_vf.ini | 1 +
doc/guides/nics/ixgbe.rst | 19 +++++++++++++++++--
doc/guides/rel_notes/release_21_11.rst | 4 ++++
drivers/net/ixgbe/base/ixgbe_hv_vf.c | 1 +
drivers/net/ixgbe/base/ixgbe_osdep.h | 9 +++++++++
drivers/net/ixgbe/base/meson.build | 2 +-
drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
drivers/net/ixgbe/ixgbe_ethdev.h | 1 +
drivers/net/ixgbe/ixgbe_flow.c | 2 +-
drivers/net/ixgbe/ixgbe_tm.c | 2 +-
drivers/net/ixgbe/meson.build | 9 +++------
12 files changed, 41 insertions(+), 12 deletions(-)
diff --git a/doc/guides/nics/features/ixgbe.ini b/doc/guides/nics/features/ixgbe.ini
index aa947b510f..a29d01fe6f 100644
--- a/doc/guides/nics/features/ixgbe.ini
+++ b/doc/guides/nics/features/ixgbe.ini
@@ -52,6 +52,7 @@ Registers dump = Y
Multiprocess aware = Y
FreeBSD = Y
Linux = Y
+Windows = Y
ARMv8 = Y
x86-32 = Y
x86-64 = Y
diff --git a/doc/guides/nics/features/ixgbe_vf.ini b/doc/guides/nics/features/ixgbe_vf.ini
index 32fb1b7ac8..9241aebd21 100644
--- a/doc/guides/nics/features/ixgbe_vf.ini
+++ b/doc/guides/nics/features/ixgbe_vf.ini
@@ -36,6 +36,7 @@ Registers dump = Y
Multiprocess aware = Y
FreeBSD = Y
Linux = Y
+Windows = Y
ARMv8 = Y
x86-32 = Y
x86-64 = Y
diff --git a/doc/guides/nics/ixgbe.rst b/doc/guides/nics/ixgbe.rst
index b82e634382..b7fdc52882 100644
--- a/doc/guides/nics/ixgbe.rst
+++ b/doc/guides/nics/ixgbe.rst
@@ -22,8 +22,8 @@ The following sections explain RX and TX constraints in the vPMD.
RX Constraints
~~~~~~~~~~~~~~
-Prerequisites and Pre-conditions
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Linux Prerequisites and Pre-conditions
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The following prerequisites apply:
@@ -47,6 +47,21 @@ vPMD for RX would be disabled.
By default, IXGBE_MAX_RING_DESC is set to 4096 and RTE_PMD_IXGBE_RX_MAX_BURST is set to 32.
+Windows Prerequisites and Pre-conditions
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Follow the DPDK `Getting Started Guide for Windows <https://doc.dpdk.org/guides/windows_gsg/index.html>`_ to setup the basic DPDK environment.
+
+- Identify the Intel® Ethernet adapter and get the latest NVM/FW version.
+
+- To access any Intel® Ethernet hardware, load the NetUIO driver in place of existing built-in (inbox) driver.
+
+- To load NetUIO driver, follow the steps mentioned in `dpdk-kmods repository
+ <https://git.dpdk.org/dpdk-kmods/tree/windows/netuio/README.rst>`_.
+
+- Loading of private Dynamic Device Personalization (DDP) package is not supported on Windows.
+
+
Feature not Supported by RX Vector PMD
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst
index dfc2cbdeed..efeffe37a0 100644
--- a/doc/guides/rel_notes/release_21_11.rst
+++ b/doc/guides/rel_notes/release_21_11.rst
@@ -85,6 +85,10 @@ New Features
* Added DEV_RX_OFFLOAD_TIMESTAMP support.
* Added timesync API support under scalar path.
+* **Updated Intel ixgbe driver.**
+
+ * Added Intel ixgbe support on Windows.
+
* **Updated Marvell cnxk ethdev driver.**
* Added rte_flow support for dual VLAN insert and strip actions.
diff --git a/drivers/net/ixgbe/base/ixgbe_hv_vf.c b/drivers/net/ixgbe/base/ixgbe_hv_vf.c
index b7ad44ab8c..4572411d39 100644
--- a/drivers/net/ixgbe/base/ixgbe_hv_vf.c
+++ b/drivers/net/ixgbe/base/ixgbe_hv_vf.c
@@ -4,6 +4,7 @@
#include "ixgbe_vf.h"
#include "ixgbe_hv_vf.h"
+#include "ixgbe_osdep.h"
/**
* Hyper-V variant - just a stub.
diff --git a/drivers/net/ixgbe/base/ixgbe_osdep.h b/drivers/net/ixgbe/base/ixgbe_osdep.h
index cacf724198..6c25f608b1 100644
--- a/drivers/net/ixgbe/base/ixgbe_osdep.h
+++ b/drivers/net/ixgbe/base/ixgbe_osdep.h
@@ -16,10 +16,15 @@
#include <rte_log.h>
#include <rte_byteorder.h>
#include <rte_io.h>
+#include <rte_ip.h>
#include "../ixgbe_logs.h"
#include "../ixgbe_bypass_defines.h"
+#ifndef IPPROTO_SCTP
+#define IPPROTO_SCTP 132
+#endif
+
#define ASSERT(x) if(!(x)) rte_panic("IXGBE: x")
#define DELAY(x) rte_delay_us_sleep(x)
@@ -43,12 +48,16 @@
#define false 0
#define true 1
+#ifndef RTE_EXEC_ENV_WINDOWS
#define min(a,b) RTE_MIN(a,b)
+#endif
#define EWARN(hw, S, args...) DEBUGOUT1(S, ##args)
/* Bunch of defines for shared code bogosity */
+#ifndef UNREFERENCED_PARAMETER
#define UNREFERENCED_PARAMETER(_p)
+#endif
#define UNREFERENCED_1PARAMETER(_p)
#define UNREFERENCED_2PARAMETER(_p, _q)
#define UNREFERENCED_3PARAMETER(_p, _q, _r)
diff --git a/drivers/net/ixgbe/base/meson.build b/drivers/net/ixgbe/base/meson.build
index 22972c6b56..f6497014da 100644
--- a/drivers/net/ixgbe/base/meson.build
+++ b/drivers/net/ixgbe/base/meson.build
@@ -29,6 +29,6 @@ foreach flag: error_cflags
endforeach
base_lib = static_library('ixgbe_base', sources,
- dependencies: static_rte_eal,
+ dependencies: [static_rte_eal, static_rte_net],
c_args: c_args)
base_objs = base_lib.extract_all_objects(recursive: true)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 47693c0c47..8b33897ca1 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -10,7 +10,6 @@
#include <unistd.h>
#include <stdarg.h>
#include <inttypes.h>
-#include <netinet/in.h>
#include <rte_string_fns.h>
#include <rte_byteorder.h>
#include <rte_common.h>
@@ -46,6 +45,7 @@
#include "ixgbe_rxtx.h"
#include "base/ixgbe_type.h"
#include "base/ixgbe_phy.h"
+#include "base/ixgbe_osdep.h"
#include "ixgbe_regs.h"
/*
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
index a0ce18ca24..645207e130 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -6,6 +6,7 @@
#define _IXGBE_ETHDEV_H_
#include <stdint.h>
+#include <sys/queue.h>
#include "base/ixgbe_type.h"
#include "base/ixgbe_dcb.h"
diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index 511b612f7f..27322ab903 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -10,7 +10,6 @@
#include <unistd.h>
#include <stdarg.h>
#include <inttypes.h>
-#include <netinet/in.h>
#include <rte_byteorder.h>
#include <rte_common.h>
#include <rte_cycles.h>
@@ -37,6 +36,7 @@
#include "base/ixgbe_api.h"
#include "base/ixgbe_vf.h"
#include "base/ixgbe_common.h"
+#include "base/ixgbe_osdep.h"
#include "ixgbe_ethdev.h"
#include "ixgbe_bypass.h"
#include "ixgbe_rxtx.h"
diff --git a/drivers/net/ixgbe/ixgbe_tm.c b/drivers/net/ixgbe/ixgbe_tm.c
index a8407e742e..ae03ea6e9d 100644
--- a/drivers/net/ixgbe/ixgbe_tm.c
+++ b/drivers/net/ixgbe/ixgbe_tm.c
@@ -665,7 +665,7 @@ ixgbe_node_add(struct rte_eth_dev *dev, uint32_t node_id,
}
/* check level */
if (level_id != RTE_TM_NODE_LEVEL_ID_ANY &&
- level_id != parent_node_type + 1) {
+ level_id != (uint32_t)parent_node_type + 1) {
error->type = RTE_TM_ERROR_TYPE_NODE_PARAMS;
error->message = "Wrong level";
return -EINVAL;
diff --git a/drivers/net/ixgbe/meson.build b/drivers/net/ixgbe/meson.build
index 55ac91fcd1..162f8d5f46 100644
--- a/drivers/net/ixgbe/meson.build
+++ b/drivers/net/ixgbe/meson.build
@@ -1,12 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-if is_windows
- build = false
- reason = 'not supported on Windows'
- subdir_done()
-endif
-
cflags += ['-DRTE_LIBRTE_IXGBE_BYPASS']
subdir('base')
@@ -30,6 +24,9 @@ deps += ['hash', 'security']
if arch_subdir == 'x86'
sources += files('ixgbe_rxtx_vec_sse.c')
+ if is_windows and cc.get_id() != 'clang'
+ cflags += ['-fno-asynchronous-unwind-tables']
+ endif
elif arch_subdir == 'arm'
sources += files('ixgbe_rxtx_vec_neon.c')
endif
--
2.33.0.windows.2
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [dpdk-dev] [PATCH v5 2/4] security: build on Windows
2021-10-06 22:35 ` [dpdk-dev] [PATCH v5 2/4] security: build on Windows William Tu
@ 2021-10-07 7:44 ` Thomas Monjalon
0 siblings, 0 replies; 27+ messages in thread
From: Thomas Monjalon @ 2021-10-07 7:44 UTC (permalink / raw)
To: William Tu; +Cc: dev, Tal Shnaiderman, Akhil Goyal
07/10/2021 00:35, William Tu:
> From: Tal Shnaiderman <talshn@nvidia.com>
>
> Build the security library on Windows.
>
> Remove unneeded export from version file.
To be more precise, it is unneeded because they are inline functions.
> --- a/lib/security/version.map
> +++ b/lib/security/version.map
> @@ -1,13 +1,11 @@
> DPDK_22 {
> global:
>
> - rte_security_attach_session;
> rte_security_capabilities_get;
> rte_security_capability_get;
> rte_security_session_create;
> rte_security_session_destroy;
> rte_security_session_get_size;
> - rte_security_set_pkt_metadata;
>
> local: *;
> };
> @@ -19,7 +17,6 @@ EXPERIMENTAL {
> __rte_security_set_pkt_metadata;
> rte_security_dynfield_offset;
> rte_security_dynfield_register;
> - rte_security_get_userdata;
> rte_security_session_stats_get;
> rte_security_session_update;
> };
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [dpdk-dev] [PATCH v5 4/4] net/ixgbe: build on Windows
2021-10-06 22:35 ` [dpdk-dev] [PATCH v5 4/4] net/ixgbe: " William Tu
@ 2021-10-07 7:51 ` Thomas Monjalon
0 siblings, 0 replies; 27+ messages in thread
From: Thomas Monjalon @ 2021-10-07 7:51 UTC (permalink / raw)
To: Pallavi Kadam, William Tu; +Cc: dev, Dmitry Kozlyuk
07/10/2021 00:35, William Tu:
> +- Follow the DPDK `Getting Started Guide for Windows <https://doc.dpdk.org/guides/windows_gsg/index.html>`_ to setup the basic DPDK environment.
Don't use web link for internal reference.
It should be :doc: for this one.
> +
> +- Identify the Intel® Ethernet adapter and get the latest NVM/FW version.
> +
> +- To access any Intel® Ethernet hardware, load the NetUIO driver in place of existing built-in (inbox) driver.
The RST syntax |reg| is preferred for "registered sign".
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [dpdk-dev] [PATCH v4 0/4] net/ixgbe: build on Windows
2021-10-06 22:35 ` William Tu
` (3 preceding siblings ...)
2021-10-06 22:35 ` [dpdk-dev] [PATCH v5 4/4] net/ixgbe: " William Tu
@ 2021-10-07 11:53 ` Thomas Monjalon
4 siblings, 0 replies; 27+ messages in thread
From: Thomas Monjalon @ 2021-10-07 11:53 UTC (permalink / raw)
To: William Tu; +Cc: dev, Dmitry.Kozliuk, david.marchand
07/10/2021 00:35, William Tu:
> This patch enables building the ixgbe driver for Windows.
> It also enables its dependencies on security and cryptodev.
> I tested on AWS using ixgbe VF device, using dpdk-testpmd.
>
> Tal Shnaiderman (3):
> security: use the net library for IP structs
> security: build on Windows
> cryptodev: build on Windows
>
> William Tu (1):
> net/ixgbe: build on Windows
Building security lib depends on cryptodev lib,
so I had to swap the commits.
Fixed other small stuff as commented in the thread,
and applied, thanks.
^ permalink raw reply [flat|nested] 27+ messages in thread
end of thread, other threads:[~2021-10-07 11:53 UTC | newest]
Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-02 0:33 [dpdk-dev] [PATCH v3 0/4] net/ixgbe: Add support for Windows William Tu
2021-10-02 0:33 ` [dpdk-dev] [PATCH v3 1/4] security: use the net library for IP structs William Tu
2021-10-05 10:52 ` [dpdk-dev] [EXT] " Akhil Goyal
2021-10-02 0:33 ` [dpdk-dev] [PATCH v3 2/4] security: build on Windows William Tu
2021-10-05 10:53 ` [dpdk-dev] [EXT] " Akhil Goyal
2021-10-02 0:33 ` [dpdk-dev] [PATCH v3 3/4] cryptodev: " William Tu
2021-10-05 10:53 ` [dpdk-dev] [EXT] " Akhil Goyal
2021-10-02 0:33 ` [dpdk-dev] [PATCH v3 4/4] net/ixgbe: Add support for Windows William Tu
2021-10-01 19:03 ` Dmitry Kozlyuk
2021-10-05 17:02 ` [dpdk-dev] [PATCH v4 0/4] net/ixgbe: build on Windows William Tu
2021-10-05 17:02 ` [dpdk-dev] [PATCH v4 1/4] security: use the net library for IP structs William Tu
2021-10-05 17:02 ` [dpdk-dev] [PATCH v4 2/4] security: build on Windows William Tu
2021-10-05 17:02 ` [dpdk-dev] [PATCH v4 3/4] cryptodev: " William Tu
2021-10-05 17:02 ` [dpdk-dev] [PATCH v4 4/4] net/ixgbe: " William Tu
2021-10-05 22:52 ` Dmitry Kozlyuk
2021-10-06 5:32 ` Kadam, Pallavi
2021-10-06 21:26 ` William Tu
2021-10-06 12:09 ` [dpdk-dev] [PATCH v4 0/4] " David Marchand
2021-10-06 21:48 ` William Tu
2021-10-06 22:35 ` William Tu
2021-10-06 22:35 ` [dpdk-dev] [PATCH v5 1/4] security: use the net library for IP structs William Tu
2021-10-06 22:35 ` [dpdk-dev] [PATCH v5 2/4] security: build on Windows William Tu
2021-10-07 7:44 ` Thomas Monjalon
2021-10-06 22:35 ` [dpdk-dev] [PATCH v5 3/4] cryptodev: " William Tu
2021-10-06 22:35 ` [dpdk-dev] [PATCH v5 4/4] net/ixgbe: " William Tu
2021-10-07 7:51 ` Thomas Monjalon
2021-10-07 11:53 ` [dpdk-dev] [PATCH v4 0/4] " Thomas Monjalon
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).