Skip to contentSkip to conversation

net/ixgbe: Add support for Windows

PATCH Superseded William Tu 6 participants 27 messages Oct 1, 2021 – Oct 7, 2021

Subsystems (3)
lore
Share & tools
lore

William Tu

author
#0 lore raw

v3 cover net/ixgbe: Add support for Windows

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: 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(-)
Signature · 1 line
2.33.0.windows.2
author
#1 lore raw

PATCH v3 1/4 security: use the net library for IP structs

From: Tal Shnaiderman <[email protected]>

Remove the netinet includes and replaces them with rte_ip.h to support the in_addr/in6_addr structs on all operating systems.

---
 lib/net/rte_ip.h            | 1 +
 lib/security/meson.build    | 2 +-
 lib/security/rte_security.h | 5 +----
 3 files changed, 3 insertions(+), 5 deletions(-)
lib/net/rte_ip.h +1 -0
index 05948b69b7..bbd8650962 100644
@@ -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>
lib/security/meson.build +1 -1
index 5679c8b5c2..1034a7a299 100644
@@ -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']
lib/security/rte_security.h +1 -4
index a10c9b5f00..2013e65e49 100644
@@ -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>
Signature · 1 line
2.33.0.windows.2
author
#3 lore raw

PATCH v3 2/4 security: build on Windows

In reply to William Tu

From: Tal Shnaiderman <[email protected]>

Build the security library on Windows.

Remove unneeded export from version file.

---
 lib/meson.build          | 1 +
 lib/security/version.map | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)
lib/meson.build +1 -0
index 1673ca4323..95b0ea41c4 100644
@@ -85,6 +85,7 @@ if is_windows
             'gso',
             'latencystats',
             'pdump',
+            'security',
     ] # only supported libraries for windows
 endif
 
lib/security/version.map +0 -3
index b377be602a..a1f46bfd27 100644
@@ -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;
 };
Signature · 1 line
2.33.0.windows.2
author
#5 lore raw

PATCH v3 3/4 cryptodev: build on Windows

In reply to William Tu

From: Tal Shnaiderman <[email protected]>

Build the cryptography device library on Windows OS by removing unneeded include and exports blocking the compilation.

---
 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(-)
lib/cryptodev/cryptodev_pmd.c +2 -0
index 71e34140cd..44a70ecb35 100644
@@ -2,6 +2,8 @@
  * Copyright(c) 2017 Intel Corporation
  */
 
+#include <sys/queue.h>
+
 #include <rte_string_fns.h>
 #include <rte_malloc.h>
 
lib/cryptodev/rte_cryptodev.c +0 -1
index 9fa3aff1d3..b913c434c5 100644
@@ -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>
lib/cryptodev/version.map +0 -2
index 8294c9f64f..43cf937e40 100644
@@ -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;
 
lib/meson.build +1 -0
index 95b0ea41c4..e5f0094a82 100644
@@ -80,6 +80,7 @@ if is_windows
             'hash',
             'timer',
             'bitratestats',
+            'cryptodev',
             'cfgfile',
             'gro',
             'gso',
Signature · 1 line
2.33.0.windows.2
author
#7 lore raw

PATCH v3 4/4 net/ixgbe: Add support for Windows

In reply to 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.

---
 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(-)
drivers/net/ixgbe/base/ixgbe_hv_vf.c +1 -0
index b7ad44ab8c..4572411d39 100644
@@ -4,6 +4,7 @@
 
 #include "ixgbe_vf.h"
 #include "ixgbe_hv_vf.h"
+#include "ixgbe_osdep.h"
 
 /**
  * Hyper-V variant - just a stub.
drivers/net/ixgbe/base/ixgbe_osdep.h +5 -0
index cacf724198..2c44e7bf35 100644
@@ -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) 
drivers/net/ixgbe/base/meson.build +7 -0
index 22972c6b56..51a58a3183 100644
@@ -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)
drivers/net/ixgbe/ixgbe_ethdev.c +1 -1
index 47693c0c47..8b33897ca1 100644
@@ -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"
 
 /*
drivers/net/ixgbe/ixgbe_ethdev.h +1 -0
index a0ce18ca24..645207e130 100644
@@ -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"
drivers/net/ixgbe/ixgbe_flow.c +1 -1
index 511b612f7f..27322ab903 100644
@@ -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"
drivers/net/ixgbe/ixgbe_tm.c +1 -1
index a8407e742e..ae03ea6e9d 100644
@@ -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;
drivers/net/ixgbe/meson.build +0 -6
index 55ac91fcd1..4b18e47273 100644
@@ -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')
Signature · 1 line
2.33.0.windows.2
#8 lore raw

Hi William,

Recommended title: "net/ixgbe: build on Windows".

2021-10-01 17:33 (UTC-0700), William Tu:

Quoted 5 lines

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.

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))
Quoted 10 lines

[...]

drivers/net/ixgbe/base/meson.build +1 -0
index 22972c6b56..51a58a3183 100644
@@ -28,7 +28,14 @@ foreach flag: error_cflags
     endif
 endforeach
 
+inc = []

drivers/net/ixgbe/base/meson.build foreach flag: error_cflags · line 41

Quoted 10 lines
drivers/net/ixgbe/base/meson.build +6 -0
+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.

author
#9 lore raw

v4 cover net/ixgbe: build on Windows

In reply to 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
---
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(-)
Signature · 1 line
2.33.0.windows.2
author
#10 lore raw

PATCH v4 1/4 security: use the net library for IP structs

From: Tal Shnaiderman <[email protected]>

Remove the netinet includes and replaces them with rte_ip.h to support the in_addr/in6_addr structs on all operating systems.

---
 lib/net/rte_ip.h            | 1 +
 lib/security/meson.build    | 2 +-
 lib/security/rte_security.h | 5 +----
 3 files changed, 3 insertions(+), 5 deletions(-)
lib/net/rte_ip.h +1 -0
index 05948b69b7..bbd8650962 100644
@@ -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>
lib/security/meson.build +1 -1
index 5679c8b5c2..1034a7a299 100644
@@ -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']
lib/security/rte_security.h +1 -4
index a10c9b5f00..2013e65e49 100644
@@ -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>
Signature · 1 line
2.33.0.windows.2
author
#11 lore raw

PATCH v4 2/4 security: build on Windows

In reply to William Tu

From: Tal Shnaiderman <[email protected]>

Build the security library on Windows.

Remove unneeded export from version file.

---
 lib/meson.build          | 1 +
 lib/security/version.map | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)
lib/meson.build +1 -0
index 9c4841fe40..8183dd92da 100644
@@ -86,6 +86,7 @@ if is_windows
             'latencystats',
             'pdump',
             'stack',
+            'security',
     ] # only supported libraries for windows
 endif
 
lib/security/version.map +0 -3
index b377be602a..a1f46bfd27 100644
@@ -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;
 };
Signature · 1 line
2.33.0.windows.2
author
#12 lore raw

PATCH v4 3/4 cryptodev: build on Windows

In reply to William Tu

From: Tal Shnaiderman <[email protected]>

Build the cryptography device library on Windows OS by removing unneeded include and exports blocking the compilation.

---
 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(-)
lib/cryptodev/cryptodev_pmd.c +2 -0
index 71e34140cd..44a70ecb35 100644
@@ -2,6 +2,8 @@
  * Copyright(c) 2017 Intel Corporation
  */
 
+#include <sys/queue.h>
+
 #include <rte_string_fns.h>
 #include <rte_malloc.h>
 
lib/cryptodev/rte_cryptodev.c +0 -1
index 9fa3aff1d3..b913c434c5 100644
@@ -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>
lib/cryptodev/version.map +0 -2
index 8294c9f64f..43cf937e40 100644
@@ -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;
 
lib/meson.build +1 -0
index 8183dd92da..b2ba7258d8 100644
@@ -80,6 +80,7 @@ if is_windows
             'hash',
             'timer',
             'bitratestats',
+            'cryptodev',
             'cfgfile',
             'gro',
             'gso',
Signature · 1 line
2.33.0.windows.2
author
#13 lore raw

PATCH v4 4/4 net/ixgbe: build on Windows

In reply to 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.

---
 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(-)
drivers/net/ixgbe/base/ixgbe_hv_vf.c +1 -0
index b7ad44ab8c..4572411d39 100644
@@ -4,6 +4,7 @@
 
 #include "ixgbe_vf.h"
 #include "ixgbe_hv_vf.h"
