DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/virtio: disable event suppression when reconnect
@ 2020-05-15  1:40 Marvin Liu
  2020-05-15  1:53 ` Wang, Xiao W
  2020-05-15  2:35 ` [dpdk-dev] [PATCH v2] net/virtio: fix unexpected event after reconnect Marvin Liu
  0 siblings, 2 replies; 7+ messages in thread
From: Marvin Liu @ 2020-05-15  1:40 UTC (permalink / raw)
  To: maxime.coquelin, xiaolong.ye, zhihong.wang; +Cc: dev, Marvin Liu

Event suppression should be disabled after virtqueue initialization. It
can be enabled by calling rte_eth_dev_rx_intr_enable later.

Signed-off-by: Marvin Liu <yong.liu@intel.com>

diff --git a/drivers/net/virtio/virtqueue.c b/drivers/net/virtio/virtqueue.c
index 408bba236a..2702e120ee 100644
--- a/drivers/net/virtio/virtqueue.c
+++ b/drivers/net/virtio/virtqueue.c
@@ -175,6 +175,7 @@ virtqueue_rxvq_reset_packed(struct virtqueue *vq)
 
 	vring_desc_init_packed(vq, size);
 
+	virtqueue_disable_intr(vq);
 	return 0;
 }
 
@@ -211,5 +212,6 @@ virtqueue_txvq_reset_packed(struct virtqueue *vq)
 
 	vring_desc_init_packed(vq, size);
 
+	virtqueue_disable_intr(vq);
 	return 0;
 }
-- 
2.17.1


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

* Re: [dpdk-dev] [PATCH] net/virtio: disable event suppression when reconnect
  2020-05-15  1:40 [dpdk-dev] [PATCH] net/virtio: disable event suppression when reconnect Marvin Liu
@ 2020-05-15  1:53 ` Wang, Xiao W
  2020-05-15  2:41   ` Liu, Yong
  2020-05-15  2:35 ` [dpdk-dev] [PATCH v2] net/virtio: fix unexpected event after reconnect Marvin Liu
  1 sibling, 1 reply; 7+ messages in thread
From: Wang, Xiao W @ 2020-05-15  1:53 UTC (permalink / raw)
  To: Liu, Yong, maxime.coquelin, Ye, Xiaolong, Wang, Zhihong; +Cc: dev, Liu, Yong

Hi Marvin,

Comments inline.
Thanks for the fix.

Best Regards,
Xiao

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Marvin Liu
> Sent: Friday, May 15, 2020 9:41 AM
> To: maxime.coquelin@redhat.com; Ye, Xiaolong <xiaolong.ye@intel.com>;
> Wang, Zhihong <zhihong.wang@intel.com>
> Cc: dev@dpdk.org; Liu, Yong <yong.liu@intel.com>
> Subject: [dpdk-dev] [PATCH] net/virtio: disable event suppression when
> reconnect
> 
> Event suppression should be disabled after virtqueue initialization. It

s/Event suppression/interrupt/g

> can be enabled by calling rte_eth_dev_rx_intr_enable later.
> 
> Signed-off-by: Marvin Liu <yong.liu@intel.com>
> 
> diff --git a/drivers/net/virtio/virtqueue.c b/drivers/net/virtio/virtqueue.c
> index 408bba236a..2702e120ee 100644
> --- a/drivers/net/virtio/virtqueue.c
> +++ b/drivers/net/virtio/virtqueue.c
> @@ -175,6 +175,7 @@ virtqueue_rxvq_reset_packed(struct virtqueue *vq)
> 
>  	vring_desc_init_packed(vq, size);
> 
> +	virtqueue_disable_intr(vq);
>  	return 0;
>  }
> 
> @@ -211,5 +212,6 @@ virtqueue_txvq_reset_packed(struct virtqueue *vq)
> 
>  	vring_desc_init_packed(vq, size);
> 
> +	virtqueue_disable_intr(vq);
>  	return 0;
>  }
> --
> 2.17.1

Can we backport it to LTS by cc stable?


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

* [dpdk-dev] [PATCH v2] net/virtio: fix unexpected event after reconnect
  2020-05-15  1:40 [dpdk-dev] [PATCH] net/virtio: disable event suppression when reconnect Marvin Liu
  2020-05-15  1:53 ` Wang, Xiao W
