[dpdk-dev] [PATCH 2/5] vhost: refactor virtio_dev_rx

2016-01-27 Thread Yuanhan Liu
On Thu, Jan 21, 2016 at 02:50:01PM +0100, J?r?me Jutteau wrote: > Hi Yuanhan, > > 2015-12-14 2:47 GMT+01:00 Yuanhan Liu : > > Right, I should move it in the beginning of this function. > > Any news about this refactoring ? Hi J?r?me, Thanks for showing interests in this patch set; I was

[dpdk-dev] [PATCH 2/5] vhost: refactor virtio_dev_rx

2016-01-21 Thread Jérôme Jutteau
Hi Yuanhan, 2015-12-14 2:47 GMT+01:00 Yuanhan Liu : > Right, I should move it in the beginning of this function. Any news about this refactoring ? -- J?r?me Jutteau, Tel : 0826.206.307 (poste 304) IMPORTANT: The information contained in this message may be privileged and confidential and

[dpdk-dev] [PATCH 2/5] vhost: refactor virtio_dev_rx

2015-12-14 Thread Yuanhan Liu
On Fri, Dec 11, 2015 at 12:42:33PM -0800, Rich Lane wrote: > On Wed, Dec 2, 2015 at 10:06 PM, Yuanhan Liu > wrote: > > +static inline int __attribute__((always_inline)) > +copy_mbuf_to_desc(struct virtio_net *dev, struct vhost_virtqueue *vq, > +? ? ? ? ? ? ? ? ?struct rte_mbuf *m,

[dpdk-dev] [PATCH 2/5] vhost: refactor virtio_dev_rx

2015-12-11 Thread Rich Lane
On Wed, Dec 2, 2015 at 10:06 PM, Yuanhan Liu wrote: > +static inline int __attribute__((always_inline)) > +copy_mbuf_to_desc(struct virtio_net *dev, struct vhost_virtqueue *vq, > + struct rte_mbuf *m, uint16_t desc_idx, uint32_t *copied) > +{ > ... > + while (1) { > +

[dpdk-dev] [PATCH 2/5] vhost: refactor virtio_dev_rx

2015-12-03 Thread Yuanhan Liu
This is a simple refactor, as there isn't any twisted logic in old code. Here I just broke the code and introduced two helper functions, reserve_avail_buf() and copy_mbuf_to_desc() to make the code more readable. It saves nearly 1K bytes of code size: # without this patch $ size