Re: [PATCH v2] vhost: replace % with & on data path

2015-12-12 Thread Andy Shevchenko
On Fri, Dec 4, 2015 at 10:19 PM, Venkatesh Srinivas wrote: > On Mon, Nov 30, 2015 at 11:15:23AM +0200, Michael S. Tsirkin wrote: >> We know vring num is a power of 2, so use & >> to mask the high bits. >> >> Signed-off-by: Michael S. Tsirkin >> --- > > The

Re: [PATCH v2] vhost: replace % with & on data path

2015-12-04 Thread Venkatesh Srinivas
On Mon, Nov 30, 2015 at 11:15:23AM +0200, Michael S. Tsirkin wrote: > We know vring num is a power of 2, so use & > to mask the high bits. > > Signed-off-by: Michael S. Tsirkin > --- The generated code switches from DIV -> masking, source is clearer as well. Tested-by:

Re: [PATCH v2] vhost: replace % with & on data path

2015-11-30 Thread Christian Borntraeger
On 11/30/2015 10:15 AM, Michael S. Tsirkin wrote: > We know vring num is a power of 2, so use & > to mask the high bits. Makes a lot of sense and virtio_ring.c seems to use the same logic. Acked-by: Christian Borntraeger > > Signed-off-by: Michael S. Tsirkin

Re: [PATCH v2] vhost: replace % with & on data path

2015-11-30 Thread David Miller
From: "Michael S. Tsirkin" Date: Mon, 30 Nov 2015 11:15:23 +0200 > We know vring num is a power of 2, so use & > to mask the high bits. > > Signed-off-by: Michael S. Tsirkin Acked-by: David S. Miller -- To unsubscribe from this list: