patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 1/2] vhost: fix lock on device readiness notification
       [not found] <1622189463-392610-1-git-send-email-jiayu.hu@intel.com>
@ 2021-05-28  8:11 ` Jiayu Hu
  2021-07-02  7:36   ` Maxime Coquelin
       [not found]   ` <1625656687-40604-1-git-send-email-jiayu.hu@intel.com>
  0 siblings, 2 replies; 7+ messages in thread
From: Jiayu Hu @ 2021-05-28  8:11 UTC (permalink / raw)
  To: dev; +Cc: maxime.coquelin, chenbo.xia, yinan.wang, Jiayu Hu, stable

The vhost notifies the application of device readiness via
vhost_user_notify_queue_state(), but calling this function
is not protected by the lock. This patch is to make this
function call lock protected.

Fixes: d0fcc38f5fa4 ("vhost: improve device readiness notifications")
Cc: stable@dpdk.org
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
---
 lib/vhost/vhost_user.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
index 8f0eba6..dabce26 100644
--- a/lib/vhost/vhost_user.c
+++ b/lib/vhost/vhost_user.c
@@ -2915,9 +2915,6 @@ vhost_user_msg_handler(int vid, int fd)
 		}
 	}
 
-	if (unlock_required)
-		vhost_user_unlock_all_queue_pairs(dev);
-
 	/* If message was not handled at this stage, treat it as an error */
 	if (!handled) {
 		VHOST_LOG_CONFIG(ERR,
@@ -2952,6 +2949,8 @@ vhost_user_msg_handler(int vid, int fd)
 		}
 	}
 
+	if (unlock_required)
+		vhost_user_unlock_all_queue_pairs(dev);
 
 	if (!virtio_is_ready(dev))
 		goto out;
-- 
2.7.4


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

* Re: [dpdk-stable] [PATCH 1/2] vhost: fix lock on device readiness notification
  2021-05-28  8:11 ` [dpdk-stable] [PATCH 1/2] vhost: fix lock on device readiness notification Jiayu Hu
@ 2021-07-02  7:36   ` Maxime Coquelin
       [not found]   ` <1625656687-40604-1-git-send-email-jiayu.hu@intel.com>
  1 sibling, 0 replies; 7+ messages in thread
From: Maxime Coquelin @ 2021-07-02  7:36 UTC (permalink / raw)
  To: Jiayu Hu, dev; +Cc: chenbo.xia, yinan.wang, stable



On 5/28/21 10:11 AM, Jiayu Hu wrote:
> The vhost notifies the application of device readiness via
> vhost_user_notify_queue_state(), but calling this function
> is not protected by the lock. This patch is to make this
> function call lock protected.
> 
> Fixes: d0fcc38f5fa4 ("vhost: improve device readiness notifications")
> Cc: stable@dpdk.org
> Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
> ---
>  lib/vhost/vhost_user.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
> index 8f0eba6..dabce26 100644
> --- a/lib/vhost/vhost_user.c
> +++ b/lib/vhost/vhost_user.c
> @@ -2915,9 +2915,6 @@ vhost_user_msg_handler(int vid, int fd)
>  		}
>  	}
>  
> -	if (unlock_required)
> -		vhost_user_unlock_all_queue_pairs(dev);
> -
>  	/* If message was not handled at this stage, treat it as an error */
>  	if (!handled) {
>  		VHOST_LOG_CONFIG(ERR,
> @@ -2952,6 +2949,8 @@ vhost_user_msg_handler(int vid, int fd)
>  		}
>  	}
>  
> +	if (unlock_required)
> +		vhost_user_unlock_all_queue_pairs(dev);
>  
>  	if (!virtio_is_ready(dev))
>  		goto out;
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime


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

