[dpdk-dev] [PATCH v7 3/7] vhost: simplify mergeable Rx vring reservation

2016-10-26 Thread Yuanhan Liu
On Wed, Oct 26, 2016 at 12:08:49AM +0200, Thomas Monjalon wrote: > 2016-10-14 17:34, Yuanhan Liu: > > -static inline uint32_t __attribute__((always_inline)) > > +static inline int __attribute__((always_inline)) > > copy_mbuf_to_desc_mergeable(struct virtio_net *dev, struct vhost_virtqueue > >

[dpdk-dev] [PATCH v7 3/7] vhost: simplify mergeable Rx vring reservation

2016-10-26 Thread Thomas Monjalon
2016-10-14 17:34, Yuanhan Liu: > -static inline uint32_t __attribute__((always_inline)) > +static inline int __attribute__((always_inline)) > copy_mbuf_to_desc_mergeable(struct virtio_net *dev, struct vhost_virtqueue > *vq, > - uint16_t end_idx, struct rte_mbuf *m, > -

[dpdk-dev] [PATCH v7 3/7] vhost: simplify mergeable Rx vring reservation

2016-10-14 Thread Yuanhan Liu
Let it return "num_buffers" we reserved, so that we could re-use it with copy_mbuf_to_desc_mergeable() directly, instead of calculating it again there. Meanwhile, the return type of copy_mbuf_to_desc_mergeable is changed to "int". -1 will be return on error. Signed-off-by: Yuanhan Liu