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

2015-12-08 Thread Yuanhan Liu
On Sat, Dec 05, 2015 at 11:50:07AM -0800, Stephen Hemminger wrote: > int error; > > > > > > @@ -846,58 +845,49 @@ virtio_xmit_pkts(void *tx_queue, struct rte_mbuf > > > **tx_pkts, uint16_t nb_pkts) > > > if (likely(nb_used > txvq->vq_nentries - txvq->vq_free_thresh)) > > > virt

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

2015-12-05 Thread Stephen Hemminger
int error; > > > > @@ -846,58 +845,49 @@ virtio_xmit_pkts(void *tx_queue, struct rte_mbuf > > **tx_pkts, uint16_t nb_pkts) > > if (likely(nb_used > txvq->vq_nentries - txvq->vq_free_thresh)) > > virtio_xmit_cleanup(txvq, nb_used); > > > > - nb_tx = 0; > > - > > - wh

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

2015-12-04 Thread Yuanhan Liu
On Thu, Dec 03, 2015 at 05:12:54PM -0800, 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. > > This can help performance and simplifies loop. This is a good cleanup. Besides tha

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

2015-12-03 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 | 68 +