* [dpdk-stable] [PATCH v2 1/3] vhost: fix lock on device readiness notification
       [not found]   ` <1625656687-40604-1-git-send-email-jiayu.hu@intel.com>
@ 2021-07-07 11:18     ` Jiayu Hu
       [not found]       ` <1625823790-91995-1-git-send-email-jiayu.hu@intel.com>
  0 siblings, 1 reply; 7+ messages in thread
From: Jiayu Hu @ 2021-07-07 11:18 UTC (permalink / raw)
  To: dev; +Cc: maxime.coquelin, chenbo.xia, yinan.wang, Jiayu Hu, stable

The vhost notifies the application of device readiness via
vhost_user_notify_queue_state(), but calling this function
is not protected by the lock. This patch is to make this
function call lock protected.

Fixes: d0fcc38f5fa4 ("vhost: improve device readiness notifications")
Cc: stable@dpdk.org
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/vhost/vhost_user.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
index 031c578..31300e1 100644
--- a/lib/vhost/vhost_user.c
+++ b/lib/vhost/vhost_user.c
@@ -2995,9 +2995,6 @@ vhost_user_msg_handler(int vid, int fd)
 		}
 	}
 
-	if (unlock_required)
-		vhost_user_unlock_all_queue_pairs(dev);
-
 	/* If message was not handled at this stage, treat it as an error */
 	if (!handled) {
 		VHOST_LOG_CONFIG(ERR,
@@ -3032,6 +3029,8 @@ vhost_user_msg_handler(int vid, int fd)
 		}
 	}
 
+	if (unlock_required)
+		vhost_user_unlock_all_queue_pairs(dev);
 
 	if (!virtio_is_ready(dev))
 		goto out;
-- 
2.7.4


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

* [dpdk-stable] [PATCH v3 1/3] vhost: fix lock on device readiness notification
       [not found]       ` <1625823790-91995-1-git-send-email-jiayu.hu@intel.com>
@ 2021-07-09  9:43         ` Jiayu Hu
       [not found]           ` <1626162383-89674-1-git-send-email-jiayu.hu@intel.com>
  0 siblings, 1 reply; 7+ messages in thread
From: Jiayu Hu @ 2021-07-09  9:43 UTC (permalink / raw)
  To: dev; +Cc: maxime.coquelin, chenbo.xia, yinan.wang, Jiayu Hu, stable

The vhost notifies the application of device readiness via
vhost_user_notify_queue_state(), but calling this function
is not protected by the lock. This patch is to make this
function call lock protected.

Fixes: d0fcc38f5fa4 ("vhost: improve device readiness notifications")
Cc: stable@dpdk.org
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/vhost/vhost_user.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
index 031c578..31300e1 100644
--- a/lib/vhost/vhost_user.c
+++ b/lib/vhost/vhost_user.c
@@ -2995,9 +2995,6 @@ vhost_user_msg_handler(int vid, int fd)
 		}
 	}
 
-	if (unlock_required)
-		vhost_user_unlock_all_queue_pairs(dev);
-
 	/* If message was not handled at this stage, treat it as an error */
 	if (!handled) {
 		VHOST_LOG_CONFIG(ERR,
@@ -3032,6 +3029,8 @@ vhost_user_msg_handler(int vid, int fd)
 		}
 	}
 
+	if (unlock_required)
+		vhost_user_unlock_all_queue_pairs(dev);
 
 	if (!virtio_is_ready(dev))
 		goto out;
-- 
2.7.4


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

* [dpdk-stable] [PATCH v4 1/3] vhost: fix lock on device readiness notification
       [not found]           ` <1626162383-89674-1-git-send-email-jiayu.hu@intel.com>
@ 2021-07-13  7:46             ` Jiayu Hu
       [not found]               ` <1626465089-17052-1-git-send-email-jiayu.hu@intel.com>
  0 siblings, 1 reply; 7+ messages in thread
From: Jiayu Hu @ 2021-07-13  7:46 UTC (permalink / raw)
  To: dev; +Cc: maxime.coquelin, chenbo.xia, Jiayu Hu, stable

The vhost notifies the application of device readiness via
vhost_user_notify_queue_state(), but calling this function
is not protected by the lock. This patch is to make this
function call lock protected.

Fixes: d0fcc38f5fa4 ("vhost: improve device readiness notifications")
Cc: stable@dpdk.org

Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/vhost/vhost_user.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
index 031c578..31300e1 100644
--- a/lib/vhost/vhost_user.c
+++ b/lib/vhost/vhost_user.c
@@ -2995,9 +2995,6 @@ vhost_user_msg_handler(int vid, int fd)
 		}
 	}
 
-	if (unlock_required)
-		vhost_user_unlock_all_queue_pairs(dev);
-
 	/* If message was not handled at this stage, treat it as an error */
 	if (!handled) {
 		VHOST_LOG_CONFIG(ERR,
@@ -3032,6 +3029,8 @@ vhost_user_msg_handler(int vid, int fd)
 		}
 	}
 
+	if (unlock_required)
+		vhost_user_unlock_all_queue_pairs(dev);
 
 	if (!virtio_is_ready(dev))
 		goto out;
-- 
2.7.4


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

* [dpdk-stable] [PATCH v5 1/3] vhost: fix lock on device readiness notification
       [not found]               ` <1626465089-17052-1-git-send-email-jiayu.hu@intel.com>
