[dpdk-dev] [PATCH 1/5] virtio: clean up space checks on xmit

2015-10-19 Thread Xie, Huawei
On 10/19/2015 11:48 PM, Stephen Hemminger wrote: > On Mon, 19 Oct 2015 08:02:07 + > "Xie, Huawei" wrote: > >> On 10/19/2015 1:16 PM, Stephen Hemminger wrote: >>> The space check for transmit ring only needs a single conditional. >>> I.e only need to recheck for space if there was no space in f

[dpdk-dev] [PATCH 1/5] virtio: clean up space checks on xmit

2015-10-19 Thread Stephen Hemminger
On Mon, 19 Oct 2015 08:02:07 + "Xie, Huawei" wrote: > On 10/19/2015 1:16 PM, Stephen Hemminger wrote: > > The space check for transmit ring only needs a single conditional. > > I.e only need to recheck for space if there was no space in first check. > I see you reorganized the code. It is mor

[dpdk-dev] [PATCH 1/5] virtio: clean up space checks on xmit

2015-10-19 Thread Xie, Huawei
On 10/19/2015 1:16 PM, Stephen Hemminger wrote: > The space check for transmit ring only needs a single conditional. > I.e only need to recheck for space if there was no space in first check. I see you reorganized the code. It is more clear and readable with your change, but no check is removed. We

[dpdk-dev] [PATCH 1/5] virtio: clean up space checks on xmit

2015-10-18 Thread Stephen Hemminger
The space check for transmit ring only needs a single conditional. I.e only need to recheck for space if there was no space in first check. This can help performance and simplifies loop. Signed-off-by: Stephen Hemminger --- drivers/net/virtio/virtio_rxtx.c | 66 -