On 10/19/2015 12:19 PM, Stephen Hemminger wrote: > +static inline void __attribute__((always_inline)) > +virtio_xmit_cleanup(struct virtqueue *vq) > +{ > > Please don't use always inline, frustrating the compiler isn't going > to help. always inline is scattered elsewhere in the dpdk code. What is the negative effect? Should we remove all of them? > + uint16_t i, desc_idx; > + int nb_free = 0; > + struct rte_mbuf *m, *free[VIRTIO_TX_MAX_FREE_BUF_SZ]; > + > + desc_idx = (uint16_t)(vq->vq_used_cons_idx & > + ((vq->vq_nentries >> 1) - 1)); > + free[0] = (struct rte_mbuf *)vq->vq_descx[desc_idx++].cookie; > + nb_free = 1; > + > + for (i = 1; i < VIRTIO_TX_FREE_NR; i++) { > + m = (struct rte_mbuf *)vq->vq_descx[desc_idx++].cookie; > + if (likely(m->pool == free[0]->pool)) > + free[nb_free++] = m; > + else { > + rte_mempool_put_bulk(free[0]->pool, (void **)free, > + nb_free); > + free[0] = m; > + nb_free = 1; > + } > + } > + > + rte_mempool_put_bulk(free[0]->pool, (void **)free, nb_free); > + vq->vq_used_cons_idx += VIRTIO_TX_FREE_NR; > + vq->vq_free_cnt += (VIRTIO_TX_FREE_NR << 1); > + > + return; > +} > > Don't add return; at end of void functions. It only clutters > things for no reason. Agree. >
- [dpdk-dev] [PATCH v2 2/7] virtio: add s... Xie, Huawei
- [dpdk-dev] [PATCH v2 3/7] virtio: rx/tx ring layout... Huawei Xie
- [dpdk-dev] [PATCH v2 4/7] virtio: fill RX avail rin... Huawei Xie
- [dpdk-dev] [PATCH v2 5/7] virtio: virtio vec rx Huawei Xie
- [dpdk-dev] [PATCH v2 6/7] virtio: simple tx routine Huawei Xie
- [dpdk-dev] [PATCH v2 6/7] virtio: simple tx rou... Stephen Hemminger
- [dpdk-dev] [PATCH v2 6/7] virtio: simple tx... Xie, Huawei
- [dpdk-dev] [PATCH v2 6/7] virtio: simple tx rou... Stephen Hemminger
- [dpdk-dev] [PATCH v2 6/7] virtio: simple tx... Xie, Huawei
- [dpdk-dev] [PATCH v2 6/7] virtio: simple tx rou... Stephen Hemminger
- [dpdk-dev] [PATCH v2 6/7] virtio: simple tx... Xie, Huawei
- [dpdk-dev] [PATCH v2 7/7] virtio: pick simple rx/tx... Huawei Xie
- [dpdk-dev] [PATCH v3 0/7] virtio ring layout optimizatio... Huawei Xie
- [dpdk-dev] [PATCH v3 1/7] virtio: add virtio_rxtx.h... Huawei Xie
- [dpdk-dev] [PATCH v3 2/7] virtio: add software rx r... Huawei Xie
- [dpdk-dev] [PATCH v3 3/7] virtio: rx/tx ring layout... Huawei Xie
- [dpdk-dev] [PATCH v3 4/7] virtio: fill RX avail rin... Huawei Xie
- [dpdk-dev] [PATCH v3 5/7] virtio: virtio vec rx Huawei Xie
- [dpdk-dev] [PATCH v3 5/7] virtio: virtio vec rx Wang, Zhihong
- [dpdk-dev] [PATCH v3 5/7] virtio: virtio ve... Xie, Huawei
- [dpdk-dev] [PATCH v3 6/7] virtio: simple tx routine Huawei Xie