@ 2021-07-16 19:51                 ` Jiayu Hu
       [not found]                   ` <1626706847-276163-1-git-send-email-jiayu.hu@intel.com>
  0 siblings, 1 reply; 7+ messages in thread
From: Jiayu Hu @ 2021-07-16 19:51 UTC (permalink / raw)
  To: dev; +Cc: maxime.coquelin, chenbo.xia, Jiayu Hu, stable

The vhost notifies the application of device readiness via
vhost_user_notify_queue_state(), but calling this function
is not protected by the lock. This patch is to make this
function call lock protected.

Fixes: d0fcc38f5fa4 ("vhost: improve device readiness notifications")
Cc: stable@dpdk.org

Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/vhost/vhost_user.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
index 031c578..31300e1 100644
--- a/lib/vhost/vhost_user.c
+++ b/lib/vhost/vhost_user.c
@@ -2995,9 +2995,6 @@ vhost_user_msg_handler(int vid, int fd)
 		}
 	}
 
-	if (unlock_required)
-		vhost_user_unlock_all_queue_pairs(dev);
-
 	/* If message was not handled at this stage, treat it as an error */
 	if (!handled) {
 		VHOST_LOG_CONFIG(ERR,
@@ -3032,6 +3029,8 @@ vhost_user_msg_handler(int vid, int fd)
 		}
 	}
 
+	if (unlock_required)
+		vhost_user_unlock_all_queue_pairs(dev);
 
 	if (!virtio_is_ready(dev))
 		goto out;
-- 
2.7.4


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

* [dpdk-stable] [PATCH v6 1/3] vhost: fix lock on device readiness notification
       [not found]                   ` <1626706847-276163-1-git-send-email-jiayu.hu@intel.com>
@ 2021-07-19 15:00                     ` Jiayu Hu
  0 siblings, 0 replies; 7+ messages in thread
From: Jiayu Hu @ 2021-07-19 15:00 UTC (permalink / raw)
  To: dev; +Cc: maxime.coquelin, chenbo.xia, Jiayu Hu, stable

The vhost notifies the application of device readiness via
vhost_user_notify_queue_state(), but calling this function
is not protected by the lock. This patch is to make this
function call lock protected.

Fixes: d0fcc38f5fa4 ("vhost: improve device readiness notifications")
Cc: stable@dpdk.org

Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/vhost/vhost_user.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
index 031c578..31300e1 100644
--- a/lib/vhost/vhost_user.c
+++ b/lib/vhost/vhost_user.c
@@ -2995,9 +2995,6 @@ vhost_user_msg_handler(int vid, int fd)
 		}
 	}
 
-	if (unlock_required)
-		vhost_user_unlock_all_queue_pairs(dev);
-
 	/* If message was not handled at this stage, treat it as an error */
 	if (!handled) {
 		VHOST_LOG_CONFIG(ERR,
@@ -3032,6 +3029,8 @@ vhost_user_msg_handler(int vid, int fd)
 		}
 	}
 
+	if (unlock_required)
+		vhost_user_unlock_all_queue_pairs(dev);
 
 	if (!virtio_is_ready(dev))
 		goto out;
-- 
2.7.4


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

end of thread, other threads:[~2021-07-19  8:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1622189463-392610-1-git-send-email-jiayu.hu@intel.com>
2021-05-28  8:11 ` [dpdk-stable] [PATCH 1/2] vhost: fix lock on device readiness notification Jiayu Hu
2021-07-02  7:36   ` Maxime Coquelin
     [not found]   ` <1625656687-40604-1-git-send-email-jiayu.hu@intel.com>
2021-07-07 11:18     ` [dpdk-stable] [PATCH v2 1/3] " Jiayu Hu
     [not found]       ` <1625823790-91995-1-git-send-email-jiayu.hu@intel.com>
2021-07-09  9:43         ` [dpdk-stable] [PATCH v3 " Jiayu Hu
     [not found]           ` <1626162383-89674-1-git-send-email-jiayu.hu@intel.com>
2021-07-13  7:46             ` [dpdk-stable] [PATCH v4 " Jiayu Hu
     [not found]               ` <1626465089-17052-1-git-send-email-jiayu.hu@intel.com>
2021-07-16 19:51                 ` [dpdk-stable] [PATCH v5 " Jiayu Hu
     [not found]                   ` <1626706847-276163-1-git-send-email-jiayu.hu@intel.com>
2021-07-19 15:00                     ` [dpdk-stable] [PATCH v6 " Jiayu Hu

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git