DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tal Shnaiderman <talshn@nvidia.com>
To: <dev@dpdk.org>
Cc: <thomas@monjalon.net>, <matan@nvidia.com>, <rasland@nvidia.com>,
	<asafp@nvidia.com>, <gakhil@marvell.com>,
	<declan.doherty@intel.com>, <viacheslavo@nvidia.com>,
	<eilong@nvidia.com>
Subject: [dpdk-dev] [PATCH v3 2/5] crypto/mlx5: modify unix pthread code
Date: Mon, 25 Oct 2021 11:46:14 +0300	[thread overview]
Message-ID: <20211025084617.4952-3-talshn@nvidia.com> (raw)
In-Reply-To: <20211025084617.4952-1-talshn@nvidia.com>

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>
Acked-by: Matan Azrad <matan@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 f430d8cde0..6bebc83c39 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;
 
@@ -967,6 +968,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


  parent reply	other threads:[~2021-10-25  8:47 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-17  9:41 [dpdk-dev] [PATCH v2 0/6] Support MLX5 crypto driver on Windows Tal Shnaiderman
2021-10-17  9:41 ` [dpdk-dev] [PATCH v2 1/6] common/mlx5: add DV enums to Windows defs file Tal Shnaiderman
2021-10-25  8:46   ` [dpdk-dev] [PATCH v3 0/5] Support MLX5 crypto driver on Windows Tal Shnaiderman
2021-10-25  8:46     ` [dpdk-dev] [PATCH v3 1/5] common/mlx5: add DV enums to Windows defs file Tal Shnaiderman
2021-10-25  8:46     ` Tal Shnaiderman [this message]
2021-10-25  8:46     ` [dpdk-dev] [PATCH v3 3/5] crypto/mlx5: fix size of UMR WQE Tal Shnaiderman
2021-10-25  8:46     ` [dpdk-dev] [PATCH v3 4/5] build: check Windows support per driver Tal Shnaiderman
2021-10-25  8:46     ` [dpdk-dev] [PATCH v3 5/5] crypto/mlx5: support on Windows Tal Shnaiderman
2021-10-27 12:04       ` [dpdk-dev] [EXT] " Akhil Goyal
2021-10-27 13:33         ` Tal Shnaiderman
2021-10-31 14:06           ` Tal Shnaiderman
2021-10-31 19:08             ` Akhil Goyal
2021-10-17  9:41 ` [dpdk-dev] [PATCH v2 2/6] crypto/mlx5: replace UNIX functions with EAL functions Tal Shnaiderman
2021-10-17  9:41 ` [dpdk-dev] [PATCH v2 3/6] crypto/mlx5: use OS agnostic functions for UMEM operations Tal Shnaiderman
2021-10-17  9:41 ` [dpdk-dev] [PATCH v2 4/6] crypto/mlx5: fix size of UMR WQE Tal Shnaiderman
2021-10-17  9:41 ` [dpdk-dev] [PATCH v2 5/6] build: check Windows support per driver Tal Shnaiderman
2021-10-17  9:41 ` [dpdk-dev] [PATCH v2 5/6] build: have Windows support checked " Tal Shnaiderman
2021-10-17  9:41 ` [dpdk-dev] [PATCH v2 6/6] crypto/mlx5: support on Windows Tal Shnaiderman
2021-10-17 10:13 ` [dpdk-dev] [PATCH v2 0/6] Support MLX5 crypto driver " Matan Azrad

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211025084617.4952-3-talshn@nvidia.com \
    --to=talshn@nvidia.com \
    --cc=asafp@nvidia.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=eilong@nvidia.com \
    --cc=gakhil@marvell.com \
    --cc=matan@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).