All of lore.kernel.org
 help / color / mirror / Atom feed
* [dpdk-dev] [RFC PATCH 00/10] Support MLX5 crypto driver on Windows
@ 2021-09-14  5:38 Tal Shnaiderman
  2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 01/10] common/mlx5: add DV enums to Windows defs file Tal Shnaiderman
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Tal Shnaiderman @ 2021-09-14  5:38 UTC (permalink / raw)
  To: dev
  Cc: thomas, matan, rasland, asafp, gakhil, declan.doherty,
	viacheslavo, eilong

Support the MLX5 crypto driver on Windows OS by moving the driver's
control path communication with the Kernel to be OS agnostic.
---
Depends-on: patch 98796 ("cryptodev: build on Windows")
---
Tal Shnaiderman (10):
  common/mlx5: add DV enums to Windows defs file
  common/mlx5: add an agnostic OS function to open device context
  common/mlx5: move pdn getter to common driver
  common/mlx5: add memory region OS agnostic functions for Linux
  crypto/mlx5: replace UNIX functions with EAL functions
  crypto/mlx5: use OS agnostic functions for UMEM operations
  crypto/mlx5: use OS agnostic functions for PD operations
  crypto/mlx5: use OS agnostic functions for Verbs operations
  crypto/mlx5: fix size of UMR WQE
  crypto/mlx5: support on Windows

 drivers/common/mlx5/linux/mlx5_common_os.c   |  98 +++++++++++++++++++
 drivers/common/mlx5/mlx5_common.h            |  17 ++++
 drivers/common/mlx5/version.map              |   5 +-
 drivers/common/mlx5/windows/mlx5_common_os.c | 141 ++++++++++++++++++++++++++-
 drivers/common/mlx5/windows/mlx5_common_os.h |   8 +-
 drivers/common/mlx5/windows/mlx5_win_defs.h  |  12 +++
 drivers/crypto/aesni_gcm/meson.build         |   6 ++
 drivers/crypto/aesni_mb/meson.build          |   6 ++
 drivers/crypto/armv8/meson.build             |   6 ++
 drivers/crypto/bcmfs/meson.build             |   6 ++
 drivers/crypto/ccp/meson.build               |   1 +
 drivers/crypto/kasumi/meson.build            |   6 ++
 drivers/crypto/meson.build                   |   3 -
 drivers/crypto/mlx5/meson.build              |   4 +-
 drivers/crypto/mlx5/mlx5_crypto.c            |  80 ++++++++-------
 drivers/crypto/mlx5/mlx5_crypto.h            |   6 +-
 drivers/crypto/mvsam/meson.build             |   6 ++
 drivers/crypto/null/meson.build              |   6 ++
 drivers/crypto/octeontx/meson.build          |   6 ++
 drivers/crypto/openssl/meson.build           |   6 ++
 drivers/crypto/qat/meson.build               |   6 ++
 drivers/crypto/scheduler/meson.build         |   6 ++
 drivers/crypto/snow3g/meson.build            |   6 ++
 drivers/crypto/virtio/meson.build            |   6 ++
 drivers/crypto/zuc/meson.build               |   6 ++
 drivers/net/mlx5/linux/mlx5_os.c             |  35 -------
 drivers/net/mlx5/mlx5.h                      |   1 -
 drivers/net/mlx5/windows/mlx5_os.c           |  85 +---------------
 28 files changed, 402 insertions(+), 178 deletions(-)

-- 
2.16.1.windows.4


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

* [dpdk-dev] [RFC PATCH 01/10] common/mlx5: add DV enums to Windows defs file
  2021-09-14  5:38 [dpdk-dev] [RFC PATCH 00/10] Support MLX5 crypto driver on Windows Tal Shnaiderman
@ 2021-09-14  5:38 ` Tal Shnaiderman
  2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 02/10] common/mlx5: add an agnostic OS function to open device context Tal Shnaiderman
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Tal Shnaiderman @ 2021-09-14  5:38 UTC (permalink / raw)
  To: dev
  Cc: thomas, matan, rasland, asafp, gakhil, declan.doherty,
	viacheslavo, eilong

Add needed DV enums used by the crypto PMD and missing
for Windows OS.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
---
 drivers/common/mlx5/windows/mlx5_win_defs.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/common/mlx5/windows/mlx5_win_defs.h b/drivers/common/mlx5/windows/mlx5_win_defs.h
index 47bfc907e7..9f709ff30d 100644
--- a/drivers/common/mlx5/windows/mlx5_win_defs.h
+++ b/drivers/common/mlx5/windows/mlx5_win_defs.h
@@ -93,6 +93,18 @@ enum {
 	MLX5_ETH_WQE_L4_CSUM = (1 << 7),
 };
 
+enum {
+	MLX5_WQE_CTRL_CQ_UPDATE	= 2 << 2,
+	MLX5_WQE_CTRL_SOLICITED	= 1 << 1,
+	MLX5_WQE_CTRL_FENCE	= 4 << 5,
+	MLX5_WQE_CTRL_INITIATOR_SMALL_FENCE = 1 << 5,
+};
+
+enum {
+	MLX5_SEND_WQE_BB	= 64,
+	MLX5_SEND_WQE_SHIFT	= 6,
+};
+
 /*
  * RX Hash fields enable to set which incoming packet's field should
  * participates in RX Hash. Each flag represent certain packet's field,
-- 
2.16.1.windows.4


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

* [dpdk-dev] [RFC PATCH 02/10] common/mlx5: add an agnostic OS function to open device context
  2021-09-14  5:38 [dpdk-dev] [RFC PATCH 00/10] Support MLX5 crypto driver on Windows Tal Shnaiderman
  2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 01/10] common/mlx5: add DV enums to Windows defs file Tal Shnaiderman
@ 2021-09-14  5:38 ` Tal Shnaiderman
  2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 03/10] common/mlx5: move pdn getter to common driver Tal Shnaiderman
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Tal Shnaiderman @ 2021-09-14  5:38 UTC (permalink / raw)
  To: dev
  Cc: thomas, matan, rasland, asafp, gakhil, declan.doherty,
	viacheslavo, eilong

Add a function to open device context from a rte_device.

Function mlx5_os_open_device_context can be used both on
Windows and Linux OS.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
---
 drivers/common/mlx5/linux/mlx5_common_os.c   |  28 +++++++
 drivers/common/mlx5/mlx5_common.h            |   4 +
 drivers/common/mlx5/version.map              |   2 +
 drivers/common/mlx5/windows/mlx5_common_os.c | 118 +++++++++++++++++++++++++++
 drivers/common/mlx5/windows/mlx5_common_os.h |   2 +
 drivers/net/mlx5/windows/mlx5_os.c           |  64 +--------------
 6 files changed, 155 insertions(+), 63 deletions(-)

diff --git a/drivers/common/mlx5/linux/mlx5_common_os.c b/drivers/common/mlx5/linux/mlx5_common_os.c
index 9e0c823c97..3ef507944f 100644
--- a/drivers/common/mlx5/linux/mlx5_common_os.c
+++ b/drivers/common/mlx5/linux/mlx5_common_os.c
@@ -428,3 +428,31 @@ mlx5_os_get_ibv_device(const struct rte_pci_addr *addr)
 	mlx5_glue->free_device_list(ibv_list);
 	return ibv_match;
 }
+
+/**
+ * Open device context from a rte_device.
+ *
+ * @param[in] dev
+ *  Pointer to an rte_device struct.
+ * @return
+ *   Pointer to device context or NULL in case context cannot be found.
+ */
+void *
+mlx5_os_open_device_context(struct rte_device *dev)
+{
+	struct ibv_device *ibv;
+	void *ctx;
+
+	ibv = mlx5_os_get_ibv_dev(dev);
+	if (ibv == NULL) {
+		DRV_LOG(ERR, "Failed getting ibv_dev");
+		return NULL;
+	}
+	ctx = mlx5_glue->dv_open_device(ibv);
+	if (ctx == NULL) {
+		DRV_LOG(ERR, "Failed to open IB device \"%s\".", ibv->name);
+		rte_errno = ENODEV;
+		return NULL;
+	}
+	return ctx;
+}
diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h
index a772371200..249804b00c 100644
--- a/drivers/common/mlx5/mlx5_common.h
+++ b/drivers/common/mlx5/mlx5_common.h
@@ -419,4 +419,8 @@ __rte_internal
 bool
 mlx5_dev_is_pci(const struct rte_device *dev);
 
