patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH v3 1/8] vhost: fix virtio ready flag check
       [not found] <20200706112452.1474533-1-amorenoz@redhat.com>
@ 2020-07-06 11:24 ` Adrian Moreno
  2020-07-07  3:21   ` Xia, Chenbo
  0 siblings, 1 reply; 3+ messages in thread
From: Adrian Moreno @ 2020-07-06 11:24 UTC (permalink / raw)
  To: dev, chenbo.xia, xiaolong.ye, shahafs, matan, maxime.coquelin,
	xiao.w.wang, viacheslavo
  Cc: jasowang, lulu, stable

From: Maxime Coquelin <maxime.coquelin@redhat.com>

Before checking whether the device is ready is done
a check on whether the RUNNING flag is set. Then the
READY flag is set if virtio_is_ready() returns true.

While it seems to not cause any issue, it makes more
sense to check whether the READY flag is set and not
the RUNNING one.

Fixes: c0674b1bc898 ("vhost: move the device ready check at proper place")
Cc: stable@dpdk.org

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vhost_user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 6039a8fdb..5750dde6d 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -2825,7 +2825,7 @@ vhost_user_msg_handler(int vid, int fd)
 	}
 
 
-	if (!(dev->flags & VIRTIO_DEV_RUNNING) && virtio_is_ready(dev)) {
+	if (!(dev->flags & VIRTIO_DEV_READY) && virtio_is_ready(dev)) {
 		dev->flags |= VIRTIO_DEV_READY;
 
 		if (!(dev->flags & VIRTIO_DEV_RUNNING)) {
-- 
2.26.2


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

* Re: [dpdk-stable] [PATCH v3 1/8] vhost: fix virtio ready flag check
  2020-07-06 11:24 ` [dpdk-stable] [PATCH v3 1/8] vhost: fix virtio ready flag check Adrian Moreno
@ 2020-07-07  3:21   ` Xia, Chenbo
  2020-07-08 14:22     ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Xia, Chenbo @ 2020-07-07  3:21 UTC (permalink / raw)
  To: Adrian Moreno, dev, Ye, Xiaolong, shahafs, matan,
	maxime.coquelin, Wang, Xiao W, viacheslavo
  Cc: jasowang, lulu, stable


> -----Original Message-----
> From: Adrian Moreno <amorenoz@redhat.com>
> Sent: Monday, July 6, 2020 7:25 PM
> To: dev@dpdk.org; Xia, Chenbo <chenbo.xia@intel.com>; Ye, Xiaolong
> <xiaolong.ye@intel.com>; shahafs@mellanox.com; matan@mellanox.com;
> maxime.coquelin@redhat.com; Wang, Xiao W <xiao.w.wang@intel.com>;
> viacheslavo@mellanox.com
> Cc: jasowang@redhat.com; lulu@redhat.com; stable@dpdk.org
> Subject: [PATCH v3 1/8] vhost: fix virtio ready flag check
> 
> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> 
> Before checking whether the device is ready is done a check on whether the
> RUNNING flag is set. Then the READY flag is set if virtio_is_ready() returns true.
> 
> While it seems to not cause any issue, it makes more sense to check whether the
> READY flag is set and not the RUNNING one.
> 
> Fixes: c0674b1bc898 ("vhost: move the device ready check at proper place")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
>  lib/librte_vhost/vhost_user.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index
> 6039a8fdb..5750dde6d 100644
> --- a/lib/librte_vhost/vhost_user.c
> +++ b/lib/librte_vhost/vhost_user.c
> @@ -2825,7 +2825,7 @@ vhost_user_msg_handler(int vid, int fd)
>  	}
> 
> 
> -	if (!(dev->flags & VIRTIO_DEV_RUNNING) && virtio_is_ready(dev)) {
> +	if (!(dev->flags & VIRTIO_DEV_READY) && virtio_is_ready(dev)) {
>  		dev->flags |= VIRTIO_DEV_READY;
> 
>  		if (!(dev->flags & VIRTIO_DEV_RUNNING)) {
> --
> 2.26.2

Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>

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

* Re: [dpdk-stable] [PATCH v3 1/8] vhost: fix virtio ready flag check
  2020-07-07  3:21   ` Xia, Chenbo
@ 2020-07-08 14:22     ` Ferruh Yigit
  0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2020-07-08 14:22 UTC (permalink / raw)
  To: Xia, Chenbo, Adrian Moreno, dev, Ye, Xiaolong, shahafs, matan,
	maxime.coquelin, Wang, Xiao W, viacheslavo
  Cc: jasowang, lulu, stable

On 7/7/2020 4:21 AM, Xia, Chenbo wrote:
> 
>> -----Original Message-----
>> From: Adrian Moreno <amorenoz@redhat.com>
>> Sent: Monday, July 6, 2020 7:25 PM
>> To: dev@dpdk.org; Xia, Chenbo <chenbo.xia@intel.com>; Ye, Xiaolong
>> <xiaolong.ye@intel.com>; shahafs@mellanox.com; matan@mellanox.com;
>> maxime.coquelin@redhat.com; Wang, Xiao W <xiao.w.wang@intel.com>;
>> viacheslavo@mellanox.com
>> Cc: jasowang@redhat.com; lulu@redhat.com; stable@dpdk.org
>> Subject: [PATCH v3 1/8] vhost: fix virtio ready flag check
>>
>> From: Maxime Coquelin <maxime.coquelin@redhat.com>
>>
>> Before checking whether the device is ready is done a check on whether the
>> RUNNING flag is set. Then the READY flag is set if virtio_is_ready() returns true.
>>
>> While it seems to not cause any issue, it makes more sense to check whether the
>> READY flag is set and not the RUNNING one.
>>
>> Fixes: c0674b1bc898 ("vhost: move the device ready check at proper place")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
>> ---
>>  lib/librte_vhost/vhost_user.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index
>> 6039a8fdb..5750dde6d 100644
>> --- a/lib/librte_vhost/vhost_user.c
>> +++ b/lib/librte_vhost/vhost_user.c
>> @@ -2825,7 +2825,7 @@ vhost_user_msg_handler(int vid, int fd)
>>  	}
>>
>>
>> -	if (!(dev->flags & VIRTIO_DEV_RUNNING) && virtio_is_ready(dev)) {
>> +	if (!(dev->flags & VIRTIO_DEV_READY) && virtio_is_ready(dev)) {
>>  		dev->flags |= VIRTIO_DEV_READY;
>>
>>  		if (!(dev->flags & VIRTIO_DEV_RUNNING)) {
>> --
>> 2.26.2
> 
> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
> 

Series applied to dpdk-next-net/master, thanks.

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

end of thread, other threads:[~2020-07-08 14:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200706112452.1474533-1-amorenoz@redhat.com>
2020-07-06 11:24 ` [dpdk-stable] [PATCH v3 1/8] vhost: fix virtio ready flag check Adrian Moreno
2020-07-07  3:21   ` Xia, Chenbo
2020-07-08 14:22     ` Ferruh Yigit

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