From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E739DA04DD; Tue, 10 Nov 2020 17:25:15 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 01DA32B9D; Tue, 10 Nov 2020 17:25:13 +0100 (CET) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id 68B33F64 for ; Tue, 10 Nov 2020 17:25:12 +0100 (CET) Received: by mail-wr1-f68.google.com with SMTP id b6so1984008wrt.4 for ; Tue, 10 Nov 2020 08:25:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=T5z/mK25Omi8yGhOvuVhxzcmohy9H3j6fjO8PDKLmOs=; b=Y6wOtg1UeW1O6n9QTJrF6tgsj3IomFd78I+bCaYuM1JBSWNqUDEfJ4ReSaCX7t+tPq uE6g0aOvI32noEhe0VKf1VNfVi9YL+Rqxl2fY3caZDyqlSkS5IXMpR0/OpjQ7/YBE73l pOX7fl3DPDWcOt9rS2APUagGY4E7NQW+mFG/LjOuPAICdO/OVingoWGZC4N0GxCzAmDd N6Au7DQ8p52TYNex92oD+6nNceSeYPbYgVrdfroBLz+EPYNIzSLVrQ3HEyuqeSR5Cve0 xdpVOPmuPNV7+Jz3xap0ct5Skm4oMtSrtvyVqFvecs63vUIIDbJvcoJO9PC7h+vrg1lI zfEg== 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:in-reply-to:user-agent; bh=T5z/mK25Omi8yGhOvuVhxzcmohy9H3j6fjO8PDKLmOs=; b=p43RdET874evg4YlZMo0aKGz05nk/94oX+yCZBiifqXEuIFF9ii46TGjoIm4eRoG0s HD15jJ8yHJtGQILYq3A33eRSNFCli7k5KH45ZEmbLeTRvpw5dBI//xSoNdbMxfrD4j0T Kjh7BhVKrI8q7xdrOnFMviK0dsngFcif1TQkAP0B1l7oKCsYZphWzufeQkipA+PF+mCO K8m9b5SqQY3hbc3bPOVJA08EeX4HKEBX4KuVvuMnrU/bipzABWc3amrnFaCDmpQd7nNp Ou6nLKaXSOfESO2d68EsZteXiX2alu0u+e5dRnOtqK48VztjIsCdViIv8pE7PgNw+jIW q7HA== X-Gm-Message-State: AOAM532Zz53JdfFC0KTcqC3/WDGe3yaXm12lXY84SvwCB5kKuoqpXBpP ksa7O9XkPCaeq8sqBBEEWZJieA== X-Google-Smtp-Source: ABdhPJz9ckqKYLl3gbYKkCqZCAQp8wQIbsHyAwHFmNJZQQAlwQz+bkJhyEReZPHckqeSPWmkVr+THw== X-Received: by 2002:adf:ee51:: with SMTP id w17mr24157870wro.373.1605025511119; Tue, 10 Nov 2020 08:25:11 -0800 (PST) Received: from 6wind.com (2a01cb0c0005a600345636f7e65ed1a0.ipv6.abo.wanadoo.fr. [2a01:cb0c:5:a600:3456:36f7:e65e:d1a0]) by smtp.gmail.com with ESMTPSA id j13sm17183122wrt.80.2020.11.10.08.25.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 08:25:10 -0800 (PST) Date: Tue, 10 Nov 2020 17:25:09 +0100 From: Olivier Matz To: Thomas Monjalon Cc: dev@dpdk.org, david.marchand@redhat.com, ferruh.yigit@intel.com, mb@smartsharesystems.com, konstantin.ananyev@intel.com, andrew.rybchenko@oktetlabs.ru, viacheslavo@nvidia.com, ajit.khaparde@broadcom.com, jerinj@marvell.com, hemant.agrawal@nxp.com, Ray Kinsella , Neil Horman Message-ID: <20201110162509.GN1898@platinum> References: <20201107155306.463148-1-thomas@monjalon.net> <20201109212937.989954-1-thomas@monjalon.net> <20201109212937.989954-3-thomas@monjalon.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201109212937.989954-3-thomas@monjalon.net> User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [dpdk-dev] [PATCH v2 2/2] mbuf: move pool pointer in first half 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, Nov 09, 2020 at 10:29:37PM +0100, Thomas Monjalon wrote: > According to the Technical Board decision > (http://mails.dpdk.org/archives/dev/2020-November/191859.html), > the mempool pointer in the mbuf struct is moved > from the second to the first half. > It may increase performance in some cases > on systems having 64-byte cache line, i.e. mbuf split in two cache lines. > > Due to this change, tx_offload is moved. > Hopefully no vector data path is impacted. > > Moving this field gives more space to dynfield1 > while dropping the temporary dynfield0. > > This is how the mbuf layout looks like (pahole-style): > > word type name byte size > 0 void * buf_addr; /* 0 + 8 */ > 1 rte_iova_t buf_iova /* 8 + 8 */ > /* --- RTE_MARKER64 rearm_data; */ > 2 uint16_t data_off; /* 16 + 2 */ > uint16_t refcnt; /* 18 + 2 */ > uint16_t nb_segs; /* 20 + 2 */ > uint16_t port; /* 22 + 2 */ > 3 uint64_t ol_flags; /* 24 + 8 */ > /* --- RTE_MARKER rx_descriptor_fields1; */ > 4 uint32_t union packet_type; /* 32 + 4 */ > uint32_t pkt_len; /* 36 + 4 */ > 5 uint16_t data_len; /* 40 + 2 */ > uint16_t vlan_tci; /* 42 + 2 */ > 5.5 uint64_t union hash; /* 44 + 8 */ > 6.5 uint16_t vlan_tci_outer; /* 52 + 2 */ > uint16_t buf_len; /* 54 + 2 */ > 7 struct rte_mempool * pool; /* 56 + 8 */ > /* --- RTE_MARKER cacheline1; */ > 8 struct rte_mbuf * next; /* 64 + 8 */ > 9 uint64_t union tx_offload; /* 72 + 8 */ > 10 struct rte_mbuf_ext_shared_info * shinfo; /* 80 + 8 */ > 11 uint16_t priv_size; /* 88 + 2 */ > uint16_t timesync; /* 90 + 2 */ > 11.5 uint32_t dynfield1[9]; /* 92 + 36 */ > 16 /* --- END 128 */ > > Signed-off-by: Thomas Monjalon Acked-by: Olivier Matz