net/virtio: optimize flags update for packed ring
authorTiwei Bie <tiwei.bie@intel.com>
Tue, 19 Mar 2019 06:43:06 +0000 (14:43 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 20 Mar 2019 17:15:42 +0000 (18:15 +0100)
commit8e148e492022f9e0a8bf1c48e59a199c86ccc65b
treec3c5612556ab8aff0a1bb1406172cc2ca94df69f
parent8f66bc4ac3c0d4a11252d860f495abd806aa871f
net/virtio: optimize flags update for packed ring

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 <tiwei.bie@intel.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
drivers/net/virtio/virtio_ethdev.c
drivers/net/virtio/virtio_rxtx.c
drivers/net/virtio/virtqueue.h