Re: [dpdk-dev] [PATCH v3 03/10] net/virtio: add Rx descriptor check

2017-01-16 Thread Yuanhan Liu
On Mon, Jan 16, 2017 at 11:16:03AM -0800, Stephen Hemminger wrote: > On Mon, 16 Jan 2017 14:46:55 + > Jianfeng Tan wrote: > > > + return (VIRTQUEUE_NUSED(vq) >= offset); > > Unneeded parenthesis in return statement. > This is a style thing, Linux folks see it as unnecessary. BSD folks like

Re: [dpdk-dev] [PATCH v3 03/10] net/virtio: add Rx descriptor check

2017-01-16 Thread Stephen Hemminger
On Mon, 16 Jan 2017 14:46:55 + Jianfeng Tan wrote: > + return (VIRTQUEUE_NUSED(vq) >= offset); Unneeded parenthesis in return statement. This is a style thing, Linux folks see it as unnecessary. BSD folks like it

[dpdk-dev] [PATCH v3 03/10] net/virtio: add Rx descriptor check

2017-01-16 Thread Jianfeng Tan
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 --- drivers/net/virtio/vi