From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v2 0/5] virtio: Tx performance improvements Date: Thu, 22 Oct 2015 09:04:59 -0700 Message-ID: <20151022090459.68015713@xeon-e3> References: <1445231772-17467-1-git-send-email-stephen@networkplumber.org> <1536056.KWEakoJpBK@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" To: "Xie, Huawei" Return-path: Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by dpdk.org (Postfix) with ESMTP id 8A139C374 for ; Thu, 22 Oct 2015 18:04:53 +0200 (CEST) Received: by padhk11 with SMTP id hk11so90392963pad.1 for ; Thu, 22 Oct 2015 09:04:53 -0700 (PDT) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, 22 Oct 2015 10:38:33 +0000 "Xie, Huawei" wrote: > On 10/21/2015 9:20 PM, Thomas Monjalon wrote: > > 2015-10-18 22:16, Stephen Hemminger: > >> This is a tested version of the virtio Tx performance improvements > >> that I posted earlier on the list, and described at the DPDK Userspace > >> meeting in Dublin. Together they get a 25% performance improvement for > >> both small packet and large multi-segment packet case when testing > >> from DPDK guest application to Linux KVM host. > >> > >> Stephen Hemminger (5): > >> virtio: clean up space checks on xmit > >> virtio: don't use unlikely for normal tx stuff > >> virtio: use indirect ring elements > >> virtio: use any layout on transmit > >> virtio: optimize transmit enqueue > > Huawei, do you ack this series? > > > Okay with this patchset with two remained questions, > > +/* Region reserved to allow for transmit header and indirect ring */ > +#define VIRTIO_MAX_TX_INDIRECT 8 > +struct virtio_tx_region { > + struct virtio_net_hdr_mrg_rxbuf tx_hdr; > > Why use merge-able rx header here in the tx region? If mergeable rx is negotiated then the header must be used for both Tx and Rx. I chose to allocate the largest possible header needed, rather than having to deal with variable size data structure. > > > + struct vring_desc tx_indir[VIRTIO_MAX_TX_INDIRECT] > > + __attribute__((__aligned__(16))); > > WARNING: __aligned(size) is preferred over __attribute__((aligned(size))) That is true in kernel, but there is no __aligned macro in DPDK code. It could be changed to __rte_aligned_16?