On 2/18/2016 9:48 PM, Yuanhan Liu wrote: > [...] CCed changchun, the author for the chained handling of desc and mbuf. The change makes the code more readable, but i think the following commit message is simple and enough. > > while (this_desc_is_not_drained_totally || has_next_desc) { > if (this_desc_has_drained_totally) { > this_desc = next_desc(); > } > > if (mbuf_has_no_room) { > mbuf = allocate_a_new_mbuf(); > } > > COPY(mbuf, desc); > } > > [...] > > This refactor makes the code much more readable (IMO), yet it reduces > binary code size (nearly 2K). I guess the reduced binary code size comes from reduced inline calls to mbuf allocation.
- [dpdk-dev] [PATCH v2 1/7] vhost: refactor rte_vhost_deque... Xie, Huawei
- [dpdk-dev] [PATCH v2 1/7] vhost: refactor rte_vhost_deque... Xie, Huawei
- [dpdk-dev] [PATCH v2 1/7] vhost: refactor rte_vhost_d... Yuanhan Liu
- [dpdk-dev] [PATCH v2 1/7] vhost: refactor rte_vho... Xie, Huawei
- [dpdk-dev] [PATCH v2 1/7] vhost: refactor rte... Yuanhan Liu
- [dpdk-dev] [PATCH v2 1/7] vhost: refacto... Xie, Huawei
- [dpdk-dev] [PATCH v2 1/7] vhost: refacto... Yuanhan Liu
- [dpdk-dev] [PATCH v2 1/7] vhost: refactor rte_vhost_deque... Xie, Huawei
- [dpdk-dev] [PATCH v2 1/7] vhost: refactor rte_vhost_deque... Xie, Huawei
- [dpdk-dev] [PATCH v2 1/7] vhost: refactor rte_vhost_deque... Xie, Huawei
- [dpdk-dev] [PATCH v2 2/7] vhost: refactor virtio_dev_rx Yuanhan Liu
- [dpdk-dev] [PATCH v2 3/7] vhost: refactor virtio_dev_merge_rx Yuanhan Liu