From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=hNK/MAZTwJvx+4RtW+tPN5f+P+dZtenI2MRHb+ungcY=; b=LGvd9klTltWzBeMFD8hhgIjiXybR6BqNBfv3AE0QuNHLGrAD7kngZXpkV8JB7HAJCq SiSaQ71XpVaRzyh8kzEkF2MOX8QoA2USSna3nOl45OhJoEPKzz9QMRTSs4Elas3PxjQe OE4TliTDYuStyfBLAaoOx2mRcMKQ5zxqpbbeKosxb7L70QXARioIDrY4I+CZ3j3K3oRX 9Xkt51u/7OvcajyYrH9+fgOdGstV3xWuLGNpL6MApXPAemkEEKFz2sT2tdfSnejKspaz ffb7q/2sKx4pgz5Mz90vf1tiPP3CNeuH81mI9xDmN1OmH2R3fFeq7Tohhq0GW71zu8gS n39g== X-Gm-Message-State: ALoCoQnr6kt+Tse4uvr84dtSN4DtBpjd0IPDyMyvf77BicnkuXD+/kLOqlBzNff6osGCV1e27yJ4 X-Received: by 10.66.152.44 with SMTP id uv12mr4972656pab.110.1445529890983; Thu, 22 Oct 2015 09:04:50 -0700 (PDT) Received: from xeon-e3 (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by smtp.gmail.com with ESMTPSA id db8sm14611386pad.43.2015.10.22.09.04.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Oct 2015 09:04:50 -0700 (PDT) Date: Thu, 22 Oct 2015 09:04:59 -0700 From: Stephen Hemminger To: "Xie, Huawei" Message-ID: <20151022090459.68015713@xeon-e3> In-Reply-To: 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" 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: Thu, 22 Oct 2015 16:04:54 -0000 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?