+__rte_internal
+void *
+mlx5_os_open_device_context(struct rte_device *dev);
+
 #endif /* RTE_PMD_MLX5_COMMON_H_ */
diff --git a/drivers/common/mlx5/version.map b/drivers/common/mlx5/version.map
index e5cb6b7060..6d4258dd25 100644
--- a/drivers/common/mlx5/version.map
+++ b/drivers/common/mlx5/version.map
@@ -141,6 +141,8 @@ INTERNAL {
 	mlx5_os_alloc_pd;
 	mlx5_os_dealloc_pd;
 	mlx5_os_dereg_mr;
+	mlx5_os_match_devx_devices_to_addr;
+	mlx5_os_open_device_context;
 	mlx5_os_get_ibv_dev; # WINDOWS_NO_EXPORT
 	mlx5_os_reg_mr;
 	mlx5_os_umem_dereg;
diff --git a/drivers/common/mlx5/windows/mlx5_common_os.c b/drivers/common/mlx5/windows/mlx5_common_os.c
index 5031bdca26..3b59e57e57 100644
--- a/drivers/common/mlx5/windows/mlx5_common_os.c
+++ b/drivers/common/mlx5/windows/mlx5_common_os.c
@@ -6,6 +6,7 @@
 #include <string.h>
 #include <stdio.h>
 
+#include <rte_bus_pci.h>
 #include <rte_mempool.h>
 #include <rte_malloc.h>
 #include <rte_errno.h>
@@ -205,3 +206,120 @@ mlx5_os_dereg_mr(struct mlx5_pmd_mr *pmd_mr)
 		claim_zero(mlx5_os_umem_dereg(pmd_mr->obj));
 	memset(pmd_mr, 0, sizeof(*pmd_mr));
 }
+
+/**
+ * Detect if a devx_device_bdf object has identical DBDF values to the
+ * rte_pci_addr found in bus/pci probing
+ *
+ * @param[in] devx_bdf
+ *   Pointer to the devx_device_bdf structure.
+ * @param[in] addr
+ *   Pointer to the rte_pci_addr structure.
+ *
+ * @return
+ *   1 on Device match, 0 on mismatch.
+ */
+static int
+mlx5_os_match_devx_bdf_to_addr(struct devx_device_bdf *devx_bdf,
+			    struct rte_pci_addr *addr)
+{
+	if (addr->domain != (devx_bdf->bus_id >> 8) ||
+	    addr->bus != (devx_bdf->bus_id & 0xff) ||
+	    addr->devid != devx_bdf->dev_id ||
+	    addr->function != devx_bdf->fnc_id) {
+		return 0;
+	}
+	return 1;
+}
+
+/**
+ * Detect if a devx_device_bdf object matches the rte_pci_addr
+ * found in bus/pci probing
+ * Compare both the Native/PF BDF and the raw_bdf representing a VF BDF.
+ *
+ * @param[in] devx_bdf
+ *   Pointer to the devx_device_bdf structure.
+ * @param[in] addr
+ *   Pointer to the rte_pci_addr structure.
+ *
+ * @return
+ *   1 on Device match, 0 on mismatch, rte_errno code on failure.
+ */
+int
+mlx5_os_match_devx_devices_to_addr(struct devx_device_bdf *devx_bdf,
+				struct rte_pci_addr *addr)
+{
+	int err;
+	struct devx_device mlx5_dev;
+
+	if (mlx5_os_match_devx_bdf_to_addr(devx_bdf, addr))
+		return 1;
+	/**
+	 * Didn't match on Native/PF BDF, could still
+	 * Match a VF BDF, check it next
+	 */
+	err = mlx5_glue->query_device(devx_bdf, &mlx5_dev);
+	if (err) {
+		DRV_LOG(ERR, "query_device failed");
+		rte_errno = err;
+		return rte_errno;
+	}
+	if (mlx5_os_match_devx_bdf_to_addr(&mlx5_dev.raw_bdf, addr))
+		return 1;
+	return 0;
+}
+
+/**
+ * Open device context from a rte_device.
+ *
+ * @param[in] dev
+ *  Pointer to an rte_device struct.
+ * @return
+ *   Pointer to device context or NULL in case context cannot be found.
+ */
+void *
+mlx5_os_open_device_context(struct rte_device *dev)
+{
+	struct devx_device_bdf *devx_bdf_devs, *orig_devx_bdf_devs;
+	struct mlx5_context *devx_ctx_match = NULL;
+	int ret, err;
+	struct rte_pci_device *pci_dev = RTE_DEV_TO_PCI(dev);
+
+	devx_bdf_devs = mlx5_glue->get_device_list(&ret);
+	orig_devx_bdf_devs = devx_bdf_devs;
+	if (!devx_bdf_devs) {
+		rte_errno = errno ? errno : ENOSYS;
+		DRV_LOG(ERR, "cannot list devices, is DevX configured?");
+		return NULL;
+	}
+	while (ret-- > 0) {
+		err = mlx5_os_match_devx_devices_to_addr(devx_bdf_devs,
+		    &pci_dev->addr);
+		if (err == 1) {
+			devx_ctx_match = mlx5_glue->open_device(devx_bdf_devs);
+			if (!devx_ctx_match) {
+				DRV_LOG(ERR, "open_device failed");
+				err = errno;
+				goto exit;
+			}
+			err = mlx5_glue->query_device(devx_bdf_devs,
+				&devx_ctx_match->mlx5_dev);
+			if (err) {
+				DRV_LOG(ERR, "query device context failed.");
+				rte_errno = errno ? errno : ENOSYS;
+				claim_zero(mlx5_glue->close_device(
+					devx_ctx_match));
+				goto exit;
+			}
+		}
+		if (err != 0) {
+			DRV_LOG(ERR, "failed to match addr to rte_device");
+			ret = -err;
+			goto exit;
+		}
+		devx_bdf_devs++;
+	}
+exit:
+	mlx5_glue->free_device_list(orig_devx_bdf_devs);
+	return devx_ctx_match;
+}
diff --git a/drivers/common/mlx5/windows/mlx5_common_os.h b/drivers/common/mlx5/windows/mlx5_common_os.h
index 3756e1959b..c3d74d3b67 100644
--- a/drivers/common/mlx5/windows/mlx5_common_os.h
+++ b/drivers/common/mlx5/windows/mlx5_common_os.h
@@ -261,4 +261,6 @@ int mlx5_os_reg_mr(void *pd,
 		   void *addr, size_t length, struct mlx5_pmd_mr *pmd_mr);
 __rte_internal
 void mlx5_os_dereg_mr(struct mlx5_pmd_mr *pmd_mr);
+int mlx5_os_match_devx_devices_to_addr(struct devx_device_bdf *devx_bdf,
+				struct rte_pci_addr *addr);
 #endif /* RTE_PMD_MLX5_COMMON_OS_H_ */
diff --git a/drivers/net/mlx5/windows/mlx5_os.c b/drivers/net/mlx5/windows/mlx5_os.c
index 26fa927039..9dea6d639e 100644
--- a/drivers/net/mlx5/windows/mlx5_os.c
+++ b/drivers/net/mlx5/windows/mlx5_os.c
@@ -901,68 +901,6 @@ mlx5_os_set_allmulti(struct rte_eth_dev *dev, int enable)
 	return -ENOTSUP;
 }
 
