net/virtio: disable event suppression when reconnect

Message ID 20200515014056.44949-1-yong.liu@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Maxime Coquelin
Headers
Series net/virtio: disable event suppression when reconnect |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing fail Testing issues

Commit Message

Marvin Liu May 15, 2020, 1:40 a.m. UTC
  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>
  

Comments

Xiao Wang May 15, 2020, 1:53 a.m. UTC | #1
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?
  
Marvin Liu May 15, 2020, 2:41 a.m. UTC | #2
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?
>
  

Patch

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;
 }