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 DD8FCC46A for ; Fri, 23 Oct 2015 11:00:41 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 23 Oct 2015 02:00:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,186,1444719600"; d="scan'208";a="833714557" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga002.fm.intel.com with ESMTP; 23 Oct 2015 02:00:41 -0700 Received: from fmsmsx151.amr.corp.intel.com (10.18.125.4) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 23 Oct 2015 02:00:40 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX151.amr.corp.intel.com (10.18.125.4) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 23 Oct 2015 02:00:40 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.96]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.194]) with mapi id 14.03.0248.002; Fri, 23 Oct 2015 17:00:38 +0800 From: "Xie, Huawei" To: Stephen Hemminger Thread-Topic: [dpdk-dev] [PATCH v2 0/5] virtio: Tx performance improvements Thread-Index: AdEMtczKGoGnSN25SBqgZMNDMzsH2Q== Date: Fri, 23 Oct 2015 09:00:38 +0000 Message-ID: References: <1445231772-17467-1-git-send-email-stephen@networkplumber.org> <1536056.KWEakoJpBK@xps13> <20151022090459.68015713@xeon-e3> 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: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v2 0/5] virtio: Tx performance improvements 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: Fri, 23 Oct 2015 09:00:42 -0000 On 10/23/2015 12:05 AM, Stephen Hemminger wrote:=0A= > On Thu, 22 Oct 2015 10:38:33 +0000=0A= > "Xie, Huawei" wrote:=0A= >=0A= >> On 10/21/2015 9:20 PM, Thomas Monjalon wrote:=0A= >>> 2015-10-18 22:16, Stephen Hemminger:=0A= >>>> This is a tested version of the virtio Tx performance improvements=0A= >>>> that I posted earlier on the list, and described at the DPDK Userspace= =0A= >>>> meeting in Dublin. Together they get a 25% performance improvement for= =0A= >>>> both small packet and large multi-segment packet case when testing=0A= >>>> from DPDK guest application to Linux KVM host.=0A= >>>>=0A= >>>> Stephen Hemminger (5):=0A= >>>> virtio: clean up space checks on xmit=0A= >>>> virtio: don't use unlikely for normal tx stuff=0A= >>>> virtio: use indirect ring elements=0A= >>>> virtio: use any layout on transmit=0A= >>>> virtio: optimize transmit enqueue=0A= >>> Huawei, do you ack this series?=0A= >>>=0A= >> Okay with this patchset with two remained questions,=0A= >>=0A= >> +/* Region reserved to allow for transmit header and indirect ring */=0A= >> +#define VIRTIO_MAX_TX_INDIRECT 8=0A= >> +struct virtio_tx_region {=0A= >> + struct virtio_net_hdr_mrg_rxbuf tx_hdr;=0A= >>=0A= >> Why use merge-able rx header here in the tx region?=0A= > If mergeable rx is negotiated then the header must be used for=0A= > both Tx and Rx. I chose to allocate the largest possible header=0A= > needed, rather than having to deal with variable size data structure.=0A= Our original code is also using merge-able header for TX descriptor if=0A= this negotiated.=0A= I checked the virtio spec, all of the merge-able header is about=0A= receiving buffers, which is expected. That is why i feel weird here.=0A= Maybe not a big deal?=0A= >>> + struct vring_desc tx_indir[VIRTIO_MAX_TX_INDIRECT]=0A= >>> + __attribute__((__aligned__(16)));=0A= >> WARNING: __aligned(size) is preferred over __attribute__((aligned(size))= )=0A= > That is true in kernel, but there is no __aligned macro in DPDK code.=0A= ok, then we ignore this warning as __rte_cache_aligned is also using=0A= this style.=0A= > It could be changed to __rte_aligned_16?=0A= >=0A= >=0A= =0A=