Re: [dpdk-dev] [PATCH 04/10] net/virtio: optimize flags update for packed ring

2019-03-19 Thread Maxime Coquelin
On 3/19/19 7:43 AM, Tiwei Bie wrote: Cache the AVAIL, USED and WRITE bits to avoid calculating them as much as possible. Note that, the WRITE bit isn't cached for control queue. Signed-off-by: Tiwei Bie --- drivers/net/virtio/virtio_ethdev.c | 35 ++ drivers/ne

Re: [dpdk-dev] [PATCH 04/10] net/virtio: optimize flags update for packed ring

2019-03-19 Thread Maxime Coquelin
On 3/19/19 11:11 AM, Jens Freimann wrote: same here. it's not really cached, it's pre-calculated. And here we could also use a pre-calculated constand/define. For pre-calculated constant/define, do you mean VRING_DESC_F_AVAIL(1) and VRING_DESC_F_USED(1)? There is still little code in virtio

Re: [dpdk-dev] [PATCH 04/10] net/virtio: optimize flags update for packed ring

2019-03-19 Thread Jens Freimann
On Tue, Mar 19, 2019 at 05:37:34PM +0800, Tiwei Bie wrote: On Tue, Mar 19, 2019 at 09:54:03AM +0100, Jens Freimann wrote: On Tue, Mar 19, 2019 at 02:43:06PM +0800, Tiwei Bie wrote: > Cache the AVAIL, USED and WRITE bits to avoid calculating > them as much as possible. Note that, the WRITE bit is

Re: [dpdk-dev] [PATCH 04/10] net/virtio: optimize flags update for packed ring

2019-03-19 Thread Tiwei Bie
On Tue, Mar 19, 2019 at 09:54:03AM +0100, Jens Freimann wrote: > On Tue, Mar 19, 2019 at 02:43:06PM +0800, Tiwei Bie wrote: > > Cache the AVAIL, USED and WRITE bits to avoid calculating > > them as much as possible. Note that, the WRITE bit isn't > > cached for control queue. > > > > Signed-off-by

Re: [dpdk-dev] [PATCH 04/10] net/virtio: optimize flags update for packed ring

2019-03-19 Thread Jens Freimann
On Tue, Mar 19, 2019 at 02:43:06PM +0800, Tiwei Bie wrote: Cache the AVAIL, USED and WRITE bits to avoid calculating them as much as possible. Note that, the WRITE bit isn't cached for control queue. Signed-off-by: Tiwei Bie --- drivers/net/virtio/virtio_ethdev.c | 35 ++

[dpdk-dev] [PATCH 04/10] net/virtio: optimize flags update for packed ring

2019-03-18 Thread Tiwei Bie
Cache the AVAIL, USED and WRITE bits to avoid calculating them as much as possible. Note that, the WRITE bit isn't cached for control queue. Signed-off-by: Tiwei Bie --- drivers/net/virtio/virtio_ethdev.c | 35 ++ drivers/net/virtio/virtio_rxtx.c | 31 ++