* [dpdk-dev] [PATCH v1] net/ixgbe: Add support for Windows
@ 2021-09-15 18:44 William Tu
2021-09-15 19:05 ` Dmitry Kozlyuk
2021-09-22 20:58 ` [dpdk-dev] [PATCH v2] " William Tu
0 siblings, 2 replies; 8+ messages in thread
From: William Tu @ 2021-09-15 18:44 UTC (permalink / raw)
To: dev; +Cc: pallavi.kadam, ranjit.menon, 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 | 10 ++++++++++
drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
drivers/net/ixgbe/ixgbe_flow.c | 2 +-
drivers/net/ixgbe/ixgbe_tm.c | 2 +-
drivers/net/ixgbe/meson.build | 6 ------
lib/cryptodev/rte_cryptodev.c | 4 ++++
lib/cryptodev/version.map | 2 --
lib/meson.build | 2 ++
lib/security/rte_security.h | 4 ++++
lib/security/version.map | 1 -
11 files changed, 24 insertions(+), 12 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..fe28029ef7 100644
--- a/drivers/net/ixgbe/base/ixgbe_osdep.h
+++ b/drivers/net/ixgbe/base/ixgbe_osdep.h
@@ -17,6 +17,12 @@
#include <rte_byteorder.h>
#include <rte_io.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
+#include <netinet/in.h>
+#else
+#include <Ws2tcpip.h>
+#endif
+
#include "../ixgbe_logs.h"
#include "../ixgbe_bypass_defines.h"
@@ -43,12 +49,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/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_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')
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 9fa3aff1d3..dd09e82240 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -12,7 +12,11 @@
#include <errno.h>
#include <stdint.h>
#include <inttypes.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <netinet/in.h>
+#else
+#include <Ws2tcpip.h>
+#endif
#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 1673ca4323..c26641f217 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -85,6 +85,8 @@ if is_windows
'gso',
'latencystats',
'pdump',
+ 'cryptodev',
+ 'security',
] # only supported libraries for windows
endif
diff --git a/lib/security/rte_security.h b/lib/security/rte_security.h
index 2e136d7929..b8ae88f7bf 100644
--- a/lib/security/rte_security.h
+++ b/lib/security/rte_security.h
@@ -19,9 +19,13 @@ extern "C" {
#include <sys/types.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/ip6.h>
+#else
+#include <Ws2tcpip.h>
+#endif
#include <rte_compat.h>
#include <rte_common.h>
diff --git a/lib/security/version.map b/lib/security/version.map
index c44c7f5f60..6067051552 100644
--- a/lib/security/version.map
+++ b/lib/security/version.map
@@ -1,7 +1,6 @@
DPDK_22 {
global:
- rte_security_attach_session;
rte_security_capabilities_get;
rte_security_capability_get;
rte_security_session_create;
--
2.30.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH v1] net/ixgbe: Add support for Windows
2021-09-15 18:44 [dpdk-dev] [PATCH v1] net/ixgbe: Add support for Windows William Tu
@ 2021-09-15 19:05 ` Dmitry Kozlyuk
2021-09-15 20:22 ` William Tu
2021-09-18 14:24 ` William Tu
2021-09-22 20:58 ` [dpdk-dev] [PATCH v2] " William Tu
1 sibling, 2 replies; 8+ messages in thread
From: Dmitry Kozlyuk @ 2021-09-15 19:05 UTC (permalink / raw)
To: William Tu; +Cc: dev, pallavi.kadam, ranjit.menon
2021-09-15 18:44 (UTC+0000), William Tu:
> This patch enables building the ixgbe driver for Windows.
> It also enables its dependencies on security and cryptodev.
Tal Shnaiderman posted patches for cryptodev and security today,
so I won't comment on that part. IMO your patch should depend on them
(https://doc.dpdk.org/guides/contributing/patches.html#patch-dependencies).
[...]
> diff --git a/drivers/net/ixgbe/base/ixgbe_osdep.h b/drivers/net/ixgbe/base/ixgbe_osdep.h
> index cacf724198..fe28029ef7 100644
> --- a/drivers/net/ixgbe/base/ixgbe_osdep.h
> +++ b/drivers/net/ixgbe/base/ixgbe_osdep.h
> @@ -17,6 +17,12 @@
> #include <rte_byteorder.h>
> #include <rte_io.h>
>
> +#ifndef RTE_EXEC_ENV_WINDOWS
> +#include <netinet/in.h>
> +#else
> +#include <Ws2tcpip.h>
> +#endif
> +
#include <rte_ip.h> instead.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH v1] net/ixgbe: Add support for Windows
2021-09-15 19:05 ` Dmitry Kozlyuk
@ 2021-09-15 20:22 ` William Tu
2021-09-18 14:24 ` William Tu
1 sibling, 0 replies; 8+ messages in thread
From: William Tu @ 2021-09-15 20:22 UTC (permalink / raw)
To: Dmitry Kozlyuk; +Cc: dpdk-dev, Pallavi Kadam, Ranjit Menon
On Wed, Sep 15, 2021 at 12:05 PM Dmitry Kozlyuk
<dmitry.kozliuk@gmail.com> wrote:
>
> 2021-09-15 18:44 (UTC+0000), William Tu:
> > This patch enables building the ixgbe driver for Windows.
> > It also enables its dependencies on security and cryptodev.
>
> Tal Shnaiderman posted patches for cryptodev and security today,
> so I won't comment on that part. IMO your patch should depend on them
> (https://doc.dpdk.org/guides/contributing/patches.html#patch-dependencies).
>
> [...]
> > diff --git a/drivers/net/ixgbe/base/ixgbe_osdep.h b/drivers/net/ixgbe/base/ixgbe_osdep.h
> > index cacf724198..fe28029ef7 100644
> > --- a/drivers/net/ixgbe/base/ixgbe_osdep.h
> > +++ b/drivers/net/ixgbe/base/ixgbe_osdep.h
> > @@ -17,6 +17,12 @@
> > #include <rte_byteorder.h>
> > #include <rte_io.h>
> >
> > +#ifndef RTE_EXEC_ENV_WINDOWS
> > +#include <netinet/in.h>
> > +#else
> > +#include <Ws2tcpip.h>
> > +#endif
> > +
>
> #include <rte_ip.h> instead.
Hi Dmitry,
Thanks for your feedback.
I will send v2.
William
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH v1] net/ixgbe: Add support for Windows
2021-09-15 19:05 ` Dmitry Kozlyuk
2021-09-15 20:22 ` William Tu
@ 2021-09-18 14:24 ` William Tu
2021-09-18 14:55 ` Dmitry Kozlyuk
1 sibling, 1 reply; 8+ messages in thread
From: William Tu @ 2021-09-18 14:24 UTC (permalink / raw)
To: Dmitry Kozlyuk; +Cc: dpdk-dev, Pallavi Kadam, Ranjit Menon, Tal Shnaiderman
On Wed, Sep 15, 2021 at 12:05 PM Dmitry Kozlyuk
<dmitry.kozliuk@gmail.com> wrote:
>
> 2021-09-15 18:44 (UTC+0000), William Tu:
> > This patch enables building the ixgbe driver for Windows.
> > It also enables its dependencies on security and cryptodev.
>
> Tal Shnaiderman posted patches for cryptodev and security today,
> so I won't comment on that part. IMO your patch should depend on them
> (https://doc.dpdk.org/guides/contributing/patches.html#patch-dependencies).
>
Hi Dmitry,
I checked Tal's patch and actually there is no dependency.
Tal's patch is at driver/crypto,
https://inbox.dpdk.org/dev/20210914053833.7760-8-talshn@nvidia.com/T/
and this patch is enabling lib/cryptodev and lib/security
I will send v2 by breaking the ixgbe part and lib/security and cryptodev part.
Thanks,
William
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH v1] net/ixgbe: Add support for Windows
2021-09-18 14:24 ` William Tu
@ 2021-09-18 14:55 ` Dmitry Kozlyuk
2021-09-18 15:10 ` William Tu
0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Kozlyuk @ 2021-09-18 14:55 UTC (permalink / raw)
To: William Tu; +Cc: dpdk-dev, Pallavi Kadam, Ranjit Menon, Tal Shnaiderman
2021-09-18 07:24 (UTC-0700), William Tu:
> On Wed, Sep 15, 2021 at 12:05 PM Dmitry Kozlyuk
> <dmitry.kozliuk@gmail.com> wrote:
> >
> > 2021-09-15 18:44 (UTC+0000), William Tu:
> > > This patch enables building the ixgbe driver for Windows.
> > > It also enables its dependencies on security and cryptodev.
> >
> > Tal Shnaiderman posted patches for cryptodev and security today,
> > so I won't comment on that part. IMO your patch should depend on them
> > (https://doc.dpdk.org/guides/contributing/patches.html#patch-dependencies).
> >
>
> Hi Dmitry,
>
> I checked Tal's patch and actually there is no dependency.
> Tal's patch is at driver/crypto,
> https://inbox.dpdk.org/dev/20210914053833.7760-8-talshn@nvidia.com/T/
> and this patch is enabling lib/cryptodev and lib/security
>
> I will send v2 by breaking the ixgbe part and lib/security and cryptodev part.
> Thanks,
> William
Hi William,
I meant these patches, not the patchset you linked:
1. Security: http://patchwork.dpdk.org/project/dpdk/list/?series=18943
2. Cryptodev: http://patchwork.dpdk.org/project/dpdk/list/?series=18880
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH v1] net/ixgbe: Add support for Windows
2021-09-18 14:55 ` Dmitry Kozlyuk
@ 2021-09-18 15:10 ` William Tu
0 siblings, 0 replies; 8+ messages in thread
From: William Tu @ 2021-09-18 15:10 UTC (permalink / raw)
To: Dmitry Kozlyuk; +Cc: dpdk-dev, Pallavi Kadam, Ranjit Menon, Tal Shnaiderman
On Sat, Sep 18, 2021 at 7:55 AM Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> wrote:
>
> 2021-09-18 07:24 (UTC-0700), William Tu:
> > On Wed, Sep 15, 2021 at 12:05 PM Dmitry Kozlyuk
> > <dmitry.kozliuk@gmail.com> wrote:
> > >
> > > 2021-09-15 18:44 (UTC+0000), William Tu:
> > > > This patch enables building the ixgbe driver for Windows.
> > > > It also enables its dependencies on security and cryptodev.
> > >
> > > Tal Shnaiderman posted patches for cryptodev and security today,
> > > so I won't comment on that part. IMO your patch should depend on them
> > > (https://doc.dpdk.org/guides/contributing/patches.html#patch-dependencies).
> > >
> >
> > Hi Dmitry,
> >
> > I checked Tal's patch and actually there is no dependency.
> > Tal's patch is at driver/crypto,
> > https://inbox.dpdk.org/dev/20210914053833.7760-8-talshn@nvidia.com/T/
> > and this patch is enabling lib/cryptodev and lib/security
> >
> > I will send v2 by breaking the ixgbe part and lib/security and cryptodev part.
> > Thanks,
> > William
>
> Hi William,
>
> I meant these patches, not the patchset you linked:
>
> 1. Security: http://patchwork.dpdk.org/project/dpdk/list/?series=18943
> 2. Cryptodev: http://patchwork.dpdk.org/project/dpdk/list/?series=18880
You're right! Thank you
William
^ permalink raw reply [flat|nested] 8+ messages in thread
* [dpdk-dev] [PATCH v2] net/ixgbe: Add support for Windows
2021-09-15 18:44 [dpdk-dev] [PATCH v1] net/ixgbe: Add support for Windows William Tu
2021-09-15 19:05 ` Dmitry Kozlyuk
@ 2021-09-22 20:58 ` William Tu
2021-09-22 21:01 ` William Tu
1 sibling, 1 reply; 8+ messages in thread
From: William Tu @ 2021-09-22 20:58 UTC (permalink / raw)
To: dev
This patch enables building the ixgbe driver for Windows.
It also enables its dependencies on security and cryptodev.
I tested on AWS using Intel Corporation 82599 Ethernet
Controller Virtual Function [8086:10ed], using dpdk-testpmd.
Signed-off-by: William Tu <u9012063@gmail.com>
---
Depends-on: series-18880 ("cryptodev: build on Windows")
Depends-on: series-18943 ("security: use the net library for IP structs")
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_flow.c | 2 +-
drivers/net/ixgbe/ixgbe_tm.c | 2 +-
drivers/net/ixgbe/meson.build | 6 ------
7 files changed, 16 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_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.30.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/ixgbe: Add support for Windows
2021-09-22 20:58 ` [dpdk-dev] [PATCH v2] " William Tu
@ 2021-09-22 21:01 ` William Tu
0 siblings, 0 replies; 8+ messages in thread
From: William Tu @ 2021-09-22 21:01 UTC (permalink / raw)
To: dpdk-dev; +Cc: Dmitry Kozliuk, Ranjit Menon, Pallavi Kadam
I forgot to add the CC list.
On Wed, Sep 22, 2021 at 1:58 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 Intel Corporation 82599 Ethernet
> Controller Virtual Function [8086:10ed], using dpdk-testpmd.
>
> Signed-off-by: William Tu <u9012063@gmail.com>
> ---
> Depends-on: series-18880 ("cryptodev: build on Windows")
> Depends-on: series-18943 ("security: use the net library for IP structs")
>
> 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_flow.c | 2 +-
> drivers/net/ixgbe/ixgbe_tm.c | 2 +-
> drivers/net/ixgbe/meson.build | 6 ------
> 7 files changed, 16 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_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.30.2
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-09-22 21:02 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-15 18:44 [dpdk-dev] [PATCH v1] net/ixgbe: Add support for Windows William Tu
2021-09-15 19:05 ` Dmitry Kozlyuk
2021-09-15 20:22 ` William Tu
2021-09-18 14:24 ` William Tu
2021-09-18 14:55 ` Dmitry Kozlyuk
2021-09-18 15:10 ` William Tu
2021-09-22 20:58 ` [dpdk-dev] [PATCH v2] " William Tu
2021-09-22 21:01 ` William Tu
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).