Skip to contentSkip to conversation

net/iavf: enable on Windows

PATCH Superseded Pallavi Kadam 3 participants 20 messages May 28, 2021 – Sep 30, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/iavf: enable on Windows

This patch enables building the iAVF PMD on Windows.
- Replace x86intrin.h with rte_vect.h to avoid __m_prefetchw conflicting types
- Fix for pointer and integer sign warnings using Clang compiler on Windows
- Add extra cflags '-fno-asynchronous-unwind-tables'
to avoid MinGW build error:
Error: invalid register for .seh_savexmm
- Update release notes

---
 doc/guides/rel_notes/release_21_08.rst  |  4 ++++
 drivers/net/iavf/iavf.h                 |  3 ++-
 drivers/net/iavf/iavf_rxtx_vec_avx2.c   |  2 +-
 drivers/net/iavf/iavf_rxtx_vec_avx512.c |  2 +-
 drivers/net/iavf/meson.build            | 10 ++++------
 5 files changed, 12 insertions(+), 9 deletions(-)
doc/guides/rel_notes/release_21_08.rst +4 -0
index a6ecfdf3c..931f5c322 100644
@@ -55,6 +55,10 @@ New Features
      Also, make sure to start the actual text at the margin.
      =======================================================
 
+* **Updated Intel iavf driver.**
+
+  * Added Intel iavf support on Windows.
+
 
 Removed Items
 -------------