+#include "ixgbe_osdep.h"
 
 /**
  * Hyper-V variant - just a stub.
drivers/net/ixgbe/base/ixgbe_osdep.h +9 -0
index cacf724198..6c25f608b1 100644
@@ -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) 
drivers/net/ixgbe/base/meson.build +1 -1
index 22972c6b56..f6497014da 100644
@@ -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)
drivers/net/ixgbe/ixgbe_ethdev.c +1 -1
index 47693c0c47..8b33897ca1 100644
@@ -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"
 
 /*
drivers/net/ixgbe/ixgbe_ethdev.h +1 -0
index a0ce18ca24..645207e130 100644
@@ -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"
drivers/net/ixgbe/ixgbe_flow.c +1 -1
index 511b612f7f..27322ab903 100644
@@ -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"
drivers/net/ixgbe/ixgbe_tm.c +1 -1
index a8407e742e..ae03ea6e9d 100644
@@ -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;
drivers/net/ixgbe/meson.build +0 -6
index 55ac91fcd1..4b18e47273 100644
@@ -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')
Signature · 1 line
2.33.0.windows.2
Acked-by on v4 4/4
#15 lore raw

Re: [dpdk-dev] [PATCH v4 4/4] net/ixgbe: build on Windows

In reply to William Tu
Quoted 6 lines · 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.

---

should we mention the added support in the release notes?

Otherwise,

Quoted 1 line
author
#16 lore raw

Re: [dpdk-dev] [PATCH v4 4/4] net/ixgbe: build on Windows

Quoted 11 lines · Pallavi
Quoted 6 lines · 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.

---

should we mention the added support in the release notes?

Hi Pallavi,
Thanks! I will add it to my next version.
William

Quoted 6 lines

Otherwise,

Quoted 1 line
#17 lore raw

Re: [dpdk-dev] [PATCH v4 0/4] net/ixgbe: build on Windows

In reply to William Tu

Hello William,

Quoted 10 lines · 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

Quoted 8 lines

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

Signature · 1 line
David Marchand
author
#18 lore raw

Re: [dpdk-dev] [PATCH v4 0/4] net/ixgbe: build on Windows

Hi David,
Thank you for pointing this out.

Quoted 10 lines · David Marchand

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

author
#19 lore raw

v4 cover net/ixgbe: build on Windows

In reply to 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
---
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(-)
Signature · 1 line
2.33.0.windows.2
author
#20 lore raw

PATCH v5 1/4 security: use the net library for IP structs

From: Tal Shnaiderman <[email protected]>

Remove the netinet includes and replaces them with rte_ip.h to support the in_addr/in6_addr structs on all operating systems.

---
 lib/net/rte_ip.h            | 1 +
 lib/security/meson.build    | 2 +-
 lib/security/rte_security.h | 5 +----
 3 files changed, 3 insertions(+), 5 deletions(-)
lib/net/rte_ip.h +1 -0
index 05948b69b7..bbd8650962 100644
@@ -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>
lib/security/meson.build +1 -1
index 5679c8b5c2..1034a7a299 100644
@@ -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']
lib/security/rte_security.h +1 -4
index a10c9b5f00..2013e65e49 100644
@@ -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>
Signature · 1 line
2.33.0.windows.2
author
#21 lore raw

PATCH v5 2/4 security: build on Windows

In reply to William Tu

From: Tal Shnaiderman <[email protected]>

Build the security library on Windows.

Remove unneeded export from version file.

---
 lib/meson.build          | 1 +
 lib/security/version.map | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)
lib/meson.build +1 -0
index 9c4841fe40..8183dd92da 100644
@@ -86,6 +86,7 @@ if is_windows
             'latencystats',
             'pdump',
             'stack',
+            'security',
     ] # only supported libraries for windows
 endif
 
lib/security/version.map +0 -3
index b377be602a..a1f46bfd27 100644
@@ -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;
 };
Signature · 1 line
2.33.0.windows.2
#22 lore raw

Re: [dpdk-dev] [PATCH v5 2/4] security: build on Windows

07/10/2021 00:35, William Tu:

Quoted 5 lines

From: Tal Shnaiderman <[email protected]>

Build the security library on Windows.

Remove unneeded export from version file.

To be more precise, it is unneeded because they are inline functions.

Quoted 24 lines
lib/security/version.map +0 -3
@@ -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;
 };
author
#23 lore raw

PATCH v5 3/4 cryptodev: build on Windows

In reply to William Tu

From: Tal Shnaiderman <[email protected]>

Build the cryptography device library on Windows OS by removing unneeded include and exports blocking the compilation.

---
 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(-)
lib/cryptodev/cryptodev_pmd.c +2 -0
index 71e34140cd..44a70ecb35 100644
@@ -2,6 +2,8 @@
  * Copyright(c) 2017 Intel Corporation
  */
 