@ 2020-05-15  2:35 ` Marvin Liu
  2020-05-15  2:46   ` Wang, Xiao W
                     ` (2 more replies)
  1 sibling, 3 replies; 7+ messages in thread
From: Marvin Liu @ 2020-05-15  2:35 UTC (permalink / raw)
  To: maxime.coquelin, xiaolong.ye, zhihong.wang, xiao.w.wang
  Cc: dev, Marvin Liu, stable

Event notification should be disabled after virtqueue initialization and
enabled by calling rte_eth_dev_rx_intr_enable later. When virtio user
device reconnecting to vhost, virtqueue_disable_intr should be called to
disable event notification.

Fixes: 6ebbf4109f35 ("net/virtio-user: fix packed ring server mode")
Cc: stable@dpdk.org

Signed-off-by: Marvin Liu <yong.liu@intel.com>
---
v2: commit log update and cc stable

diff --git a/drivers/net/virtio/virtqueue.c b/drivers/net/virtio/virtqueue.c
index 0b4e3bf3e..02c8b9fc5 100644
--- a/drivers/net/virtio/virtqueue.c
+++ b/drivers/net/virtio/virtqueue.c
@@ -174,6 +174,7 @@ virtqueue_rxvq_reset_packed(struct virtqueue *vq)
 
 	vring_desc_init_packed(vq, size);
 
+	virtqueue_disable_intr(vq);
 	return 0;
 }
 
@@ -210,5 +211,6 @@ virtqueue_txvq_reset_packed(struct virtqueue *vq)
 
 	vring_desc_init_packed(vq, size);
 
+	virtqueue_disable_intr(vq);
 	return 0;
 }
-- 
2.17.1


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

* Re: [dpdk-dev] [PATCH] net/virtio: disable event suppression when reconnect
  2020-05-15  1:53 ` Wang, Xiao W
@ 2020-05-15  2:41   ` Liu, Yong
  0 siblings, 0 replies; 7+ messages in thread
From: Liu, Yong @ 2020-05-15  2:41 UTC (permalink / raw)
  To: Wang, Xiao W, maxime.coquelin, Ye, Xiaolong, Wang, Zhihong; +Cc: dev

Thanks for reminder, xiao. v2 will cc stable branch. 
As spec mentioned, notification is more precise in semantic.  Will do /event suppression/event notification/s. 

Regards,
Marvin

> -----Original Message-----
> From: Wang, Xiao W <xiao.w.wang@intel.com>
> Sent: Friday, May 15, 2020 9:53 AM
> To: Liu, Yong <yong.liu@intel.com>; maxime.coquelin@redhat.com; Ye,
> Xiaolong <xiaolong.ye@intel.com>; Wang, Zhihong
> <zhihong.wang@intel.com>
> Cc: dev@dpdk.org; Liu, Yong <yong.liu@intel.com>
> Subject: RE: [dpdk-dev] [PATCH] net/virtio: disable event suppression when
> reconnect
> 
> Hi Marvin,
> 
> Comments inline.
> Thanks for the fix.
> 
> Best Regards,
> Xiao
> 
> > -----Original Message-----
> > From: dev <dev-bounces@dpdk.org> On Behalf Of Marvin Liu
> > Sent: Friday, May 15, 2020 9:41 AM
> > To: maxime.coquelin@redhat.com; Ye, Xiaolong <xiaolong.ye@intel.com>;
> > Wang, Zhihong <zhihong.wang@intel.com>
> > Cc: dev@dpdk.org; Liu, Yong <yong.liu@intel.com>
> > Subject: [dpdk-dev] [PATCH] net/virtio: disable event suppression when
> > reconnect
> >
> > Event suppression should be disabled after virtqueue initialization. It
> 
> s/Event suppression/interrupt/g
> 
> > can be enabled by calling rte_eth_dev_rx_intr_enable later.
> >
> > Signed-off-by: Marvin Liu <yong.liu@intel.com>
> >
> > diff --git a/drivers/net/virtio/virtqueue.c b/drivers/net/virtio/virtqueue.c
> > index 408bba236a..2702e120ee 100644
> > --- a/drivers/net/virtio/virtqueue.c
> > +++ b/drivers/net/virtio/virtqueue.c
> > @@ -175,6 +175,7 @@ virtqueue_rxvq_reset_packed(struct virtqueue *vq)
> >
> >  vring_desc_init_packed(vq, size);
> >
> > +virtqueue_disable_intr(vq);
> >  return 0;
> >  }
> >
> > @@ -211,5 +212,6 @@ virtqueue_txvq_reset_packed(struct virtqueue *vq)
> >
> >  vring_desc_init_packed(vq, size);
> >
> > +virtqueue_disable_intr(vq);
> >  return 0;
> >  }
> > --
> > 2.17.1
> 
> Can we backport it to LTS by cc stable?
> 


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

* Re: [dpdk-dev] [PATCH v2] net/virtio: fix unexpected event after reconnect
  2020-05-15  2:35 ` [dpdk-dev] [PATCH v2] net/virtio: fix unexpected event after reconnect Marvin Liu