-/**
- * Detect if a devx_device_bdf object has identical DBDF values to the
- * rte_pci_addr found in bus/pci probing
- *
- * @param[in] devx_bdf
- *   Pointer to the devx_device_bdf structure.
- * @param[in] addr
- *   Pointer to the rte_pci_addr structure.
- *
- * @return
- *   1 on Device match, 0 on mismatch.
- */
-static int
-mlx5_match_devx_bdf_to_addr(struct devx_device_bdf *devx_bdf,
-			    struct rte_pci_addr *addr)
-{
-	if (addr->domain != (devx_bdf->bus_id >> 8) ||
-	    addr->bus != (devx_bdf->bus_id & 0xff) ||
-	    addr->devid != devx_bdf->dev_id ||
-	    addr->function != devx_bdf->fnc_id) {
-		return 0;
-	}
-	return 1;
-}
-
-/**
- * Detect if a devx_device_bdf object matches the rte_pci_addr
- * found in bus/pci probing
- * Compare both the Native/PF BDF and the raw_bdf representing a VF BDF.
- *
- * @param[in] devx_bdf
- *   Pointer to the devx_device_bdf structure.
- * @param[in] addr
- *   Pointer to the rte_pci_addr structure.
- *
- * @return
- *   1 on Device match, 0 on mismatch, rte_errno code on failure.
- */
-static int
-mlx5_match_devx_devices_to_addr(struct devx_device_bdf *devx_bdf,
-				struct rte_pci_addr *addr)
-{
-	int err;
-	struct devx_device mlx5_dev;
-
-	if (mlx5_match_devx_bdf_to_addr(devx_bdf, addr))
-		return 1;
-	/**
-	 * Didn't match on Native/PF BDF, could still
-	 * Match a VF BDF, check it next
-	 */
-	err = mlx5_glue->query_device(devx_bdf, &mlx5_dev);
-	if (err) {
-		DRV_LOG(ERR, "query_device failed");
-		rte_errno = err;
-		return rte_errno;
-	}
-	if (mlx5_match_devx_bdf_to_addr(&mlx5_dev.raw_bdf, addr))
-		return 1;
-	return 0;
-}
-
 /**
  * DPDK callback to register a PCI device.
  *
@@ -1036,7 +974,7 @@ mlx5_os_net_probe(struct rte_device *dev)
 	struct devx_device_bdf *devx_bdf_match[ret + 1];
 
 	while (ret-- > 0) {
-		err = mlx5_match_devx_devices_to_addr(devx_bdf_devs,
+		err = mlx5_os_match_devx_devices_to_addr(devx_bdf_devs,
 		    &pci_dev->addr);
 		if (!err) {
 			devx_bdf_devs++;
-- 
2.16.1.windows.4


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

* [dpdk-dev] [RFC PATCH 03/10] common/mlx5: move pdn getter to common driver
  2021-09-14  5:38 [dpdk-dev] [RFC PATCH 00/10] Support MLX5 crypto driver on Windows Tal Shnaiderman
  2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 01/10] common/mlx5: add DV enums to Windows defs file Tal Shnaiderman
  2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 02/10] common/mlx5: add an agnostic OS function to open device context Tal Shnaiderman
@ 2021-09-14  5:38 ` Tal Shnaiderman
  2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 04/10] common/mlx5: add memory region OS agnostic functions for Linux Tal Shnaiderman
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Tal Shnaiderman @ 2021-09-14  5:38 UTC (permalink / raw)
  To: dev
  Cc: thomas, matan, rasland, asafp, gakhil, declan.doherty,
	viacheslavo, eilong

Move to common and export the function mlx5_os_get_pdn.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
---
 drivers/common/mlx5/linux/mlx5_common_os.c   | 35 ++++++++++++++++++++++++++++
 drivers/common/mlx5/mlx5_common.h            |  4 ++++
 drivers/common/mlx5/version.map              |  1 +
 drivers/common/mlx5/windows/mlx5_common_os.c | 21 +++++++++++++++++
 drivers/net/mlx5/linux/mlx5_os.c             | 35 ----------------------------
 drivers/net/mlx5/mlx5.h                      |  1 -
 drivers/net/mlx5/windows/mlx5_os.c           | 21 -----------------
 7 files changed, 61 insertions(+), 57 deletions(-)

diff --git a/drivers/common/mlx5/linux/mlx5_common_os.c b/drivers/common/mlx5/linux/mlx5_common_os.c
index 3ef507944f..4aada82669 100644
--- a/drivers/common/mlx5/linux/mlx5_common_os.c
+++ b/drivers/common/mlx5/linux/mlx5_common_os.c
@@ -456,3 +456,38 @@ mlx5_os_open_device_context(struct rte_device *dev)
 	}
 	return ctx;
 }
+
+/**
+ * Extract pdn of PD object using DV API.
+ *
+ * @param[in] pd
+ *   Pointer to the verbs PD object.
+ * @param[out] pdn
+ *   Pointer to the PD object number variable.
+ *
+ * @return
+ *   0 on success, error value otherwise.
+ */
+int
+mlx5_os_get_pdn(void *pd, uint32_t *pdn)
+{
+#ifdef HAVE_IBV_FLOW_DV_SUPPORT
+	struct mlx5dv_obj obj;
+	struct mlx5dv_pd pd_info;
+	int ret = 0;
+
+	obj.pd.in = pd;
+	obj.pd.out = &pd_info;
+	ret = mlx5_glue->dv_init_obj(&obj, MLX5DV_OBJ_PD);
+	if (ret) {
+		DRV_LOG(DEBUG, "Fail to get PD object info");
+		return ret;
+	}
+	*pdn = pd_info.pdn;
+	return 0;
+#else
+	(void)pd;
+	(void)pdn;
+	return -ENOTSUP;
+#endif /* HAVE_IBV_FLOW_DV_SUPPORT */
+}
diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h
index 249804b00c..fcdf376193 100644
--- a/drivers/common/mlx5/mlx5_common.h
+++ b/drivers/common/mlx5/mlx5_common.h
@@ -423,4 +423,8 @@ __rte_internal
 void *
 mlx5_os_open_device_context(struct rte_device *dev);
 
+__rte_internal
+int
+mlx5_os_get_pdn(void *pd, uint32_t *pdn);
+
 #endif /* RTE_PMD_MLX5_COMMON_H_ */
diff --git a/drivers/common/mlx5/version.map b/drivers/common/mlx5/version.map
index 6d4258dd25..c6de706fdb 100644
--- a/drivers/common/mlx5/version.map
+++ b/drivers/common/mlx5/version.map
@@ -144,6 +144,7 @@ INTERNAL {
 	mlx5_os_match_devx_devices_to_addr;
 	mlx5_os_open_device_context;
 	mlx5_os_get_ibv_dev; # WINDOWS_NO_EXPORT
+	mlx5_os_get_pdn;
 	mlx5_os_reg_mr;
 	mlx5_os_umem_dereg;
 	mlx5_os_umem_reg;
diff --git a/drivers/common/mlx5/windows/mlx5_common_os.c b/drivers/common/mlx5/windows/mlx5_common_os.c
index 3b59e57e57..5c9cccd3e9 100644
--- a/drivers/common/mlx5/windows/mlx5_common_os.c
+++ b/drivers/common/mlx5/windows/mlx5_common_os.c
@@ -323,3 +323,24 @@ mlx5_os_open_device_context(struct rte_device *dev)
 	mlx5_glue->free_device_list(orig_devx_bdf_devs);
 	return devx_ctx_match;
 }
+
+/**
+ * Extract pdn of PD object using DevX
+ *
+ * @param[in] pd
+ *   Pointer to the DevX PD object.
+ * @param[out] pdn
+ *   Pointer to the PD object number variable.
+ *
+ * @return
+ *   0 on success, error value otherwise.
+ */
+int
+mlx5_os_get_pdn(void *pd, uint32_t *pdn)
+{
+	if (!pd)
+		return -EINVAL;
+
+	*pdn = ((struct mlx5_pd *)pd)->pdn;
+	return 0;
+}
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 470b16cb9a..a7df1ddb2e 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -2811,41 +2811,6 @@ mlx5_restore_doorbell_mapping_env(int value)
 		setenv(MLX5_SHUT_UP_BF, value ? "1" : "0", 1);
 }
 
-/**
- * Extract pdn of PD object using DV API.
- *
- * @param[in] pd
- *   Pointer to the verbs PD object.
- * @param[out] pdn
- *   Pointer to the PD object number variable.
- *
- * @return
- *   0 on success, error value otherwise.
- */
-int
-mlx5_os_get_pdn(void *pd, uint32_t *pdn)
-{
-#ifdef HAVE_IBV_FLOW_DV_SUPPORT
-	struct mlx5dv_obj obj;
-	struct mlx5dv_pd pd_info;
-	int ret = 0;
-
-	obj.pd.in = pd;
-	obj.pd.out = &pd_info;
-	ret = mlx5_glue->dv_init_obj(&obj, MLX5DV_OBJ_PD);
-	if (ret) {
-		DRV_LOG(DEBUG, "Fail to get PD object info");
-		return ret;
-	}
-	*pdn = pd_info.pdn;
-	return 0;
-#else
-	(void)pd;
-	(void)pdn;
-	return -ENOTSUP;
-#endif /* HAVE_IBV_FLOW_DV_SUPPORT */
-}
-
 /**
  * Function API to open IB device.
  *
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index e02714e231..cb05929efe 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -1770,7 +1770,6 @@ void mlx5_os_free_shared_dr(struct mlx5_priv *priv);
 int mlx5_os_open_device(const struct mlx5_dev_spawn_data *spawn,
 			 const struct mlx5_dev_config *config,
 			 struct mlx5_dev_ctx_shared *sh);
-int mlx5_os_get_pdn(void *pd, uint32_t *pdn);
 int mlx5_os_net_probe(struct rte_device *dev);
 void mlx5_os_dev_shared_handler_install(struct mlx5_dev_ctx_shared *sh);
 void mlx5_os_dev_shared_handler_uninstall(struct mlx5_dev_ctx_shared *sh);
diff --git a/drivers/net/mlx5/windows/mlx5_os.c b/drivers/net/mlx5/windows/mlx5_os.c
index 9dea6d639e..336b41d33b 100644
--- a/drivers/net/mlx5/windows/mlx5_os.c
+++ b/drivers/net/mlx5/windows/mlx5_os.c
@@ -1102,25 +1102,4 @@ mlx5_os_set_reg_mr_cb(mlx5_reg_mr_t *reg_mr_cb,
 	*dereg_mr_cb = mlx5_os_dereg_mr;
 }
 
-/**
- * Extract pdn of PD object using DevX
- *
- * @param[in] pd
- *   Pointer to the DevX PD object.
- * @param[out] pdn
- *   Pointer to the PD object number variable.
- *
- * @return
- *   0 on success, error value otherwise.
- */
-int
-mlx5_os_get_pdn(void *pd, uint32_t *pdn)
-{
-	if (!pd)
-		return -EINVAL;
-
-	*pdn = ((struct mlx5_pd *)pd)->pdn;
-	return 0;
-}
-
 const struct mlx5_flow_driver_ops mlx5_flow_verbs_drv_ops = {0};