+#include <sys/queue.h>
+
 #include <rte_string_fns.h>
 #include <rte_malloc.h>
 
lib/cryptodev/rte_cryptodev.c +0 -1
index 9fa3aff1d3..b913c434c5 100644
@@ -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>
lib/cryptodev/version.map +0 -2
index 8294c9f64f..43cf937e40 100644
@@ -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;
 
lib/meson.build +1 -0
index 8183dd92da..b2ba7258d8 100644
@@ -80,6 +80,7 @@ if is_windows
             'hash',
             'timer',
             'bitratestats',
+            'cryptodev',
             'cfgfile',
             'gro',
             'gso',
Signature · 1 line
2.33.0.windows.2
author
#24 lore raw

PATCH v5 4/4 net/ixgbe: build on Windows

In reply to 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.

---
 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(-)
doc/guides/nics/features/ixgbe.ini +1 -0
index aa947b510f..a29d01fe6f 100644
@@ -52,6 +52,7 @@ Registers dump       = Y
 Multiprocess aware   = Y
 FreeBSD              = Y
 Linux                = Y
+Windows              = Y
 ARMv8                = Y
 x86-32               = Y
 x86-64               = Y
doc/guides/nics/features/ixgbe_vf.ini +1 -0
index 32fb1b7ac8..9241aebd21 100644
@@ -36,6 +36,7 @@ Registers dump       = Y
 Multiprocess aware   = Y
 FreeBSD              = Y
 Linux                = Y
+Windows              = Y
 ARMv8                = Y
 x86-32               = Y
 x86-64               = Y
doc/guides/nics/ixgbe.rst +17 -2
index b82e634382..b7fdc52882 100644
@@ -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
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
doc/guides/rel_notes/release_21_11.rst +4 -0
index dfc2cbdeed..efeffe37a0 100644
@@ -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.
drivers/net/ixgbe/base/ixgbe_hv_vf.c +1 -0
index b7ad44ab8c..4572411d39 100644
@@ -4,6 +4,7 @@
 
 #include "ixgbe_vf.h"
 #include "ixgbe_hv_vf.h"
+#include "ixgbe_osdep.h"
 
 /**
  * Hyper-V variant - just a stub.
drivers/net/ixgbe/base/ixgbe_osdep.h +9 -0
index cacf724198..6c25f608b1 100644
@@ -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) 
drivers/net/ixgbe/base/meson.build +1 -1
index 22972c6b56..f6497014da 100644
@@ -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)
drivers/net/ixgbe/ixgbe_ethdev.c +1 -1
index 47693c0c47..8b33897ca1 100644
@@ -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"
 
 /*
drivers/net/ixgbe/ixgbe_ethdev.h +1 -0
index a0ce18ca24..645207e130 100644
@@ -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"
drivers/net/ixgbe/ixgbe_flow.c +1 -1
index 511b612f7f..27322ab903 100644
@@ -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"
drivers/net/ixgbe/ixgbe_tm.c +1 -1
index a8407e742e..ae03ea6e9d 100644
@@ -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;
drivers/net/ixgbe/meson.build +3 -6
index 55ac91fcd1..162f8d5f46 100644
@@ -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
Signature · 1 line
2.33.0.windows.2
#25 lore raw

Re: [dpdk-dev] [PATCH v5 4/4] net/ixgbe: build on Windows

07/10/2021 00:35, William Tu:

Quoted 1 line

+- 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.

doc/guides/nics/ixgbe.rst vPMD for RX would be disabled. · line 57

Quoted 4 lines
doc/guides/nics/ixgbe.rst +4 -0
+
+- 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".

#26 lore raw

Re: [dpdk-dev] [PATCH v4 0/4] net/ixgbe: build on Windows

In reply to William Tu

07/10/2021 00:35, William Tu:

Quoted 11 lines

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.