Re: [PATCH 2/2] vhost: disentangle vring endianness stuff from the core code

2016-02-10 Thread Greg Kurz
On Wed, 10 Feb 2016 14:23:33 +0100 Cornelia Huck wrote: > On Wed, 10 Feb 2016 14:08:43 +0100 > Greg Kurz wrote: > > > But you are right, there is a bug: we should rollback if vhost_init_used() > > fails. Something like below: > > > > err_used: > > vq->private_data = oldsock; > >

Re: [PATCH 2/2] vhost: disentangle vring endianness stuff from the core code

2016-02-10 Thread Cornelia Huck
On Wed, 10 Feb 2016 14:08:43 +0100 Greg Kurz wrote: > But you are right, there is a bug: we should rollback if vhost_init_used() > fails. Something like below: > > err_used: > vq->private_data = oldsock; > vhost_net_enable_vq(n, vq); > + vhost_adjust_vring_endian(vq); Sho

Re: [PATCH 2/2] vhost: disentangle vring endianness stuff from the core code

2016-02-10 Thread Greg Kurz
On Wed, 10 Feb 2016 13:48:09 +0200 "Michael S. Tsirkin" wrote: > On Wed, Jan 13, 2016 at 06:09:47PM +0100, Greg Kurz wrote: > > The way vring endianness is being handled currently obfuscates > > the code in vhost_init_used(). > > > > This patch tries to fix that by doing the following: > > - mov

Re: [PATCH 2/2] vhost: disentangle vring endianness stuff from the core code

2016-02-10 Thread Michael S. Tsirkin
On Wed, Jan 13, 2016 at 06:09:47PM +0100, Greg Kurz wrote: > The way vring endianness is being handled currently obfuscates > the code in vhost_init_used(). > > This patch tries to fix that by doing the following: > - move the the code that adjusts endianness to a dedicated helper > - export this

Re: [PATCH 2/2] vhost: disentangle vring endianness stuff from the core code

2016-01-21 Thread Cornelia Huck
On Wed, 13 Jan 2016 18:09:47 +0100 Greg Kurz wrote: > The way vring endianness is being handled currently obfuscates > the code in vhost_init_used(). > > This patch tries to fix that by doing the following: > - move the the code that adjusts endianness to a dedicated helper > - export this helpe