-- 
2.16.1.windows.4


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

* [dpdk-dev] [RFC PATCH 04/10] common/mlx5: add memory region OS agnostic functions for Linux
  2021-09-14  5:38 [dpdk-dev] [RFC PATCH 00/10] Support MLX5 crypto driver on Windows Tal Shnaiderman
                   ` (2 preceding siblings ...)
  2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 03/10] common/mlx5: move pdn getter to common driver Tal Shnaiderman
@ 2021-09-14  5:38 ` Tal Shnaiderman
  2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 05/10] crypto/mlx5: replace UNIX functions with EAL functions Tal Shnaiderman
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Tal Shnaiderman @ 2021-09-14  5:38 UTC (permalink / raw)
  To: dev
  Cc: thomas, matan, rasland, asafp, gakhil, declan.doherty,
	viacheslavo, eilong

The OS agnostic functions for memory region registration/deregistration
(mlx5_os_reg_mr mlx5_os_dereg_mr) exist only for Windows OS.

Adding them for Linux as well as they are needed for memory region
activities in shared code.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
---
 drivers/common/mlx5/linux/mlx5_common_os.c   | 35 ++++++++++++++++++++++++++++
 drivers/common/mlx5/mlx5_common.h            |  9 +++++++
 drivers/common/mlx5/windows/mlx5_common_os.c |  2 +-
 drivers/common/mlx5/windows/mlx5_common_os.h |  6 -----
 4 files changed, 45 insertions(+), 7 deletions(-)

diff --git a/drivers/common/mlx5/linux/mlx5_common_os.c b/drivers/common/mlx5/linux/mlx5_common_os.c
index 4aada82669..fd0ec6b748 100644
--- a/drivers/common/mlx5/linux/mlx5_common_os.c
+++ b/drivers/common/mlx5/linux/mlx5_common_os.c
@@ -491,3 +491,38 @@ mlx5_os_get_pdn(void *pd, uint32_t *pdn)
 	return -ENOTSUP;
 #endif /* HAVE_IBV_FLOW_DV_SUPPORT */
 }
+
+/**
+ * Register mr. Given protection domain pointer, pointer to addr and length
+ * register the memory region.
+ *
+ * @param[in] pd
+ *   Pointer to protection domain context (type mlx5_pd).
+ * @param[in] addr
+ *   Pointer to memory start address (type devx_device_ctx).
+ * @param[in] length
+ *   Lengtoh of the memory to register.
+ * @param[out] pmd_mr
+ *   pmd_mr struct set with lkey, address, length, pointer to mr object, mkey
+ *
+ * @return
+ *   0 on successful registration, -1 otherwise
+ */
+int
+mlx5_os_reg_mr(void *pd,
+	       void *addr, size_t length, struct mlx5_pmd_mr *pmd_mr)
+{
+	return mlx5_common_verbs_reg_mr(pd, addr, length, pmd_mr);
+}
+
+/**
+ * De-register mr.
+ *
+ * @param[in] pmd_mr
+ *  Pointer to PMD mr object
+ */
+void
+mlx5_os_dereg_mr(struct mlx5_pmd_mr *pmd_mr)
+{
+	mlx5_common_verbs_dereg_mr(pmd_mr);
+}
diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h
index fcdf376193..a87318db91 100644
--- a/drivers/common/mlx5/mlx5_common.h
+++ b/drivers/common/mlx5/mlx5_common.h
@@ -21,6 +21,7 @@
 
 #include "mlx5_prm.h"
 #include "mlx5_devx_cmds.h"
+#include "mlx5_common_mr.h"
 #include "mlx5_common_os.h"
 
 /* Reported driver name. */
@@ -427,4 +428,12 @@ __rte_internal
 int
 mlx5_os_get_pdn(void *pd, uint32_t *pdn);
 
+__rte_internal
+int
+mlx5_os_reg_mr(void *pd,
+		   void *addr, size_t length, struct mlx5_pmd_mr *pmd_mr);
+__rte_internal
+void
+mlx5_os_dereg_mr(struct mlx5_pmd_mr *pmd_mr);
+
 #endif /* RTE_PMD_MLX5_COMMON_H_ */
diff --git a/drivers/common/mlx5/windows/mlx5_common_os.c b/drivers/common/mlx5/windows/mlx5_common_os.c
index 5c9cccd3e9..2ecdf78310 100644
--- a/drivers/common/mlx5/windows/mlx5_common_os.c
+++ b/drivers/common/mlx5/windows/mlx5_common_os.c
@@ -134,7 +134,7 @@ mlx5_os_umem_dereg(void *pumem)
 }
 
 /**
- * Register mr. Given protection doamin pointer, pointer to addr and length
+ * Register mr. Given protection domain pointer, pointer to addr and length
  * register the memory region.
  *
  * @param[in] pd
diff --git a/drivers/common/mlx5/windows/mlx5_common_os.h b/drivers/common/mlx5/windows/mlx5_common_os.h
index c3d74d3b67..62bdcb40cd 100644
--- a/drivers/common/mlx5/windows/mlx5_common_os.h
+++ b/drivers/common/mlx5/windows/mlx5_common_os.h
@@ -13,7 +13,6 @@
 #include "mlx5_autoconf.h"
 #include "mlx5_glue.h"
 #include "mlx5_malloc.h"
-#include "mlx5_common_mr.h"
 #include "mlx5_win_ext.h"
 
 #define MLX5_BF_OFFSET 0x800
@@ -256,11 +255,6 @@ __rte_internal
 void *mlx5_os_umem_reg(void *ctx, void *addr, size_t size, uint32_t access);
 __rte_internal
 int mlx5_os_umem_dereg(void *pumem);
-__rte_internal
-int mlx5_os_reg_mr(void *pd,
-		   void *addr, size_t length, struct mlx5_pmd_mr *pmd_mr);
-__rte_internal
-void mlx5_os_dereg_mr(struct mlx5_pmd_mr *pmd_mr);
 int mlx5_os_match_devx_devices_to_addr(struct devx_device_bdf *devx_bdf,
 				struct rte_pci_addr *addr);
 #endif /* RTE_PMD_MLX5_COMMON_OS_H_ */
-- 
2.16.1.windows.4


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

* [dpdk-dev] [RFC PATCH 05/10] crypto/mlx5: replace UNIX functions with EAL functions
  2021-09-14  5:38 [dpdk-dev] [RFC PATCH 00/10] Support MLX5 crypto driver on Windows Tal Shnaiderman
                   ` (3 preceding siblings ...)
  2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 04/10] common/mlx5: add memory region OS agnostic functions for Linux Tal Shnaiderman
@ 2021-09-14  5:38 ` Tal Shnaiderman
  2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 06/10] crypto/mlx5: use OS agnostic functions for UMEM operations Tal Shnaiderman
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Tal Shnaiderman @ 2021-09-14  5:38 UTC (permalink / raw)
  To: dev
  Cc: thomas, matan, rasland, asafp, gakhil, declan.doherty,
	viacheslavo, eilong

Use the OS agnostic EAL function rte_mem_page_size to get
page size value instead of the Linux specific implementation.

