net/virtio: add Rx descriptor check
authorJianfeng Tan <jianfeng.tan@intel.com>
Tue, 17 Jan 2017 07:10:23 +0000 (07:10 +0000)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Tue, 17 Jan 2017 08:26:47 +0000 (09:26 +0100)
commitb0caba1a1378fe95cf8c221850cc5556539f9d6b
tree5c7f3cacecf75717036324c30d67c912bcac7773
parent981e61f55f4ae70074ec394b6ef60f98d077ede9
net/virtio: add Rx descriptor check

Under interrupt mode, rx_descriptor_done is used as an indicator
for applications to check if some number of packets are ready to
be received.

This patch enables this by checking used ring's local consumed idx
with shared (with backend) idx.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
drivers/net/virtio/virtio_ethdev.c
drivers/net/virtio/virtio_ethdev.h
drivers/net/virtio/virtio_rxtx.c