@ 2020-05-15  2:46   ` Wang, Xiao W
  2020-05-15  7:51   ` Maxime Coquelin
  2020-05-15  8:37   ` Maxime Coquelin
  2 siblings, 0 replies; 7+ messages in thread
From: Wang, Xiao W @ 2020-05-15  2:46 UTC (permalink / raw)
  To: Liu, Yong, maxime.coquelin, Ye, Xiaolong, Wang, Zhihong; +Cc: dev, stable

Hi,

Best Regards,
Xiao

> -----Original Message-----
> From: Liu, Yong <yong.liu@intel.com>
> Sent: Friday, May 15, 2020 10:35 AM
> To: maxime.coquelin@redhat.com; Ye, Xiaolong <xiaolong.ye@intel.com>;
> Wang, Zhihong <zhihong.wang@intel.com>; Wang, Xiao W
> <xiao.w.wang@intel.com>
> Cc: dev@dpdk.org; Liu, Yong <yong.liu@intel.com>; stable@dpdk.org
> Subject: [PATCH v2] net/virtio: fix unexpected event after reconnect
> 
> Event notification should be disabled after virtqueue initialization and
> enabled by calling rte_eth_dev_rx_intr_enable later. When virtio user
> device reconnecting to vhost, virtqueue_disable_intr should be called to
> disable event notification.
> 
> Fixes: 6ebbf4109f35 ("net/virtio-user: fix packed ring server mode")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Marvin Liu <yong.liu@intel.com>
> ---
> v2: commit log update and cc stable
> 
> diff --git a/drivers/net/virtio/virtqueue.c b/drivers/net/virtio/virtqueue.c
> index 0b4e3bf3e..02c8b9fc5 100644
> --- a/drivers/net/virtio/virtqueue.c
> +++ b/drivers/net/virtio/virtqueue.c
> @@ -174,6 +174,7 @@ virtqueue_rxvq_reset_packed(struct virtqueue *vq)
> 
>  	vring_desc_init_packed(vq, size);
> 
> +	virtqueue_disable_intr(vq);
>  	return 0;
>  }
> 
> @@ -210,5 +211,6 @@ virtqueue_txvq_reset_packed(struct virtqueue *vq)
> 
>  	vring_desc_init_packed(vq, size);
> 
> +	virtqueue_disable_intr(vq);
>  	return 0;
>  }
> --
> 2.17.1

Acked-by: Xiao Wang <xiao.w.wang@intel.com>

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

* Re: [dpdk-dev] [PATCH v2] net/virtio: fix unexpected event after reconnect
  2020-05-15  2:35 ` [dpdk-dev] [PATCH v2] net/virtio: fix unexpected event after reconnect Marvin Liu
  2020-05-15  2:46   ` Wang, Xiao W
@ 2020-05-15  7:51   ` Maxime Coquelin
  2020-05-15  8:37   ` Maxime Coquelin
  2 siblings, 0 replies; 7+ messages in thread
From: Maxime Coquelin @ 2020-05-15  7:51 UTC (permalink / raw)
  To: Marvin Liu, xiaolong.ye, zhihong.wang, xiao.w.wang; +Cc: dev, stable



On 5/15/20 4:35 AM, Marvin Liu wrote:
> Event notification should be disabled after virtqueue initialization and
> enabled by calling rte_eth_dev_rx_intr_enable later. When virtio user
> device reconnecting to vhost, virtqueue_disable_intr should be called to
> disable event notification.
> 
> Fixes: 6ebbf4109f35 ("net/virtio-user: fix packed ring server mode")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Marvin Liu <yong.liu@intel.com>


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

Thanks,
Maxime


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

* Re: [dpdk-dev] [PATCH v2] net/virtio: fix unexpected event after reconnect
  2020-05-15  2:35 ` [dpdk-dev] [PATCH v2] net/virtio: fix unexpected event after reconnect Marvin Liu
  2020-05-15  2:46   ` Wang, Xiao W
  2020-05-15  7:51   ` Maxime Coquelin
@ 2020-05-15  8:37   ` Maxime Coquelin
  2 siblings, 0 replies; 7+ messages in thread
From: Maxime Coquelin @ 2020-05-15  8:37 UTC (permalink / raw)
  To: Marvin Liu, xiaolong.ye, zhihong.wang, xiao.w.wang; +Cc: dev, stable



On 5/15/20 4:35 AM, Marvin Liu wrote:
> Event notification should be disabled after virtqueue initialization and
> enabled by calling rte_eth_dev_rx_intr_enable later. When virtio user
> device reconnecting to vhost, virtqueue_disable_intr should be called to
> disable event notification.
> 
> Fixes: 6ebbf4109f35 ("net/virtio-user: fix packed ring server mode")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Marvin Liu <yong.liu@intel.com>
> ---
> v2: commit log update and cc stable

Applied to dpdk-next-virtio/master.

Thanks,
Maxime


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

end of thread, other threads:[~2020-05-15  8:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-15  1:40 [dpdk-dev] [PATCH] net/virtio: disable event suppression when reconnect Marvin Liu
2020-05-15  1:53 ` Wang, Xiao W
2020-05-15  2:41   ` Liu, Yong
2020-05-15  2:35 ` [dpdk-dev] [PATCH v2] net/virtio: fix unexpected event after reconnect Marvin Liu
2020-05-15  2:46   ` Wang, Xiao W
2020-05-15  7:51   ` Maxime Coquelin
2020-05-15  8:37   ` Maxime Coquelin

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).