Re: [dpdk-dev] A question about the function fill_vec_buf

2017-01-15 Thread Yuanhan Liu
On Fri, Jan 13, 2017 at 10:20:55AM +, wangyunjian wrote: > In function fill_vec_buf, it will happen uint32_t cast to uint16_t, when the > *desc_chain_len is assigned by the len. > > This maybe result in data truncation. Do you have a real example? I don't think data truncation could happen h

[dpdk-dev] A question about the function fill_vec_buf

2017-01-13 Thread wangyunjian
In function fill_vec_buf, it will happen uint32_t cast to uint16_t, when the *desc_chain_len is assigned by the len. This maybe result in data truncation. static inline int __attribute__((always_inline)) fill_vec_buf(struct virtio_net *dev, struct vhost_virtqueue *vq,