From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id E52FEA0526;
	Tue, 10 Nov 2020 11:44:41 +0100 (CET)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id BAA39F64;
	Tue, 10 Nov 2020 11:44:39 +0100 (CET)
Received: from new2-smtp.messagingengine.com (new2-smtp.messagingengine.com
 [66.111.4.224]) by dpdk.org (Postfix) with ESMTP id 849E5DED
 for <dev@dpdk.org>; Tue, 10 Nov 2020 11:44:37 +0100 (CET)
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailnew.nyi.internal (Postfix) with ESMTP id F0991580469;
 Tue, 10 Nov 2020 05:44:36 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163])
 by compute2.internal (MEProxy); Tue, 10 Nov 2020 05:44:36 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding:content-type; s=fm2; bh=
 27Z/4xDymO8W0U185bg2oA7CI/sJGWm51ToVWYDGh1w=; b=bzvaTiHa3oztV6i1
 Pc+DLudmMnPRmnqlAg/ogXT8+eWICW0FMjJxK3ZOp+22yiNY4slob7opHnt5Z0LM
 DBMqwaZSRa7j/QKMRIeqL529itleaZnJE1FAPbIGTUBg+QQqgeOGCLJdSLgjN12W
 7SEN6s6/ra8BnPV+Q4DMtcJ7qpXU2X7/31PxWaNOsYbfcXQCsbE2PLDnxrLxwudF
 e4r27o+0NbOiWd0XrFbhmxdioVOV7o1sHTG/QdTrNIBbjEi0UHSMMztqOfu3dJcU
 J22p4NevRnqfXB3xyDgYBnldH8Icu2pjCSb3qXGI7e8Y6TCTNgh0q9H+c/+63Yl/
 7+XN9A==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :date:from:in-reply-to:message-id:mime-version:references
 :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
 :x-sasl-enc; s=fm1; bh=27Z/4xDymO8W0U185bg2oA7CI/sJGWm51ToVWYDGh
 1w=; b=jzh28Y3ybWEr8bW67oofcplrNffSgzInLq/xiyDd1C6yfrWhVrROejbJd
 DQ+VT4lb5PS1j0Y+26H6nak9gBvY57/FEuCslz6zSVioj8tk25c8XutknyL4GD1x
 Idg2PlvK+O1Hi12BQA0iwSAjqZbGYRED8bc53tjmTM/UKmo3ykKOEKtc4Y79dR3r
 up+HUdAtj9hEmnBRbxTaw2EPxfNtSy63X6wYJ+LtxBtwSIoxagZSpZ1icAc9hMCt
 z7Bp/nTQ5L31GGkqTMVhyQRL9mE/RnB1dylz8xvkqvejMkkdFH5evJ+AAKY8m8s3
 tY+gAYbbu5yjk+0eN8v0hl0U3mB7A==
X-ME-Sender: <xms:Em-qX5P4zYhpvfnlmUIHxXMw6o1KNXKdJMfAkXYg6LStS95q-UsXlg>
 <xme:Em-qX78EgTYFGwHua7Khdj5Dv50KXRLx9X3yCc8NzLz4B6A8Rgunx-5w25XisU4Hc
 Jz-nCjlQaAHUyiofw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddujedgudelucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhephffvufffkfgjfhgggfgtsehtqhertddttdejnecuhfhrohhmpefvhhhomhgr
 shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg
 ftrfgrthhtvghrnhepvdekteeviefhgeeftdefjeeukeekkeeuvefgjeeuvdeivddvveeu
 gfetvedtfeevnecuffhomhgrihhnpeguphgukhdrohhrghenucfkphepjeejrddufeegrd
 dvtdefrddukeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf
 rhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth
X-ME-Proxy: <xmx:Em-qX4T3phgA90szMC_LLGArNkeXki6Y3FELoJBW6jC-cqhTnj6SlQ>
 <xmx:Em-qX1tnC2w7ZUSy7Y_9yENaCUDzOK8K3Nb502hhByW6S5c6oreSlQ>
 <xmx:Em-qXxeI3q1N20Au9jDoLggIx3q6q3NinU6tFLGQ64trUfvdCk_Q2w>
 <xmx:FG-qXyVOY728PYBKrxu23CTVIG-DCVZK4QqrywQAhNhfT1k-VYacLQ>
Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184])
 by mail.messagingengine.com (Postfix) with ESMTPA id 5FCA5306307C;
 Tue, 10 Nov 2020 05:44:33 -0500 (EST)
From: Thomas Monjalon <thomas@monjalon.net>
To: Morten =?ISO-8859-1?Q?Br=F8rup?= <mb@smartsharesystems.com>
Cc: dev@dpdk.org, david.marchand@redhat.com, ferruh.yigit@intel.com,
 olivier.matz@6wind.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 <mdr@ashroe.eu>, Neil Horman <nhorman@tuxdriver.com>
Date: Tue, 10 Nov 2020 11:44:32 +0100
Message-ID: <2232904.O0RIXgeV2Y@thomas>
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35C6140F@smartserver.smartshare.dk>
References: <20201107155306.463148-1-thomas@monjalon.net>
 <20201109212937.989954-3-thomas@monjalon.net>
 <98CBD80474FA8B44BF855DF32C47DC35C6140F@smartserver.smartshare.dk>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="UTF-8"
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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

10/11/2020 11:05, Morten Br=C3=B8rup:
> > From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > Sent: Monday, November 9, 2020 10:30 PM
> >=20
> > 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.
> >=20
> > Due to this change, tx_offload is moved.
>=20
> A minor correction: All fields after m->pool are moved up 8 bytes, not on=
ly m->tx_offload.

Yes I will improve the message before merging, thanks.

>=20
> > Hopefully no vector data path is impacted.
> >=20
> > Moving this field gives more space to dynfield1
> > while dropping the temporary dynfield0.
> >=20
> > This is how the mbuf layout looks like (pahole-style):
> >=20
> > 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
> > */
> >=20
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
>=20
> The minor detail doesn=E2=80=99t prevent...
>=20
> Acked-by: Morten Br=C3=B8rup <mb@smartsharesystems.com>
>=20
>=20