From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f178.google.com (mail-wr0-f178.google.com [209.85.128.178]) by dpdk.org (Postfix) with ESMTP id 89C35108D for ; Fri, 31 Mar 2017 13:19:00 +0200 (CEST) Received: by mail-wr0-f178.google.com with SMTP id w11so100183993wrc.3 for ; Fri, 31 Mar 2017 04:19:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=WkuUrrvC6XcqtZrpnlDgXcZIT5KfHaoaxiVqL/aifkU=; b=k4xRpUutxWjI+XfyS7711Pw9P9VX8itN7YTZ/AlN877+g9Jv1hEniOlkMGxI6cSxeN Zc7JSTXX5GfDR7jtRBwebq5EnYvJYJVKCTNF1kOyb3T4cqDEssEZiYm/DircAQ+wNlia vJT7usPCrKykM3PnAJ2h/ZiCjL8ABV3R+XHdA6IQ/xK0LKDzUGTcUItvgQKn5kTmfWYR dOt5/iIk3GJfURqrOuFVSjSZucvwvpnvr/Ge9URXcIBjQI/cE3SPybRShdljKM48YxNL JSI8QXdSnETgaZZLDTs78JehN7mb+UIdSk8mXDmiWd2ykBWZWsdM17Jxo+94asU9GiL7 Rsqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=WkuUrrvC6XcqtZrpnlDgXcZIT5KfHaoaxiVqL/aifkU=; b=MW1Sa3CgNUvGU0cCI4Ua8bGnBHrCf6MAHxRhDi7aLyE851xgLUiVmpt78LhCldTH5W ZvOLL7d7pe1f/HmUvI6Y6bA0+NfT9Yg/keuF3u6cJ0TqTcJf6aP68erJZSMvltEn9Jz5 2izkrWLnLqVRj/+z2UbFnKNRhOXY3uEGcbW5l/eubB3BH31RN5nhjTZH8qOBK80Y4xlG o+jehsRnUohxtZDVFdu3f6PK8TM1NYrr4T3H+yIaWxdp0kI/MXABvwEgc/7ct5fenF4S LBDvxfATpvs3C5K3avAzuVL99u1HCn+FcYAgbdBXPw7meg9PESv4CjraAODrjMv8KxOi pA2A== X-Gm-Message-State: AFeK/H0ZteJJCazRoGUOcBNYJAn1mMGtZSGYN0Pw+geibJz7lyldqMah1zs4ZytL+2Hi255F X-Received: by 10.223.131.99 with SMTP id 90mr2412017wrd.147.1490959140102; Fri, 31 Mar 2017 04:19:00 -0700 (PDT) Received: from autoinstall.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id g141sm2525288wmd.10.2017.03.31.04.18.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Mar 2017 04:18:59 -0700 (PDT) Date: Fri, 31 Mar 2017 13:18:51 +0200 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: Olivier Matz Cc: dev@dpdk.org, bruce.richardson@intel.com, konstantin.ananyev@intel.com, mb@smartsharesystems.com, andrey.chilikin@intel.com, jblunck@infradead.org, arybchenko@solarflare.com Message-ID: <20170331111851.GY16796@autoinstall.dev.6wind.com> References: <1485271173-13408-1-git-send-email-olivier.matz@6wind.com> <1488966121-22853-1-git-send-email-olivier.matz@6wind.com> <20170329175629.68810924@platinum> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170329175629.68810924@platinum> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH 0/9] mbuf: structure reorganization X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Mar 2017 11:19:00 -0000 On Wed, Mar 29, 2017 at 05:56:29PM +0200, Olivier Matz wrote: > Hi, > > Does anyone have any other comment on this series? > Can it be applied? > > > Thanks, > Olivier > > > > On Wed, 8 Mar 2017 10:41:52 +0100, Olivier Matz wrote: > > Based on discussions done in [1] and in this thread, this patchset reorganizes > > the mbuf. > > > > The main changes are: > > - reorder structure to increase vector performance on some non-ia > > platforms. > > - add a 64bits timestamp field in the 1st cache line. This timestamp > > is not normalized, i.e. no unit or time reference is enforced. A > > library may be added to do this job in the future. > > - m->next, m->nb_segs, and m->refcnt are always initialized for mbufs > > in the pool, avoiding the need of setting m->next (located in the > > 2nd cache line) in the Rx path for mono-segment packets. > > - change port and nb_segs to 16 bits > > - move seqn in the 2nd cache line > > > > Things discussed but not done in the patchset: > > - move refcnt and nb_segs to the 2nd cache line: many drivers sets > > them in the Rx path, so it could introduce a performance regression, or > > it would require to change all the drivers, which is not an easy task. > > - remove the m->port field: too much impact on many examples and libraries, > > and some people highlighted they are using it. > > - moving m->next in the 1st cache line: there is not enough room, and having > > it set to NULL for unused mbuf should remove the need for it. > > - merge seqn and timestamp together in a union: we could imagine use cases > > were both are activated. There is no flag indicating the presence of seqn, > > so it looks preferable to keep them separated for now. > > > > I made some basic performance tests (ixgbe) and see no regression. > > Other tests from NIC vendors are welcome. > > > > Once this patchset is pushed, the Rx path of drivers could be optimized a bit, > > by removing writes to m->next, m->nb_segs and m->refcnt. The patch 4/8 gives an > > idea of what could be done. > > > > [1] http://dpdk.org/ml/archives/dev/2016-October/049338.html > > > > rfc->v1: > > - fix reset of mbuf fields in case of indirect mbuf in rte_pktmbuf_prefree_seg() > > - do not enforce a unit or time reference for m->timestamp > > - reorganize fields to make vlan and outer vlan consecutive > > - enhance documentation of m->refcnt and m->port to explain why they are 16bits > > > > Jerin Jacob (1): > > mbuf: make rearm data address naturally aligned > > > > Olivier Matz (8): > > mbuf: make segment prefree function public > > mbuf: make raw free function public > > mbuf: set mbuf fields while in pool > > drivers/net: don't touch mbuf next or nb segs on Rx > > mbuf: use 2 bytes for port and nb segments > > mbuf: move sequence number in second cache line > > mbuf: add a timestamp field > > mbuf: reorder VLAN tci and buffer len fields > > > > app/test-pmd/csumonly.c | 4 +- > > drivers/net/ena/ena_ethdev.c | 2 +- > > drivers/net/enic/enic_rxtx.c | 2 +- > > drivers/net/fm10k/fm10k_rxtx.c | 6 +- > > drivers/net/fm10k/fm10k_rxtx_vec.c | 9 +- > > drivers/net/i40e/i40e_rxtx_vec_common.h | 6 +- > > drivers/net/i40e/i40e_rxtx_vec_sse.c | 11 +- > > drivers/net/ixgbe/ixgbe_rxtx.c | 10 +- > > drivers/net/ixgbe/ixgbe_rxtx_vec_common.h | 6 +- > > drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c | 9 -- > > drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 9 -- > > drivers/net/mlx5/mlx5_rxtx.c | 11 +- > > drivers/net/mpipe/mpipe_tilegx.c | 3 +- > > drivers/net/null/rte_eth_null.c | 2 - > > drivers/net/virtio/virtio_rxtx.c | 4 - > > drivers/net/virtio/virtio_rxtx_simple.h | 6 +- > > .../linuxapp/eal/include/exec-env/rte_kni_common.h | 5 +- > > lib/librte_mbuf/rte_mbuf.c | 4 + > > lib/librte_mbuf/rte_mbuf.h | 123 ++++++++++++++++----- > > 19 files changed, 130 insertions(+), 102 deletions(-) > > Tested-by: Nelio Laranjeiro with mlx5 ConnectX-4 two ports with a single thread IO forwarding. Olivier patches: increase performance by +0.4Mpps. Olivier + Konstantin patches: increase performance by +0.8Mpps. Regards, -- Nélio Laranjeiro 6WIND