From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 9020C275D for ; Thu, 3 Mar 2016 18:19:46 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP; 03 Mar 2016 09:19:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,532,1449561600"; d="scan'208";a="59261581" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 03 Mar 2016 09:19:45 -0800 Received: from fmsmsx119.amr.corp.intel.com (10.18.124.207) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 3 Mar 2016 09:19:45 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX119.amr.corp.intel.com (10.18.124.207) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 3 Mar 2016 09:19:44 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.136]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.18]) with mapi id 14.03.0248.002; Fri, 4 Mar 2016 01:19:43 +0800 From: "Xie, Huawei" To: Yuanhan Liu , "dev@dpdk.org" Thread-Topic: [PATCH v2 1/7] vhost: refactor rte_vhost_dequeue_burst Thread-Index: AdF1cN/OclXhimYJTx2/yKoyh8rOiw== Date: Thu, 3 Mar 2016 17:19:42 +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-2-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: "Michael S. Tsirkin" , Victor Kaplansky Subject: Re: [dpdk-dev] [PATCH v2 1/7] vhost: refactor rte_vhost_dequeue_burst 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: Thu, 03 Mar 2016 17:19:47 -0000 On 2/18/2016 9:48 PM, Yuanhan Liu wrote:=0A= > [...]=0A= CCed changchun, the author for the chained handling of desc and mbuf.=0A= The change makes the code more readable, but i think the following=0A= commit message is simple and enough.=0A= >=0A= > while (this_desc_is_not_drained_totally || has_next_desc) {=0A= > if (this_desc_has_drained_totally) {=0A= > this_desc =3D next_desc();=0A= > }=0A= >=0A= > if (mbuf_has_no_room) {=0A= > mbuf =3D allocate_a_new_mbuf();=0A= > }=0A= >=0A= > COPY(mbuf, desc);=0A= > }=0A= >=0A= > [...]=0A= >=0A= > This refactor makes the code much more readable (IMO), yet it reduces=0A= > binary code size (nearly 2K).=0A= I guess the reduced binary code size comes from reduced inline calls to=0A= mbuf allocation.=0A= =0A=