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

Yuanhan Liu yuanhan.liu at linux.intel.com
Tue Mar 8 13:27:11 CET 2016


On Mon, Mar 07, 2016 at 03:34:53AM +0000, Xie, Huawei wrote:
> On 2/18/2016 9:48 PM, Yuanhan Liu wrote:
> > +	while (1) {
> > +		/* done with current mbuf, fetch next */
> > +		if (mbuf_avail == 0) {
> > +			m = m->next;
> > +			if (m == NULL)
> > +				break;
> > +
> > +			mbuf_offset = 0;
> > +			mbuf_avail  = rte_pktmbuf_data_len(m);
> > +		}
> > +
> 
> You could use while (mbuf_avail || m->next) to align with the style of
> coyp_desc_to_mbuf?

Good suggestion, will do that.

Thanks.

	--yliu


More information about the dev mailing list