From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 8F3752C50 for ; Tue, 8 Mar 2016 13:24:53 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP; 08 Mar 2016 04:24:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,556,1449561600"; d="scan'208";a="932124462" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.66.49]) by fmsmga002.fm.intel.com with ESMTP; 08 Mar 2016 04:24:48 -0800 Date: Tue, 8 Mar 2016 20:27:11 +0800 From: Yuanhan Liu To: "Xie, Huawei" Message-ID: <20160308122711.GR14300@yliu-dev.sh.intel.com> References: <1449122773-25510-1-git-send-email-yuanhan.liu@linux.intel.com> <1455803352-5518-1-git-send-email-yuanhan.liu@linux.intel.com> <1455803352-5518-3-git-send-email-yuanhan.liu@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "Michael S. Tsirkin" , "dev@dpdk.org" , Victor Kaplansky Subject: Re: [dpdk-dev] [PATCH v2 2/7] vhost: refactor virtio_dev_rx X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2016 12:24:54 -0000 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