From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 0A11D2BE9 for ; Mon, 7 Mar 2016 04:34:57 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP; 06 Mar 2016 19:34:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,549,1449561600"; d="scan'208";a="759288659" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga003.jf.intel.com with ESMTP; 06 Mar 2016 19:34:56 -0800 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 6 Mar 2016 19:34:56 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 6 Mar 2016 19:34:56 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.136]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.42]) with mapi id 14.03.0248.002; Mon, 7 Mar 2016 11:34:54 +0800 From: "Xie, Huawei" To: Yuanhan Liu , "dev@dpdk.org" Thread-Topic: [PATCH v2 2/7] vhost: refactor virtio_dev_rx Thread-Index: AdF4Ik+TpKENSP8YS5aDq5EYPJX8NA== Date: Mon, 7 Mar 2016 03:34:53 +0000 Message-ID: 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> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: Victor Kaplansky , "Michael S. Tsirkin" 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: Mon, 07 Mar 2016 03:34:58 -0000 On 2/18/2016 9:48 PM, Yuanhan Liu wrote:=0A= > + while (1) {=0A= > + /* done with current mbuf, fetch next */=0A= > + if (mbuf_avail =3D=3D 0) {=0A= > + m =3D m->next;=0A= > + if (m =3D=3D NULL)=0A= > + break;=0A= > +=0A= > + mbuf_offset =3D 0;=0A= > + mbuf_avail =3D rte_pktmbuf_data_len(m);=0A= > + }=0A= > +=0A= =0A= You could use while (mbuf_avail || m->next) to align with the style of=0A= coyp_desc_to_mbuf?=0A=