[dpdk-dev,2/2] net/virtio: enable any layout feature

Message ID 1474872056-24665-3-git-send-email-yuanhan.liu@linux.intel.com (mailing list archive)
State Superseded, archived
Delegated to: Yuanhan Liu
Headers

Commit Message

Yuanhan Liu Sept. 26, 2016, 6:40 a.m. UTC
  The feature VIRTIO_F_ANY_LAYOUT was actually supported by commit
dd856dfcb9e7 ("virtio: use any layout on Tx"). But it's not enabled.
Here this patch enables it.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
 drivers/net/virtio/virtio_ethdev.h | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Stephen Hemminger Sept. 26, 2016, 6:04 p.m. UTC | #1
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
  
Michael S. Tsirkin Sept. 29, 2016, 6 p.m. UTC | #2
On Mon, Sep 26, 2016 at 02:40:56PM +0800, Yuanhan Liu wrote:
> The feature VIRTIO_F_ANY_LAYOUT was actually supported by commit
> dd856dfcb9e7 ("virtio: use any layout on Tx"). But it's not enabled.
> Here this patch enables it.
> 
> Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>

Well this will break cross-version migration if just done
unconditionally.
Let's add a protocol feature for this bugfix?

> ---
>  drivers/net/virtio/virtio_ethdev.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h
> index 04d626b..3e31e6a 100644
> --- a/drivers/net/virtio/virtio_ethdev.h
> +++ b/drivers/net/virtio/virtio_ethdev.h
> @@ -64,6 +64,7 @@
>  	 1u << VIRTIO_NET_F_CTRL_VLAN	  |	\
>  	 1u << VIRTIO_NET_F_MRG_RXBUF	  |	\
>  	 1u << VIRTIO_RING_F_INDIRECT_DESC |    \
> +	 1u << VIRTIO_F_ANY_LAYOUT |    \
>  	 1ULL << VIRTIO_F_VERSION_1)
>  
>  /*
> -- 
> 1.9.0
  
Michael S. Tsirkin Sept. 29, 2016, 6:01 p.m. UTC | #3
On Thu, Sep 29, 2016 at 09:00:47PM +0300, Michael S. Tsirkin wrote:
> On Mon, Sep 26, 2016 at 02:40:56PM +0800, Yuanhan Liu wrote:
> > The feature VIRTIO_F_ANY_LAYOUT was actually supported by commit
> > dd856dfcb9e7 ("virtio: use any layout on Tx"). But it's not enabled.
> > Here this patch enables it.
> > 
> > Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
> 
> Well this will break cross-version migration if just done
> unconditionally.
> Let's add a protocol feature for this bugfix?

Hmm OTOH the bug is in dpdk not qemu ... this needs some thought.

> > ---
> >  drivers/net/virtio/virtio_ethdev.h | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h
> > index 04d626b..3e31e6a 100644
> > --- a/drivers/net/virtio/virtio_ethdev.h
> > +++ b/drivers/net/virtio/virtio_ethdev.h
> > @@ -64,6 +64,7 @@
> >  	 1u << VIRTIO_NET_F_CTRL_VLAN	  |	\
> >  	 1u << VIRTIO_NET_F_MRG_RXBUF	  |	\
> >  	 1u << VIRTIO_RING_F_INDIRECT_DESC |    \
> > +	 1u << VIRTIO_F_ANY_LAYOUT |    \
> >  	 1ULL << VIRTIO_F_VERSION_1)
> >  
> >  /*
> > -- 
> > 1.9.0
  

Patch

diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h
index 04d626b..3e31e6a 100644
--- a/drivers/net/virtio/virtio_ethdev.h
+++ b/drivers/net/virtio/virtio_ethdev.h
@@ -64,6 +64,7 @@ 
 	 1u << VIRTIO_NET_F_CTRL_VLAN	  |	\
 	 1u << VIRTIO_NET_F_MRG_RXBUF	  |	\
 	 1u << VIRTIO_RING_F_INDIRECT_DESC |    \
+	 1u << VIRTIO_F_ANY_LAYOUT |    \
 	 1ULL << VIRTIO_F_VERSION_1)
 
 /*