Also remove the usage of PTHREAD_MUTEX_INITIALIZER which is not
support in Windows and initialize priv_list_lock in RTE_INIT.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
---
 drivers/crypto/mlx5/mlx5_crypto.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/mlx5/mlx5_crypto.c b/drivers/crypto/mlx5/mlx5_crypto.c
index b3d5200ca3..3dac69f860 100644
--- a/drivers/crypto/mlx5/mlx5_crypto.c
+++ b/drivers/crypto/mlx5/mlx5_crypto.c
@@ -4,6 +4,7 @@
 
 #include <rte_malloc.h>
 #include <rte_mempool.h>
+#include <rte_eal_paging.h>
 #include <rte_errno.h>
 #include <rte_log.h>
 #include <rte_bus_pci.h>
@@ -33,7 +34,7 @@
 
 TAILQ_HEAD(mlx5_crypto_privs, mlx5_crypto_priv) mlx5_crypto_priv_list =
 				TAILQ_HEAD_INITIALIZER(mlx5_crypto_priv_list);
-static pthread_mutex_t priv_list_lock = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t priv_list_lock;
 
 int mlx5_crypto_logtype;
 
@@ -700,7 +701,7 @@ mlx5_crypto_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	attr.pd = priv->pdn;
 	attr.uar_index = mlx5_os_get_devx_uar_page_id(priv->uar);
 	attr.cqn = qp->cq_obj.cq->id;
-	attr.log_page_size = rte_log2_u32(sysconf(_SC_PAGESIZE));
+	attr.log_page_size = rte_log2_u32(rte_mem_page_size());
 	attr.rq_size =  0;
 	attr.sq_size = RTE_BIT32(log_nb_desc);
 	attr.dbr_umem_valid = 1;
@@ -1134,6 +1135,7 @@ static struct mlx5_class_driver mlx5_crypto_driver = {
 
 RTE_INIT(rte_mlx5_crypto_init)
 {
+	pthread_mutex_init(&priv_list_lock, NULL);
 	mlx5_common_init();
 	if (mlx5_glue != NULL)
 		mlx5_class_driver_register(&mlx5_crypto_driver);
-- 
2.16.1.windows.4


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

* [dpdk-dev] [RFC PATCH 06/10] crypto/mlx5: use OS agnostic functions for UMEM operations
  2021-09-14  5:38 [dpdk-dev] [RFC PATCH 00/10] Support MLX5 crypto driver on Windows Tal Shnaiderman
                   ` (4 preceding siblings ...)
  2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 05/10] crypto/mlx5: replace UNIX functions with EAL functions Tal Shnaiderman
@ 2021-09-14  5:38 ` Tal Shnaiderman
  2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 07/10] crypto/mlx5: use OS agnostic functions for PD operations Tal Shnaiderman
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Tal Shnaiderman @ 2021-09-14  5:38 UTC (permalink / raw)
  To: dev
  Cc: thomas, matan, rasland, asafp, gakhil, declan.doherty,
	viacheslavo, eilong

use the functions mlx5_os_umem_reg, mlx5_os_umem_dereg
mlx5_os_get_umem_id instead of the glue functions to support
UMEM operations on all OSs.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
---
 drivers/crypto/mlx5/mlx5_crypto.c | 14 +++++++-------
 drivers/crypto/mlx5/mlx5_crypto.h |  2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/crypto/mlx5/mlx5_crypto.c b/drivers/crypto/mlx5/mlx5_crypto.c
index 3dac69f860..ccae113770 100644
--- a/drivers/crypto/mlx5/mlx5_crypto.c
+++ b/drivers/crypto/mlx5/mlx5_crypto.c
@@ -261,7 +261,7 @@ mlx5_crypto_queue_pair_release(struct rte_cryptodev *dev, uint16_t qp_id)
 	if (qp->qp_obj != NULL)
 		claim_zero(mlx5_devx_cmd_destroy(qp->qp_obj));
 	if (qp->umem_obj != NULL)
-		claim_zero(mlx5_glue->devx_umem_dereg(qp->umem_obj));
+		claim_zero(mlx5_os_umem_dereg(qp->umem_obj));
 	if (qp->umem_buf != NULL)
 		rte_free(qp->umem_buf);
 	mlx5_mr_btree_free(&qp->mr_ctrl.cache_bh);
@@ -682,10 +682,10 @@ mlx5_crypto_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 		rte_errno = ENOMEM;
 		goto error;
 	}