drivers/net/iavf/iavf.h +2 -1
index 4f5811ae8..9b46608b6 100644
@@ -286,7 +286,8 @@ _clear_cmd(struct iavf_info *vf)
 static inline int
 _atomic_set_cmd(struct iavf_info *vf, enum virtchnl_ops ops)
 {
-	int ret = rte_atomic32_cmpset(&vf->pend_cmd, VIRTCHNL_OP_UNKNOWN, ops);
+	int ret = rte_atomic32_cmpset((volatile uint32_t *)&vf->pend_cmd,
+		VIRTCHNL_OP_UNKNOWN, ops);
 
 	if (!ret)
 		PMD_DRV_LOG(ERR, "There is incomplete cmd %d", vf->pend_cmd);
drivers/net/iavf/iavf_rxtx_vec_avx2.c +1 -1
index f5646d645..60ff3e356 100644
@@ -4,7 +4,7 @@
 
 #include "iavf_rxtx_vec_common.h"
 
-#include <x86intrin.h>
+#include <rte_vect.h>
 
 #ifndef __INTEL_COMPILER
 #pragma GCC diagnostic ignored "-Wcast-qual"
drivers/net/iavf/iavf_rxtx_vec_avx512.c +1 -1
index d99de2a8b..8669a71ba 100644
@@ -4,7 +4,7 @@
 
 #include "iavf_rxtx_vec_common.h"
 
-#include <x86intrin.h>
+#include <rte_vect.h>
 
 #ifndef __INTEL_COMPILER
 #pragma GCC diagnostic ignored "-Wcast-qual"
drivers/net/iavf/meson.build +4 -6
index 6f222a9e8..a6baa77ce 100644
@@ -1,12 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Luca Boccassi <[email protected]>
 
-if is_windows
-    build = false
-    reason = 'not supported on Windows'
-    subdir_done()
-endif
-
 cflags += ['-Wno-strict-aliasing']
 
 includes += include_directories('../../common/iavf')
@@ -24,6 +18,10 @@ sources = files(
 if arch_subdir == 'x86'
     sources += files('iavf_rxtx_vec_sse.c')
 
+    if is_windows and cc.get_id() != 'clang'
+        cflags += ['-fno-asynchronous-unwind-tables']
+    endif
+
     # compile AVX2 version if either:
     # a. we have AVX supported in minimum instruction set baseline
     # b. it's not minimum instruction set, but supported by compiler
Signature · 1 line
2.18.0.windows.1
#1 lore raw

v2 cover Support iavf PMD on Windows

This patch-set enables building the iavf PMD on Windows. Currently, it uses alarm functions so, depends on following series.

Depends-on: series-18447 ("net/iavf: enable interrupt polling")

v2 changes:
- rebase for 21.11
- Fix for 'random'

Pallavi Kadam (3):
net/iavf: build on Windows
lib/net: fix support of random
doc: update iavf PMD and 21.11 release notes

 doc/guides/nics/intel_vf.rst            | 17 +++++++++++++++++
 doc/guides/rel_notes/release_21_11.rst  |  4 ++++
 drivers/net/iavf/iavf.h                 |  3 ++-
 drivers/net/iavf/iavf_rxtx_vec_avx2.c   |  2 +-
 drivers/net/iavf/iavf_rxtx_vec_avx512.c |  2 +-
 drivers/net/iavf/iavf_tm.c              |  2 +-
 drivers/net/iavf/meson.build            |  9 ++++-----
 lib/net/rte_ether.c                     |  4 ----
 8 files changed, 30 insertions(+), 13 deletions(-)
Signature · 1 line
2.31.1.windows.1
#2 lore raw

PATCH v2 1/3 net/iavf: build on Windows

- Enable IAVF PMD build on Windows
- Replace x86intrin.h with rte_vect.h to avoid __m_prefetchw conflicting types
- Fix for pointer and integer sign warnings using Clang compiler on Windows
- Add extra cflags '-fno-asynchronous-unwind-tables'
to avoid MinGW build error:
Error: invalid register for .seh_savexmm

---
 drivers/net/iavf/iavf.h                 | 3 ++-
 drivers/net/iavf/iavf_rxtx_vec_avx2.c   | 2 +-
 drivers/net/iavf/iavf_rxtx_vec_avx512.c | 2 +-
 drivers/net/iavf/iavf_tm.c              | 2 +-
 drivers/net/iavf/meson.build            | 9 ++++-----
 5 files changed, 9 insertions(+), 9 deletions(-)
drivers/net/iavf/iavf.h +2 -1
index b3bd078111..55b20a80af 100644
@@ -335,7 +335,8 @@ _clear_cmd(struct iavf_info *vf)
 static inline int
 _atomic_set_cmd(struct iavf_info *vf, enum virtchnl_ops ops)
 {
-	int ret = rte_atomic32_cmpset(&vf->pend_cmd, VIRTCHNL_OP_UNKNOWN, ops);
+	int ret = rte_atomic32_cmpset((volatile uint32_t *)&vf->pend_cmd,
+		VIRTCHNL_OP_UNKNOWN, ops);
 
 	if (!ret)
 		PMD_DRV_LOG(ERR, "There is incomplete cmd %d", vf->pend_cmd);
drivers/net/iavf/iavf_rxtx_vec_avx2.c +1 -1
index 475070e036..96c05d9319 100644
@@ -4,7 +4,7 @@
 
 #include "iavf_rxtx_vec_common.h"
 
-#include <x86intrin.h>
+#include <rte_vect.h>
 
 #ifndef __INTEL_COMPILER
 #pragma GCC diagnostic ignored "-Wcast-qual"
drivers/net/iavf/iavf_rxtx_vec_avx512.c +1 -1
index 571161c0cd..cb0b057b0f 100644
@@ -4,7 +4,7 @@
 
 #include "iavf_rxtx_vec_common.h"
 
-#include <x86intrin.h>
+#include <rte_vect.h>
 
 #ifndef __INTEL_COMPILER
 #pragma GCC diagnostic ignored "-Wcast-qual"
drivers/net/iavf/iavf_tm.c +1 -1
index 3c80276ff3..8d92062c7f 100644
@@ -321,7 +321,7 @@ iavf_tm_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/iavf/meson.build +4 -5
index f2010a8337..36a82e3faa 100644
@@ -1,11 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Luca Boccassi <[email protected]>
 
-if is_windows
-    build = false
-    reason = 'not supported on Windows'
-    subdir_done()
-endif
 
 cflags += ['-Wno-strict-aliasing']
 
@@ -25,6 +20,10 @@ sources = files(
 if arch_subdir == 'x86'
     sources += files('iavf_rxtx_vec_sse.c')
 
+    if is_windows and cc.get_id() != 'clang'
+        cflags += ['-fno-asynchronous-unwind-tables']
+    endif
+
     # compile AVX2 version if either:
     # a. we have AVX supported in minimum instruction set baseline
     # b. it's not minimum instruction set, but supported by compiler
Signature · 1 line
2.31.1.windows.1
#3 lore raw

PATCH v2 2/3 lib/net: fix support of random

In reply to Pallavi Kadam

IAVF PMD needs to generate a random MAC address if it is not configured by host.
'random' is now supported on Windows.

Fixes 16f0d03098cb ("net: build on Windows")
---
 lib/net/rte_ether.c | 4 ----
 1 file changed, 4 deletions(-)
lib/net/rte_ether.c +0 -4
index 34605838b5..ced65ed9f3 100644
@@ -10,16 +10,12 @@
 void
 rte_eth_random_addr(uint8_t *addr)
 {
-#ifdef RTE_EXEC_ENV_WINDOWS /* FIXME: random is not supported */
-	RTE_SET_USED(addr);
-#else
 	uint64_t rand = rte_rand();
 	uint8_t *p = (uint8_t *)&rand;
 
 	rte_memcpy(addr, p, RTE_ETHER_ADDR_LEN);
 	addr[0] &= (uint8_t)~RTE_ETHER_GROUP_ADDR;	/* clear multicast bit */
 	addr[0] |= RTE_ETHER_LOCAL_ADMIN_ADDR;	/* set local assignment bit */
-#endif
 }
 
 void
Signature · 1 line
2.31.1.windows.1
#4 lore raw

PATCH v2 3/3 doc: update iavf PMD and 21.11 release notes

In reply to Pallavi Kadam

Add documentation to support iavf PMD on Windows.
Update the release notes for the same.

---
 doc/guides/nics/intel_vf.rst           | 17 +++++++++++++++++
 doc/guides/rel_notes/release_21_11.rst |  4 ++++
 2 files changed, 21 insertions(+)
doc/guides/nics/intel_vf.rst +17 -0
index fcea8151bf..27f8b5093e 100644
@@ -616,3 +616,20 @@ which belongs to the destination VF on the VM.
 .. figure:: img/inter_vm_comms.*
 
    Inter-VM Communication
+
+
+Windows Support
+---------------
+
+*   IAVF PMD currently is supported only inside Windows guest created on Linux host.
+
+*   Physical PCI resources are exposed as virtual functions into Windows VM using SR-IOV pass through feature.
+
+*   Create a Windows guest on Linux host using KVM hypervisor. Refer to the steps mentioned in the above section "Setting Up a KVM Virtual Machine monitor"
+
+*   In the Host machine, download and install the kernel Ethernet driver from: `https://www.intel.com/content/www/us/en/download-center/home.html?agr=Y&amp;DwnldID=14687`.
+
+*   For Windows guest, install NetUIO driver in place of existing built-in(inbox) Virtual Function driver.
+
+*   To load NetUIO driver, follow the steps mentioned in `dpdk-kmods repository
+  <https://git.dpdk.org/dpdk-kmods/tree/windows/netuio/README.rst>`_.
doc/guides/rel_notes/release_21_11.rst +4 -0
index 675b573834..f5ae66a0ef 100644
@@ -62,6 +62,10 @@ New Features
   * Added bus-level parsing of the devargs syntax.
   * Kept compatibility with the legacy syntax as parsing fallback.
 
+* **Updated Intel iavf driver.**
+
+  * Added Intel iavf support on Windows.
+
 
 Removed Items
 -------------
Signature · 1 line
2.31.1.windows.1
#5 lore raw

v3 cover Support iavf PMD on Windows

In reply to Pallavi Kadam

This patch-set enables building the iavf PMD on Windows. Currently, it uses alarm functions so, depends on following series.

Depends-on: series-18447 ("net/iavf: enable interrupt polling")

v3 changes:
- Fix doc build warning
v2 changes:
- Rebase for 21.11
- Fix for 'random'

Pallavi Kadam (3):
net/iavf: build on Windows
lib/net: fix support of random
doc: update iavf PMD and 21.11 release notes

 doc/guides/nics/intel_vf.rst            | 18 ++++++++++++++++++
 doc/guides/rel_notes/release_21_11.rst  |  4 ++++
 drivers/net/iavf/iavf.h                 |  3 ++-
 drivers/net/iavf/iavf_rxtx_vec_avx2.c   |  2 +-
 drivers/net/iavf/iavf_rxtx_vec_avx512.c |  2 +-
 drivers/net/iavf/iavf_tm.c              |  2 +-
 drivers/net/iavf/meson.build            |  9 ++++-----
 lib/net/rte_ether.c                     |  4 ----
 8 files changed, 31 insertions(+), 13 deletions(-)
Signature · 1 line
2.31.1.windows.1
#6 lore raw

PATCH v3 1/3 net/iavf: build on Windows

- Enable IAVF PMD build on Windows
- Replace x86intrin.h with rte_vect.h to avoid __m_prefetchw conflicting types
- Fix for pointer and integer sign warnings using Clang compiler on Windows
- Add extra cflags '-fno-asynchronous-unwind-tables'
to avoid MinGW build error:
Error: invalid register for .seh_savexmm

---
 drivers/net/iavf/iavf.h                 | 3 ++-
 drivers/net/iavf/iavf_rxtx_vec_avx2.c   | 2 +-
 drivers/net/iavf/iavf_rxtx_vec_avx512.c | 2 +-
 drivers/net/iavf/iavf_tm.c              | 2 +-
 drivers/net/iavf/meson.build            | 9 ++++-----
 5 files changed, 9 insertions(+), 9 deletions(-)
drivers/net/iavf/iavf.h +2 -1
index b3bd078111..55b20a80af 100644
@@ -335,7 +335,8 @@ _clear_cmd(struct iavf_info *vf)
 static inline int
 _atomic_set_cmd(struct iavf_info *vf, enum virtchnl_ops ops)
 {
-	int ret = rte_atomic32_cmpset(&vf->pend_cmd, VIRTCHNL_OP_UNKNOWN, ops);
+	int ret = rte_atomic32_cmpset((volatile uint32_t *)&vf->pend_cmd,
+		VIRTCHNL_OP_UNKNOWN, ops);
 
 	if (!ret)
 		PMD_DRV_LOG(ERR, "There is incomplete cmd %d", vf->pend_cmd);
drivers/net/iavf/iavf_rxtx_vec_avx2.c +1 -1
index 475070e036..96c05d9319 100644
@@ -4,7 +4,7 @@
 
 #include "iavf_rxtx_vec_common.h"
 
-#include <x86intrin.h>
+#include <rte_vect.h>
 
 #ifndef __INTEL_COMPILER
 #pragma GCC diagnostic ignored "-Wcast-qual"
drivers/net/iavf/iavf_rxtx_vec_avx512.c +1 -1
index 571161c0cd..cb0b057b0f 100644
@@ -4,7 +4,7 @@
 
 #include "iavf_rxtx_vec_common.h"
 
-#include <x86intrin.h>
+#include <rte_vect.h>
 
 #ifndef __INTEL_COMPILER
 #pragma GCC diagnostic ignored "-Wcast-qual"
drivers/net/iavf/iavf_tm.c +1 -1
index 3c80276ff3..8d92062c7f 100644
@@ -321,7 +321,7 @@ iavf_tm_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/iavf/meson.build +4 -5
index f2010a8337..36a82e3faa 100644
@@ -1,11 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Luca Boccassi <[email protected]>
 
-if is_windows
-    build = false
-    reason = 'not supported on Windows'
-    subdir_done()
-endif
 
 cflags += ['-Wno-strict-aliasing']
 
@@ -25,6 +20,10 @@ sources = files(
 if arch_subdir == 'x86'
     sources += files('iavf_rxtx_vec_sse.c')
 
+    if is_windows and cc.get_id() != 'clang'
+        cflags += ['-fno-asynchronous-unwind-tables']
+    endif
+
     # compile AVX2 version if either:
     # a. we have AVX supported in minimum instruction set baseline
     # b. it's not minimum instruction set, but supported by compiler
Signature · 1 line
2.31.1.windows.1
Reviewed-by Ranjit Menon on v3 1/3
#7 lore raw

Re: [dpdk-dev] [PATCH v3 1/3] net/iavf: build on Windows

-----Original Message-----
From: Kadam, Pallavi <[email protected]>
Sent: Thursday, September 9, 2021 4:23 PM
To: [email protected]
Cc: [email protected]; Zhang, Qi Z <[email protected]>; [email protected]; [email protected]; [email protected]; Yigit, Ferruh <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Menon, Ranjit <[email protected]>; Shukla, Shivanshu <[email protected]>; Kadam, Pallavi <[email protected]>
Subject: [PATCH v3 1/3] net/iavf: build on Windows

- Enable IAVF PMD build on Windows
- Replace x86intrin.h with rte_vect.h to avoid __m_prefetchw conflicting types
- Fix for pointer and integer sign warnings using Clang compiler on Windows
- Add extra cflags '-fno-asynchronous-unwind-tables'
to avoid MinGW build error:
Error: invalid register for .seh_savexmm

---
 drivers/net/iavf/iavf.h                 | 3 ++-
 drivers/net/iavf/iavf_rxtx_vec_avx2.c   | 2 +-
 drivers/net/iavf/iavf_rxtx_vec_avx512.c | 2 +-
 drivers/net/iavf/iavf_tm.c              | 2 +-
 drivers/net/iavf/meson.build            | 9 ++++-----
 5 files changed, 9 insertions(+), 9 deletions(-)
drivers/net/iavf/iavf.h +2 -1
@@ -335,7 +335,8 @@ _clear_cmd(struct iavf_info *vf)  static inline int  _atomic_set_cmd(struct iavf_info *vf, enum virtchnl_ops ops)  {
-	int ret = rte_atomic32_cmpset(&vf->pend_cmd, VIRTCHNL_OP_UNKNOWN, ops);
+	int ret = rte_atomic32_cmpset((volatile uint32_t *)&vf->pend_cmd,
+		VIRTCHNL_OP_UNKNOWN, ops);
 
 	if (!ret)
 		PMD_DRV_LOG(ERR, "There is incomplete cmd %d", vf->pend_cmd); diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx2.c b/drivers/net/iavf/iavf_rxtx_vec_avx2.c

index 475070e036..96c05d9319 100644

drivers/net/iavf/iavf_rxtx_vec_avx2.c +1 -1
@@ -4,7 +4,7 @@
 
 #include "iavf_rxtx_vec_common.h"
 
-#include <x86intrin.h>
+#include <rte_vect.h>
 
 #ifndef __INTEL_COMPILER
 #pragma GCC diagnostic ignored "-Wcast-qual"
drivers/net/iavf/iavf_rxtx_vec_avx512.c +1 -1
index 571161c0cd..cb0b057b0f 100644
@@ -4,7 +4,7 @@
 
 #include "iavf_rxtx_vec_common.h"
 
-#include <x86intrin.h>
+#include <rte_vect.h>
 
 #ifndef __INTEL_COMPILER
 #pragma GCC diagnostic ignored "-Wcast-qual"
drivers/net/iavf/iavf_tm.c +1 -1
@@ -321,7 +321,7 @@ iavf_tm_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/iavf/meson.build +4 -5
@@ -1,11 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause  # Copyright(c) 2018 Luca Boccassi <[email protected]>
 
-if is_windows
-    build = false
-    reason = 'not supported on Windows'
-    subdir_done()
-endif
 
 cflags += ['-Wno-strict-aliasing']
 
@@ -25,6 +20,10 @@ sources = files(
 if arch_subdir == 'x86'
     sources += files('iavf_rxtx_vec_sse.c')
 
+    if is_windows and cc.get_id() != 'clang'
+        cflags += ['-fno-asynchronous-unwind-tables']
+    endif
+
     # compile AVX2 version if either:
     # a. we have AVX supported in minimum instruction set baseline
     # b. it's not minimum instruction set, but supported by compiler

--
2.31.1.windows.1

#8 lore raw

PATCH v3 2/3 lib/net: fix support of random

In reply to Pallavi Kadam

IAVF PMD needs to generate a random MAC address if it is not configured by host.
'random' is now supported on Windows.

Fixes 16f0d03098cb ("net: build on Windows")
---
 lib/net/rte_ether.c | 4 ----
 1 file changed, 4 deletions(-)
lib/net/rte_ether.c +0 -4
index 34605838b5..ced65ed9f3 100644
@@ -10,16 +10,12 @@
 void
 rte_eth_random_addr(uint8_t *addr)
 {
-#ifdef RTE_EXEC_ENV_WINDOWS /* FIXME: random is not supported */
-	RTE_SET_USED(addr);
-#else
 	uint64_t rand = rte_rand();
 	uint8_t *p = (uint8_t *)&rand;
 
 	rte_memcpy(addr, p, RTE_ETHER_ADDR_LEN);
 	addr[0] &= (uint8_t)~RTE_ETHER_GROUP_ADDR;	/* clear multicast bit */
 	addr[0] |= RTE_ETHER_LOCAL_ADMIN_ADDR;	/* set local assignment bit */
-#endif
 }
 
 void
Signature · 1 line
2.31.1.windows.1
Reviewed-by Ranjit Menon on v3 2/3
#9 lore raw

Re: [dpdk-dev] [PATCH v3 2/3] lib/net: fix support of random

-----Original Message-----
From: Kadam, Pallavi <[email protected]>
Sent: Thursday, September 9, 2021 4:23 PM
To: [email protected]
Cc: [email protected]; Zhang, Qi Z <[email protected]>; [email protected]; [email protected]; [email protected]; Yigit, Ferruh <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Menon, Ranjit <[email protected]>; Shukla, Shivanshu <[email protected]>; Kadam, Pallavi <[email protected]>
Subject: [PATCH v3 2/3] lib/net: fix support of random

IAVF PMD needs to generate a random MAC address if it is not configured by host. 'random' is now supported on Windows.

Fixes 16f0d03098cb ("net: build on Windows")
---
 lib/net/rte_ether.c | 4 ----
 1 file changed, 4 deletions(-)
lib/net/rte_ether.c +0 -4
@@ -10,16 +10,12 @@
 void
 rte_eth_random_addr(uint8_t *addr)
 {
-#ifdef RTE_EXEC_ENV_WINDOWS /* FIXME: random is not supported */
-	RTE_SET_USED(addr);
-#else
 	uint64_t rand = rte_rand();
 	uint8_t *p = (uint8_t *)&rand;
 
 	rte_memcpy(addr, p, RTE_ETHER_ADDR_LEN);
 	addr[0] &= (uint8_t)~RTE_ETHER_GROUP_ADDR;	/* clear multicast bit */
 	addr[0] |= RTE_ETHER_LOCAL_ADMIN_ADDR;	/* set local assignment bit */
-#endif
 }
 
 void

--
2.31.1.windows.1

#10 lore raw

Re: [dpdk-dev] [PATCH v3 2/3] lib/net: fix support of random

In reply to Pallavi Kadam

10/09/2021 01:23, Pallavi Kadam:

Quoted 3 lines

IAVF PMD needs to generate a random MAC address if it is not configured by host.
'random' is now supported on Windows.

This patch can be the first of this series
to respect the dependency order.

Quoted 3 lines
Fixes 16f0d03098cb ("net: build on Windows")

This commit log does not explain why it was disabled before, and what makes it possible now, but for sure, there is no need to backport.
I will remove above lines.

Quoted 16 lines

---
rte_eth_random_addr(uint8_t *addr)
{

lib/net/rte_ether.c +0 -4
-#ifdef RTE_EXEC_ENV_WINDOWS /* FIXME: random is not supported */
-	RTE_SET_USED(addr);
-#else
 	uint64_t rand = rte_rand();
 	uint8_t *p = (uint8_t *)&rand;
 
 	rte_memcpy(addr, p, RTE_ETHER_ADDR_LEN);
 	addr[0] &= (uint8_t)~RTE_ETHER_GROUP_ADDR;	/* clear multicast bit */
 	addr[0] |= RTE_ETHER_LOCAL_ADMIN_ADDR;	/* set local assignment bit */
-#endif
 }
#11 lore raw

Re: [dpdk-dev] [PATCH v3 2/3] lib/net: fix support of random

Quoted 4 lines · Thomas Monjalon

10/09/2021 01:23, Pallavi Kadam:

Quoted 3 lines

IAVF PMD needs to generate a random MAC address if it is not configured by host.
'random' is now supported on Windows.

Quoted 8 lines

This patch can be the first of this series
to respect the dependency order.

Quoted 3 lines
Fixes 16f0d03098cb ("net: build on Windows")

This commit log does not explain why it was disabled before, and what makes it possible now, but for sure,

At the time rte_rand was not exported to Windows.

We were adding the files to eal/common as and when required in the Windows build.

So, rte_random.c was added in 21.02 release after Fady's patch was already merged.

Quoted 1 line

there is no need to backport.

ok

Quoted 1 line

I will remove above lines.

Thank you!

Quoted 19 lines
Quoted 17 lines

---
rte_eth_random_addr(uint8_t *addr)
{

lib/net/rte_ether.c +0 -4
-#ifdef RTE_EXEC_ENV_WINDOWS /* FIXME: random is not supported */
-	RTE_SET_USED(addr);
-#else
  	uint64_t rand = rte_rand();
  	uint8_t *p = (uint8_t *)&rand;
 
  	rte_memcpy(addr, p, RTE_ETHER_ADDR_LEN);
  	addr[0] &= (uint8_t)~RTE_ETHER_GROUP_ADDR;	/* clear multicast bit */
  	addr[0] |= RTE_ETHER_LOCAL_ADMIN_ADDR;	/* set local assignment bit */
-#endif
  }
#12 lore raw

PATCH v3 3/3 doc: update iavf PMD and 21.11 release notes

In reply to Pallavi Kadam

Add documentation to support iavf PMD on Windows.
Update the release notes for the same.

---
 doc/guides/nics/intel_vf.rst           | 18 ++++++++++++++++++
 doc/guides/rel_notes/release_21_11.rst |  4 ++++
 2 files changed, 22 insertions(+)
doc/guides/nics/intel_vf.rst +18 -0
index fcea8151bf..20b89431a4 100644
@@ -616,3 +616,21 @@ which belongs to the destination VF on the VM.
 .. figure:: img/inter_vm_comms.*
 
    Inter-VM Communication
+
+
+Windows Support
+---------------
+
+*   IAVF PMD currently is supported only inside Windows guest created on Linux host.
+
+*   Physical PCI resources are exposed as virtual functions into Windows VM using SR-IOV pass through feature.
+
+*   Create a Windows guest on Linux host using KVM hypervisor. Refer to the steps mentioned in the above section "Setting Up a KVM Virtual Machine monitor"
+
+*   In the Host machine, download and install the kernel Ethernet driver from:
+    `http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&amp;DwnldID=14687 <http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&amp;DwnldID=14687>`_
+
+*   For Windows guest, install NetUIO driver in place of existing built-in(inbox) Virtual Function driver.
+
+*   To load NetUIO driver, follow the steps mentioned in `dpdk-kmods repository
+    <https://git.dpdk.org/dpdk-kmods/tree/windows/netuio/README.rst>`_.
doc/guides/rel_notes/release_21_11.rst +4 -0
index 675b573834..f5ae66a0ef 100644
@@ -62,6 +62,10 @@ New Features
   * Added bus-level parsing of the devargs syntax.
   * Kept compatibility with the legacy syntax as parsing fallback.
 
+* **Updated Intel iavf driver.**
+
+  * Added Intel iavf support on Windows.
+
 
 Removed Items
 -------------
Signature · 1 line
2.31.1.windows.1
Reviewed-by Ranjit Menon on v3 3/3
#13 lore raw

Re: [dpdk-dev] [PATCH v3 3/3] doc: update iavf PMD and 21.11 release notes

-----Original Message-----
From: Kadam, Pallavi <[email protected]>
Sent: Thursday, September 9, 2021 4:23 PM
To: [email protected]
Cc: [email protected]; Zhang, Qi Z <[email protected]>; [email protected]; [email protected]; [email protected]; Yigit, Ferruh <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Menon, Ranjit <[email protected]>; Shukla, Shivanshu <[email protected]>; Kadam, Pallavi <[email protected]>
Subject: [PATCH v3 3/3] doc: update iavf PMD and 21.11 release notes

Add documentation to support iavf PMD on Windows.
Update the release notes for the same.

---
 doc/guides/nics/intel_vf.rst           | 18 ++++++++++++++++++
 doc/guides/rel_notes/release_21_11.rst |  4 ++++
 2 files changed, 22 insertions(+)
doc/guides/nics/intel_vf.rst +18 -0
@@ -616,3 +616,21 @@ which belongs to the destination VF on the VM.
 .. figure:: img/inter_vm_comms.*
 
    Inter-VM Communication
+
+
+Windows Support
+---------------
+
+*   IAVF PMD currently is supported only inside Windows guest created on Linux host.
+
+*   Physical PCI resources are exposed as virtual functions into Windows VM using SR-IOV pass through feature.
+
+*   Create a Windows guest on Linux host using KVM hypervisor. Refer to the steps mentioned in the above section "Setting Up a KVM Virtual Machine monitor"
+
+*   In the Host machine, download and install the kernel Ethernet driver from:
+    
+`http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&amp;DwnldID=146
+87 
+<http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&amp;DwnldID=146
+87>`_
+

+* For Windows guest, install NetUIO driver in place of existing built-in(inbox) Virtual Function driver.
+
+* To load NetUIO driver, follow the steps mentioned in `dpdk-kmods repository
+ <https://git.dpdk.org/dpdk-kmods/tree/windows/netuio/README.rst>`_.

doc/guides/rel_notes/release_21_11.rst +4 -0
index 675b573834..f5ae66a0ef 100644
@@ -62,6 +62,10 @@ New Features
   * Added bus-level parsing of the devargs syntax.
   * Kept compatibility with the legacy syntax as parsing fallback.
 
+* **Updated Intel iavf driver.**
+
+  * Added Intel iavf support on Windows.
+
 
 Removed Items
 -------------

--
2.31.1.windows.1

#14 lore raw

Re: [dpdk-dev] [PATCH v3 3/3] doc: update iavf PMD and 21.11 release notes

In reply to Pallavi Kadam

10/09/2021 01:23, Pallavi Kadam:

Quoted 9 lines

Add documentation to support iavf PMD on Windows.
Update the release notes for the same.

---
 doc/guides/nics/intel_vf.rst           | 18 ++++++++++++++++++
 doc/guides/rel_notes/release_21_11.rst |  4 ++++
 2 files changed, 22 insertions(+)

It should be squashed with the patch enabling IAVF on Windows. In general, doc should not be updated separately.

#15 lore raw

Re: [dpdk-dev] [PATCH v3 3/3] doc: update iavf PMD and 21.11 release notes

In reply to Pallavi Kadam

10/09/2021 01:23, Pallavi Kadam:

Quoted 8 lines

Add documentation to support iavf PMD on Windows.
Update the release notes for the same.

---

doc/guides/nics/intel_vf.rst which belongs to the destination VF on the VM. · line 628

Quoted 8 lines
doc/guides/nics/intel_vf.rst +8 -0
+Windows Support
+---------------
+
+*   IAVF PMD currently is supported only inside Windows guest created on Linux host.
+
+*   Physical PCI resources are exposed as virtual functions into Windows VM using SR-IOV pass through feature.
+
+*   Create a Windows guest on Linux host using KVM hypervisor. Refer to the steps mentioned in the above section "Setting Up a KVM Virtual Machine monitor"

It should be an internal hyperlink.

doc/guides/nics/intel_vf.rst which belongs to the destination VF on the VM. · line 631

Quoted 3 lines
doc/guides/nics/intel_vf.rst +3 -0
+
+*   In the Host machine, download and install the kernel Ethernet driver from:
+    `http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&amp;DwnldID=14687 <http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&amp;DwnldID=14687>`_

No need to print the full URL as hyperlink.

Quoted 5 lines
doc/guides/nics/intel_vf.rst +5 -0
+
+*   For Windows guest, install NetUIO driver in place of existing built-in(inbox) Virtual Function driver.
+
+*   To load NetUIO driver, follow the steps mentioned in `dpdk-kmods repository
+    <https://git.dpdk.org/dpdk-kmods/tree/windows/netuio/README.rst>`_.
#16 lore raw

Re: [dpdk-dev] [PATCH v3 0/3] Support iavf PMD on Windows

In reply to Pallavi Kadam
Quoted 26 lines · Pallavi Kadam

This patch-set enables building the iavf PMD on Windows. Currently, it uses alarm functions so, depends on following series.

Depends-on: series-18447 ("net/iavf: enable interrupt polling")

v3 changes:
- Fix doc build warning
v2 changes:
- Rebase for 21.11
- Fix for 'random'

Pallavi Kadam (3):
net/iavf: build on Windows
lib/net: fix support of random
doc: update iavf PMD and 21.11 release notes

  doc/guides/nics/intel_vf.rst            | 18 ++++++++++++++++++
  doc/guides/rel_notes/release_21_11.rst  |  4 ++++
  drivers/net/iavf/iavf.h                 |  3 ++-
  drivers/net/iavf/iavf_rxtx_vec_avx2.c   |  2 +-
  drivers/net/iavf/iavf_rxtx_vec_avx512.c |  2 +-
  drivers/net/iavf/iavf_tm.c              |  2 +-
  drivers/net/iavf/meson.build            |  9 ++++-----
  lib/net/rte_ether.c                     |  4 ----
  8 files changed, 31 insertions(+), 13 deletions(-)
#17 lore raw

Re: [dpdk-dev] [PATCH v3 0/3] Support iavf PMD on Windows

In reply to Pallavi Kadam

-----Original Message-----
From: Kadam, Pallavi <[email protected]>
Sent: Thursday, September 9, 2021 4:23 PM
To: [email protected]
Cc: [email protected]; Zhang, Qi Z <[email protected]>; [email protected]; [email protected]; [email protected]; Yigit, Ferruh <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Menon, Ranjit <[email protected]>; Shukla, Shivanshu <[email protected]>; Kadam, Pallavi <[email protected]>
Subject: [PATCH v3 0/3] Support iavf PMD on Windows

This patch-set enables building the iavf PMD on Windows. Currently, it uses alarm functions so, depends on following series.

Depends-on: series-18447 ("net/iavf: enable interrupt polling")

v3 changes:
- Fix doc build warning
v2 changes:
- Rebase for 21.11
- Fix for 'random'

Pallavi Kadam (3):
net/iavf: build on Windows
lib/net: fix support of random
doc: update iavf PMD and 21.11 release notes

 doc/guides/nics/intel_vf.rst            | 18 ++++++++++++++++++
 doc/guides/rel_notes/release_21_11.rst  |  4 ++++
 drivers/net/iavf/iavf.h                 |  3 ++-
 drivers/net/iavf/iavf_rxtx_vec_avx2.c   |  2 +-
 drivers/net/iavf/iavf_rxtx_vec_avx512.c |  2 +-
 drivers/net/iavf/iavf_tm.c              |  2 +-
 drivers/net/iavf/meson.build            |  9 ++++-----
 lib/net/rte_ether.c                     |  4 ----
 8 files changed, 31 insertions(+), 13 deletions(-)
Signature · 1 line
2.31.1.windows.1
Acked-by on the v3 series
#18 lore raw

Re: [dpdk-dev] [PATCH v3 0/3] Support iavf PMD on Windows

In reply to Pallavi Kadam
Quoted 26 lines · Pallavi

This patch-set enables building the iavf PMD on Windows. Currently, it uses alarm functions so, depends on following series.

Depends-on: series-18447 ("net/iavf: enable interrupt polling")

v3 changes:
- Fix doc build warning
v2 changes:
- Rebase for 21.11
- Fix for 'random'

Pallavi Kadam (3):
net/iavf: build on Windows
lib/net: fix support of random
doc: update iavf PMD and 21.11 release notes

  doc/guides/nics/intel_vf.rst            | 18 ++++++++++++++++++
  doc/guides/rel_notes/release_21_11.rst  |  4 ++++
  drivers/net/iavf/iavf.h                 |  3 ++-
  drivers/net/iavf/iavf_rxtx_vec_avx2.c   |  2 +-
  drivers/net/iavf/iavf_rxtx_vec_avx512.c |  2 +-
  drivers/net/iavf/iavf_tm.c              |  2 +-
  drivers/net/iavf/meson.build            |  9 ++++-----
  lib/net/rte_ether.c                     |  4 ----
  8 files changed, 31 insertions(+), 13 deletions(-)
Quoted 1 line

--

#19 lore raw

Re: [dpdk-dev] [PATCH v3 0/3] Support iavf PMD on Windows

In reply to Pallavi Kadam
Quoted 4 lines

Pallavi Kadam (3):
net/iavf: build on Windows
lib/net: fix support of random
doc: update iavf PMD and 21.11 release notes

Applied with improvements and intel.com links fixed.