-	qp->umem_obj = mlx5_glue->devx_umem_reg(priv->ctx,
-					       (void *)(uintptr_t)qp->umem_buf,
-					       umem_size,
-					       IBV_ACCESS_LOCAL_WRITE);
+	qp->umem_obj = mlx5_os_umem_reg(priv->ctx,
+					(void *)(uintptr_t)qp->umem_buf,
+					umem_size,
+					IBV_ACCESS_LOCAL_WRITE);
 	if (qp->umem_obj == NULL) {
 		DRV_LOG(ERR, "Failed to register QP umem.");
 		goto error;
@@ -705,9 +705,9 @@ mlx5_crypto_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	attr.rq_size =  0;
 	attr.sq_size = RTE_BIT32(log_nb_desc);
 	attr.dbr_umem_valid = 1;
-	attr.wq_umem_id = qp->umem_obj->umem_id;
+	attr.wq_umem_id = mlx5_os_get_umem_id(qp->umem_obj);
 	attr.wq_umem_offset = 0;
-	attr.dbr_umem_id = qp->umem_obj->umem_id;
+	attr.dbr_umem_id = mlx5_os_get_umem_id(qp->umem_obj);
 	attr.dbr_address = RTE_BIT64(log_nb_desc) * priv->wqe_set_size;
 	qp->qp_obj = mlx5_devx_cmd_create_qp(priv->ctx, &attr);
 	if (qp->qp_obj == NULL) {
diff --git a/drivers/crypto/mlx5/mlx5_crypto.h b/drivers/crypto/mlx5/mlx5_crypto.h
index d49b0001f0..d5cc509e42 100644
--- a/drivers/crypto/mlx5/mlx5_crypto.h
+++ b/drivers/crypto/mlx5/mlx5_crypto.h
@@ -45,7 +45,7 @@ struct mlx5_crypto_qp {
 	struct mlx5_devx_cq cq_obj;
 	struct mlx5_devx_obj *qp_obj;
 	struct rte_cryptodev_stats stats;
-	struct mlx5dv_devx_umem *umem_obj;
+	void *umem_obj;
 	void *umem_buf;
 	volatile uint32_t *db_rec;
 	struct rte_crypto_op **ops;
-- 
2.16.1.windows.4


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

* [dpdk-dev] [RFC PATCH 07/10] crypto/mlx5: use OS agnostic functions for PD operations
  2021-09-14  5:38 [dpdk-dev] [RFC PATCH 00/10] Support MLX5 crypto driver on Windows Tal Shnaiderman
                   ` (5 preceding siblings ...)
  2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 06/10] crypto/mlx5: use OS agnostic functions for UMEM operations Tal Shnaiderman
@ 2021-09-14  5:38 ` Tal Shnaiderman
  2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 08/10] crypto/mlx5: use OS agnostic functions for Verbs operations Tal Shnaiderman
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Tal Shnaiderman @ 2021-09-14  5:38 UTC (permalink / raw)
  To: dev
  Cc: thomas, matan, rasland, asafp, gakhil, declan.doherty,
	viacheslavo, eilong

use the functions mlx5_os_alloc_pd, mlx5_os_dealloc_pd
mlx5_os_get_pdn instead of the glue functions to support
PD operations on all OSs.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
---
 drivers/crypto/mlx5/mlx5_crypto.c | 15 ++++++---------
 drivers/crypto/mlx5/mlx5_crypto.h |  2 +-
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/crypto/mlx5/mlx5_crypto.c b/drivers/crypto/mlx5/mlx5_crypto.c
index ccae113770..35319d0115 100644
--- a/drivers/crypto/mlx5/mlx5_crypto.c
+++ b/drivers/crypto/mlx5/mlx5_crypto.c
@@ -784,7 +784,7 @@ static void
 mlx5_crypto_hw_global_release(struct mlx5_crypto_priv *priv)
 {
 	if (priv->pd != NULL) {
-		claim_zero(mlx5_glue->dealloc_pd(priv->pd));
+		claim_zero(mlx5_os_dealloc_pd(priv->pd));
 		priv->pd = NULL;
 	}
 	if (priv->uar != NULL) {
@@ -801,21 +801,18 @@ mlx5_crypto_pd_create(struct mlx5_crypto_priv *priv)
 	struct mlx5dv_pd pd_info;
 	int ret;
 
-	priv->pd = mlx5_glue->alloc_pd(priv->ctx);
+	priv->pd = mlx5_os_alloc_pd(priv->ctx);
 	if (priv->pd == NULL) {
 		DRV_LOG(ERR, "Failed to allocate PD.");
 		return errno ? -errno : -ENOMEM;
 	}
-	obj.pd.in = priv->pd;
-	obj.pd.out = &pd_info;
-	ret = mlx5_glue->dv_init_obj(&obj, MLX5DV_OBJ_PD);
+	ret = mlx5_os_get_pdn(priv->pd, &priv->pdn);
 	if (ret != 0) {
-		DRV_LOG(ERR, "Fail to get PD object info.");
-		mlx5_glue->dealloc_pd(priv->pd);
+		DRV_LOG(ERR, "Fail to get PDN.");
+		mlx5_os_dealloc_pd(priv->pd);
 		priv->pd = NULL;
 		return -errno;
 	}
-	priv->pdn = pd_info.pdn;
 	return 0;
 #else
 	(void)priv;
@@ -834,7 +831,7 @@ mlx5_crypto_hw_global_prepare(struct mlx5_crypto_priv *priv)
 		priv->uar_addr = mlx5_os_get_devx_uar_reg_addr(priv->uar);
 	if (priv->uar == NULL || priv->uar_addr == NULL) {
 		rte_errno = errno;
-		claim_zero(mlx5_glue->dealloc_pd(priv->pd));
+		claim_zero(mlx5_os_dealloc_pd(priv->pd));
 		DRV_LOG(ERR, "Failed to allocate UAR.");
 		return -1;
 	}
diff --git a/drivers/crypto/mlx5/mlx5_crypto.h b/drivers/crypto/mlx5/mlx5_crypto.h
index d5cc509e42..91e3f438b8 100644
--- a/drivers/crypto/mlx5/mlx5_crypto.h
+++ b/drivers/crypto/mlx5/mlx5_crypto.h
@@ -25,7 +25,7 @@ struct mlx5_crypto_priv {
 	volatile uint64_t *uar_addr;
 	uint32_t pdn; /* Protection Domain number. */
 	uint32_t max_segs_num; /* Maximum supported data segs. */
-	struct ibv_pd *pd;
+	void *pd;
 	struct mlx5_hlist *dek_hlist; /* Dek hash list. */
 	struct rte_cryptodev_config dev_config;
 	struct mlx5_mr_share_cache mr_scache; /* Global shared MR cache. */
-- 
2.16.1.windows.4


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

* [dpdk-dev] [RFC PATCH 08/10] crypto/mlx5: use OS agnostic functions for Verbs operations
  2021-09-14  5:38 [dpdk-dev] [RFC PATCH 00/10] Support MLX5 crypto driver on Windows Tal Shnaiderman
                   ` (6 preceding siblings ...)
  2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 07/10] crypto/mlx5: use OS agnostic functions for PD operations Tal Shnaiderman
@ 2021-09-14  5:38 ` Tal Shnaiderman
  2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 09/10] crypto/mlx5: fix size of UMR WQE Tal Shnaiderman
  2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 10/10] crypto/mlx5: support on Windows Tal Shnaiderman
  9 siblings, 0 replies; 11+ messages in thread
From: Tal Shnaiderman @ 2021-09-14  5:38 UTC (permalink / raw)
  To: dev
  Cc: thomas, matan, rasland, asafp, gakhil, declan.doherty,
	viacheslavo, eilong

use the functions mlx5_os_open_device_context, mlx5_os_get_ctx_device_name
mlx5_os_reg_mr mlx5_os_dereg_mr instead of the ib verbs functions
and variables to support device operations on all OSs.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
---
 drivers/crypto/mlx5/mlx5_crypto.c | 41 +++++++++++++++++----------------------
 drivers/crypto/mlx5/mlx5_crypto.h |  2 +-
 2 files changed, 19 insertions(+), 24 deletions(-)

diff --git a/drivers/crypto/mlx5/mlx5_crypto.c b/drivers/crypto/mlx5/mlx5_crypto.c
index 35319d0115..3f5a6745dc 100644
--- a/drivers/crypto/mlx5/mlx5_crypto.c
+++ b/drivers/crypto/mlx5/mlx5_crypto.c
@@ -796,9 +796,6 @@ mlx5_crypto_hw_global_release(struct mlx5_crypto_priv *priv)
 static int
 mlx5_crypto_pd_create(struct mlx5_crypto_priv *priv)
 {
-#ifdef HAVE_IBV_FLOW_DV_SUPPORT
-	struct mlx5dv_obj obj;
-	struct mlx5dv_pd pd_info;
 	int ret;
 
 	priv->pd = mlx5_os_alloc_pd(priv->ctx);
@@ -814,11 +811,6 @@ mlx5_crypto_pd_create(struct mlx5_crypto_priv *priv)
 		return -errno;
 	}
 	return 0;
-#else
-	(void)priv;
-	DRV_LOG(ERR, "Cannot get pdn - no DV support.");
-	return -ENOTSUP;
-#endif /* HAVE_IBV_FLOW_DV_SUPPORT */
 }
 
 static int
@@ -964,8 +956,8 @@ mlx5_crypto_mr_mem_event_cb(enum rte_mem_event event_type, const void *addr,
 		/* Iterate all the existing mlx5 devices. */
 		TAILQ_FOREACH(priv, &mlx5_crypto_priv_list, next)
 			mlx5_free_mr_by_addr(&priv->mr_scache,
-					     priv->ctx->device->name,
-					     addr, len);
+					     mlx5_os_get_ctx_device_name(
+					     priv->ctx), addr, len);
 		pthread_mutex_unlock(&priv_list_lock);
 		break;
 	case RTE_MEM_EVENT_ALLOC:
@@ -977,9 +969,9 @@ mlx5_crypto_mr_mem_event_cb(enum rte_mem_event event_type, const void *addr,
 static int
 mlx5_crypto_dev_probe(struct rte_device *dev)
 {
-	struct ibv_device *ibv;
 	struct rte_cryptodev *crypto_dev;
-	struct ibv_context *ctx;
+	void *ctx;
+	const char *device_name;
 	struct mlx5_devx_obj *login;
 	struct mlx5_crypto_priv *priv;
 	struct mlx5_crypto_devarg_params devarg_prms = { 0 };
@@ -999,15 +991,19 @@ mlx5_crypto_dev_probe(struct rte_device *dev)
 		rte_errno = ENOTSUP;
 		return -rte_errno;
 	}
-	ibv = mlx5_os_get_ibv_dev(dev);
-	if (ibv == NULL)
-		return -rte_errno;
-	ctx = mlx5_glue->dv_open_device(ibv);
+	ctx = mlx5_os_open_device_context(dev);
 	if (ctx == NULL) {
-		DRV_LOG(ERR, "Failed to open IB device \"%s\".", ibv->name);
+		DRV_LOG(ERR, "Failed to open IB device.");
 		rte_errno = ENODEV;
 		return -rte_errno;
 	}
+	device_name = mlx5_os_get_ctx_device_name(ctx);
+	if (!device_name) {
+		DRV_LOG(ERR, "Failed getting device name");
+		claim_zero(mlx5_glue->close_device(ctx));
+		rte_errno = ENODEV;
+		return -ENODEV;
+	}
 	if (mlx5_devx_cmd_query_hca_attr(ctx, &attr) != 0 ||
 	    attr.crypto == 0 || attr.aes_xts == 0) {
 		DRV_LOG(ERR, "Not enough capabilities to support crypto "
@@ -1029,15 +1025,14 @@ mlx5_crypto_dev_probe(struct rte_device *dev)
 		claim_zero(mlx5_glue->close_device(ctx));
 		return -rte_errno;
 	}
-	crypto_dev = rte_cryptodev_pmd_create(ibv->name, dev,
-					&init_params);
+	crypto_dev = rte_cryptodev_pmd_create(device_name, dev, &init_params);
 	if (crypto_dev == NULL) {
-		DRV_LOG(ERR, "Failed to create device \"%s\".", ibv->name);
+		DRV_LOG(ERR, "Failed to create device \"%s\".", device_name);
 		claim_zero(mlx5_glue->close_device(ctx));
 		return -ENODEV;
 	}
 	DRV_LOG(INFO,
-		"Crypto device %s was created successfully.", ibv->name);
+		"Crypto device %s was created successfully.", device_name);
 	crypto_dev->dev_ops = &mlx5_crypto_ops;
 	crypto_dev->dequeue_burst = mlx5_crypto_dequeue_burst;
 	crypto_dev->enqueue_burst = mlx5_crypto_enqueue_burst;
@@ -1061,8 +1056,8 @@ mlx5_crypto_dev_probe(struct rte_device *dev)
 		rte_errno = ENOMEM;
 		return -rte_errno;
 	}
-	priv->mr_scache.reg_mr_cb = mlx5_common_verbs_reg_mr;
-	priv->mr_scache.dereg_mr_cb = mlx5_common_verbs_dereg_mr;
+	priv->mr_scache.reg_mr_cb = mlx5_os_reg_mr;
+	priv->mr_scache.dereg_mr_cb = mlx5_os_dereg_mr;
 	priv->keytag = rte_cpu_to_be_64(devarg_prms.keytag);
 	priv->max_segs_num = devarg_prms.max_segs_num;
 	priv->umr_wqe_size = sizeof(struct mlx5_wqe_umr_bsf_seg) +
diff --git a/drivers/crypto/mlx5/mlx5_crypto.h b/drivers/crypto/mlx5/mlx5_crypto.h
index 91e3f438b8..57461a8a33 100644
--- a/drivers/crypto/mlx5/mlx5_crypto.h
+++ b/drivers/crypto/mlx5/mlx5_crypto.h
@@ -19,7 +19,7 @@
 
 struct mlx5_crypto_priv {
 	TAILQ_ENTRY(mlx5_crypto_priv) next;
-	struct ibv_context *ctx; /* Device context. */
+	void *ctx; /* Device context. */
 	struct rte_cryptodev *crypto_dev;
 	void *uar; /* User Access Region. */
 	volatile uint64_t *uar_addr;
-- 
2.16.1.windows.4


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

* [dpdk-dev] [RFC PATCH 09/10] crypto/mlx5: fix size of UMR WQE
  2021-09-14  5:38 [dpdk-dev] [RFC PATCH 00/10] Support MLX5 crypto driver on Windows Tal Shnaiderman
                   ` (7 preceding siblings ...)
  2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 08/10] crypto/mlx5: use OS agnostic functions for Verbs operations Tal Shnaiderman
@ 2021-09-14  5:38 ` Tal Shnaiderman
  2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 10/10] crypto/mlx5: support on Windows Tal Shnaiderman
  9 siblings, 0 replies; 11+ messages in thread
From: Tal Shnaiderman @ 2021-09-14  5:38 UTC (permalink / raw)
  To: dev
  Cc: thomas, matan, rasland, asafp, gakhil, declan.doherty,
	viacheslavo, eilong, stable

The size of the UMR WQE allocated object is decided by a sizof
operation on the struct, however since the struct contains
a union of flexible array members this sizeof results can differ
between compilers.

GCC for example treats the union as 0 sized, MSVC adds a padding
of 16Bits.

To resolve the ambiguity the allocation size will be calculated
by the sizes of the members excluding the flexible union.

Fixes: a1978aa23bf4 ("crypto/mlx5: add maximum segments configuration")
Cc: stable@dpdk.org

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
---
 drivers/crypto/mlx5/mlx5_crypto.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/mlx5/mlx5_crypto.c b/drivers/crypto/mlx5/mlx5_crypto.c
index 3f5a6745dc..4b8d561e33 100644
--- a/drivers/crypto/mlx5/mlx5_crypto.c
+++ b/drivers/crypto/mlx5/mlx5_crypto.c
@@ -1061,7 +1061,9 @@ mlx5_crypto_dev_probe(struct rte_device *dev)
 	priv->keytag = rte_cpu_to_be_64(devarg_prms.keytag);
 	priv->max_segs_num = devarg_prms.max_segs_num;
 	priv->umr_wqe_size = sizeof(struct mlx5_wqe_umr_bsf_seg) +
-			     sizeof(struct mlx5_umr_wqe) +
+			     sizeof(struct mlx5_wqe_cseg) +
+			     sizeof(struct mlx5_wqe_umr_cseg) +
+			     sizeof(struct mlx5_wqe_mkey_cseg) +
 			     RTE_ALIGN(priv->max_segs_num, 4) *
 			     sizeof(struct mlx5_wqe_dseg);
 	rdmw_wqe_size = sizeof(struct mlx5_rdma_write_wqe) +
-- 
2.16.1.windows.4


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

* [dpdk-dev] [RFC PATCH 10/10] crypto/mlx5: support on Windows
  2021-09-14  5:38 [dpdk-dev] [RFC PATCH 00/10] Support MLX5 crypto driver on Windows Tal Shnaiderman
                   ` (8 preceding siblings ...)
  2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 09/10] crypto/mlx5: fix size of UMR WQE Tal Shnaiderman
@ 2021-09-14  5:38 ` Tal Shnaiderman
  9 siblings, 0 replies; 11+ messages in thread
From: Tal Shnaiderman @ 2021-09-14  5:38 UTC (permalink / raw)
  To: dev
  Cc: thomas, matan, rasland, asafp, gakhil, declan.doherty,
	viacheslavo, eilong

Add support for mlx5 crypto pmd on Windows OS.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
---
 drivers/common/mlx5/version.map      | 2 +-
 drivers/crypto/aesni_gcm/meson.build | 6 ++++++
 drivers/crypto/aesni_mb/meson.build  | 6 ++++++
 drivers/crypto/armv8/meson.build     | 6 ++++++
 drivers/crypto/bcmfs/meson.build     | 6 ++++++
 drivers/crypto/ccp/meson.build       | 1 +
 drivers/crypto/kasumi/meson.build    | 6 ++++++
 drivers/crypto/meson.build           | 3 ---
 drivers/crypto/mlx5/meson.build      | 4 ++--
 drivers/crypto/mvsam/meson.build     | 6 ++++++
 drivers/crypto/null/meson.build      | 6 ++++++
 drivers/crypto/octeontx/meson.build  | 6 ++++++
 drivers/crypto/openssl/meson.build   | 6 ++++++
 drivers/crypto/qat/meson.build       | 6 ++++++
 drivers/crypto/scheduler/meson.build | 6 ++++++
 drivers/crypto/snow3g/meson.build    | 6 ++++++
 drivers/crypto/virtio/meson.build    | 6 ++++++
 drivers/crypto/zuc/meson.build       | 6 ++++++
 18 files changed, 88 insertions(+), 6 deletions(-)

diff --git a/drivers/common/mlx5/version.map b/drivers/common/mlx5/version.map
index c6de706fdb..f595ef30fb 100644
--- a/drivers/common/mlx5/version.map
+++ b/drivers/common/mlx5/version.map
@@ -17,7 +17,7 @@ INTERNAL {
 	mlx5_dev_is_pci;
 	mlx5_dev_to_pci_str;
 
-	mlx5_devx_alloc_uar; # WINDOWS_NO_EXPORT
+	mlx5_devx_alloc_uar;
 
 	mlx5_devx_cmd_alloc_pd;
 	mlx5_devx_cmd_create_conn_track_offload_obj;
diff --git a/drivers/crypto/aesni_gcm/meson.build b/drivers/crypto/aesni_gcm/meson.build
index 0fcac2a8eb..7d0140ff22 100644
--- a/drivers/crypto/aesni_gcm/meson.build
+++ b/drivers/crypto/aesni_gcm/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+    build = false
+    reason = 'not supported on Windows'
+    subdir_done()
+endif
+
 IMB_required_ver = '0.52.0'
 lib = cc.find_library('IPSec_MB', required: false)
 if not lib.found()
diff --git a/drivers/crypto/aesni_mb/meson.build b/drivers/crypto/aesni_mb/meson.build
index ed6b9f53e4..b7512383c3 100644
--- a/drivers/crypto/aesni_mb/meson.build
+++ b/drivers/crypto/aesni_mb/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+    build = false
+    reason = 'not supported on Windows'
+    subdir_done()
+endif
+
 IMB_required_ver = '0.52.0'
 lib = cc.find_library('IPSec_MB', required: false)
 if not lib.found()
diff --git a/drivers/crypto/armv8/meson.build b/drivers/crypto/armv8/meson.build
index 40a4dbb7bb..5effba8bbc 100644
--- a/drivers/crypto/armv8/meson.build
+++ b/drivers/crypto/armv8/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Arm Limited
 
+if is_windows
+    build = false
+    reason = 'not supported on Windows'
+    subdir_done()
+endif
+
 dep = dependency('libAArch64crypto', required: false, method: 'pkg-config')
 if not dep.found()
     build = false
diff --git a/drivers/crypto/bcmfs/meson.build b/drivers/crypto/bcmfs/meson.build
index d67e78d51b..5842f83a3b 100644
--- a/drivers/crypto/bcmfs/meson.build
+++ b/drivers/crypto/bcmfs/meson.build
@@ -3,6 +3,12 @@
 # All rights reserved.
 #
 
+if is_windows
+    build = false
+    reason = 'not supported on Windows'
+    subdir_done()
+endif
+
 deps += ['eal', 'bus_vdev']
 sources = files(
         'bcmfs_logs.c',
diff --git a/drivers/crypto/ccp/meson.build b/drivers/crypto/ccp/meson.build
index 0f82b9b90b..a4f3406009 100644
--- a/drivers/crypto/ccp/meson.build
+++ b/drivers/crypto/ccp/meson.build
@@ -4,6 +4,7 @@
 if not is_linux
     build = false
     reason = 'only supported on Linux'
+    subdir_done()
 endif
 dep = dependency('libcrypto', required: false, method: 'pkg-config')
 if not dep.found()
diff --git a/drivers/crypto/kasumi/meson.build b/drivers/crypto/kasumi/meson.build
index e6e0f08c3d..966b8a5214 100644
--- a/drivers/crypto/kasumi/meson.build
+++ b/drivers/crypto/kasumi/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018-2020 Intel Corporation
 
+if is_windows
+    build = false
+    reason = 'not supported on Windows'
+    subdir_done()
+endif
+
 IMB_required_ver = '0.53.0'
 lib = cc.find_library('IPSec_MB', required: false)
 if not lib.found()
diff --git a/drivers/crypto/meson.build b/drivers/crypto/meson.build
index ea239f4c56..c49ec501d4 100644
--- a/drivers/crypto/meson.build
+++ b/drivers/crypto/meson.build
@@ -1,9 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
-if is_windows
-    subdir_done()
-endif
 
 drivers = [
         'aesni_gcm',
diff --git a/drivers/crypto/mlx5/meson.build b/drivers/crypto/mlx5/meson.build
index 1d6e413dd5..9d9c9c00bc 100644
--- a/drivers/crypto/mlx5/meson.build
+++ b/drivers/crypto/mlx5/meson.build
@@ -1,9 +1,9 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright (c) 2021 NVIDIA Corporation & Affiliates
 
-if not is_linux
+if not (is_linux or is_windows)
     build = false
-    reason = 'only supported on Linux'
+    reason = 'only supported on Linux and Windows'
     subdir_done()
 endif
 
diff --git a/drivers/crypto/mvsam/meson.build b/drivers/crypto/mvsam/meson.build
index fec167bf29..bf3c4323de 100644
--- a/drivers/crypto/mvsam/meson.build
+++ b/drivers/crypto/mvsam/meson.build
@@ -3,6 +3,12 @@
 # Copyright(c) 2018 Semihalf.
 # All rights reserved.
 
+if is_windows
+    build = false
+    reason = 'not supported on Windows'
+    subdir_done()
+endif
+
 dep = dependency('libmusdk', required: false, method: 'pkg-config')
 if not dep.found()
     build = false
diff --git a/drivers/crypto/null/meson.build b/drivers/crypto/null/meson.build
index 1f7d644de1..acc16e7d81 100644
--- a/drivers/crypto/null/meson.build
+++ b/drivers/crypto/null/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
+if is_windows
+    build = false
+    reason = 'not supported on Windows'
+    subdir_done()
+endif
+
 deps += 'bus_vdev'
 sources = files('null_crypto_pmd.c', 'null_crypto_pmd_ops.c')
diff --git a/drivers/crypto/octeontx/meson.build b/drivers/crypto/octeontx/meson.build
index 244b16230e..48e8e263c1 100644
--- a/drivers/crypto/octeontx/meson.build
+++ b/drivers/crypto/octeontx/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Cavium, Inc
 
+if is_windows
+    build = false
+    reason = 'not supported on Windows'
+    subdir_done()
+endif
+
 deps += ['bus_pci']
 deps += ['bus_vdev']
 deps += ['common_cpt']
diff --git a/drivers/crypto/openssl/meson.build b/drivers/crypto/openssl/meson.build
index b21fca0be3..cd962da1d6 100644
--- a/drivers/crypto/openssl/meson.build
+++ b/drivers/crypto/openssl/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
+if is_windows
+    build = false
+    reason = 'not supported on Windows'
+    subdir_done()
+endif
+
 dep = dependency('libcrypto', required: false, method: 'pkg-config')
 if not dep.found()
     build = false
diff --git a/drivers/crypto/qat/meson.build b/drivers/crypto/qat/meson.build
index b3b2d17258..d08a24c7b3 100644
--- a/drivers/crypto/qat/meson.build
+++ b/drivers/crypto/qat/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2018 Intel Corporation
 
+if is_windows
+    build = false
+    reason = 'not supported on Windows'
+    subdir_done()
+endif
+
 # this does not build the QAT driver, instead that is done in the compression
 # driver which comes later. Here we just add our sources files to the list
 build = false
diff --git a/drivers/crypto/scheduler/meson.build b/drivers/crypto/scheduler/meson.build
index d510f49970..cd18efc791 100644
--- a/drivers/crypto/scheduler/meson.build
+++ b/drivers/crypto/scheduler/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
 
+if is_windows
+    build = false
+    reason = 'not supported on Windows'
+    subdir_done()
+endif
+
 deps += ['bus_vdev', 'reorder']
 sources = files(
         'rte_cryptodev_scheduler.c',
diff --git a/drivers/crypto/snow3g/meson.build b/drivers/crypto/snow3g/meson.build
index 0c087baa2a..ac4d0354ea 100644
--- a/drivers/crypto/snow3g/meson.build
+++ b/drivers/crypto/snow3g/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019-2020 Intel Corporation
 
+if is_windows
+    build = false
+    reason = 'not supported on Windows'
+    subdir_done()
+endif
+
 IMB_required_ver = '0.53.0'
 lib = cc.find_library('IPSec_MB', required: false)
 if not lib.found()
diff --git a/drivers/crypto/virtio/meson.build b/drivers/crypto/virtio/meson.build
index 1b6d77f66f..45533c9b89 100644
--- a/drivers/crypto/virtio/meson.build
+++ b/drivers/crypto/virtio/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 HUAWEI TECHNOLOGIES CO., LTD.
 
+if is_windows
+    build = false
+    reason = 'not supported on Windows'
+    subdir_done()
+endif
+
 includes += include_directories('../../../lib/vhost')
 deps += 'bus_pci'
 sources = files(
diff --git a/drivers/crypto/zuc/meson.build b/drivers/crypto/zuc/meson.build
index a5f77a22d8..0a29885610 100644
--- a/drivers/crypto/zuc/meson.build
+++ b/drivers/crypto/zuc/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018-2020 Intel Corporation
 
+if is_windows
+    build = false
+    reason = 'not supported on Windows'
+    subdir_done()
+endif
+
 IMB_required_ver = '0.53.0'
 lib = cc.find_library('IPSec_MB', required: false)
 if not lib.found()
-- 
2.16.1.windows.4


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

end of thread, other threads:[~2021-09-14  5:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-14  5:38 [dpdk-dev] [RFC PATCH 00/10] Support MLX5 crypto driver on Windows Tal Shnaiderman
2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 01/10] common/mlx5: add DV enums to Windows defs file Tal Shnaiderman
2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 02/10] common/mlx5: add an agnostic OS function to open device context Tal Shnaiderman
2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 03/10] common/mlx5: move pdn getter to common driver Tal Shnaiderman
2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 04/10] common/mlx5: add memory region OS agnostic functions for Linux Tal Shnaiderman
2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 05/10] crypto/mlx5: replace UNIX functions with EAL functions Tal Shnaiderman
2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 06/10] crypto/mlx5: use OS agnostic functions for UMEM operations Tal Shnaiderman
2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 07/10] crypto/mlx5: use OS agnostic functions for PD operations Tal Shnaiderman
2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 08/10] crypto/mlx5: use OS agnostic functions for Verbs operations Tal Shnaiderman
2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 09/10] crypto/mlx5: fix size of UMR WQE Tal Shnaiderman
2021-09-14  5:38 ` [dpdk-dev] [RFC PATCH 10/10] crypto/mlx5: support on Windows Tal Shnaiderman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.