From: Thomas Monjalon <thomas@monjalon.net>
To: Jerin Jacob <jerin.jacob@caviumnetworks.com>,
Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Cc: dev@dpdk.org, ferruh.yigit@intel.com, stable@dpdk.org,
Matan Azrad <matan@mellanox.com>,
Konstantin Ananyev <konstantin.ananyev@intel.com>
Subject: Re: [dpdk-dev] [PATCH v3] ethdev: fix ethdev data alignment
Date: Tue, 13 Feb 2018 16:16:59 +0100 [thread overview]
Message-ID: <2314871.4g4HrYFpav@xps> (raw)
In-Reply-To: <20180212131343.13555-1-jerin.jacob@caviumnetworks.com>
12/02/2018 14:13, Jerin Jacob:
> The struct rte_eth_dev_data is used in ethdev fastpath routines
> and it not aligned to cache line size. This patch fixes the ethdev
> data alignment.
>
> The alignment was broken from the "first public release" changeset
> where ethdev data address was aligned only to the first port.
> Remaining ports alignment was defined by the size of the struct
> (rte_eth_dev_data). This scheme is not guaranteed to be cache line
> aligned all the time.
>
> "ethdev: add port ownership" change set introduced a
> rte_eth_dev_shared_data container for port ownership change,
> This resulted in rte_eth_dev->data memory for the first port also
> as cache unaligned.
>
> Added a compiler alignment attribute to make sure
> rte_eth_dev->data always cache aligned so that CPU/compiler
> 1) Avoid sharing the element with another cache line
> 2) Can load/store the elements in struct rte_eth_dev_data as
> naturally aligned.
>
> Some platform like thunderX could see performance regression of 1%
> at "ethdev: add port ownership" change set with
> 1 port/1 queue l3fwd application and this patch fixes that regression.
>
> example command:
> sudo ./examples/l3fwd/build/l3fwd -c 0xff00 -- -p 0x1 --config="(0,0,9)"
>
> Fixes: af75078fece3 ("first public release")
> Fixes: 5b7ba31148a8 ("ethdev: add port ownership")
>
> Cc: stable@dpdk.org
>
> Cc: Matan Azrad <matan@mellanox.com>
> Cc: Thomas Monjalon <thomas@monjalon.net>
> Cc: Konstantin Ananyev <konstantin.ananyev@intel.com>
>
> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> ---
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Applied, thanks
prev parent reply other threads:[~2018-02-13 15:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-10 9:42 [dpdk-dev] [PATCH] ethdev: fix a regression due to cache alignment issue Jerin Jacob
2018-02-10 18:23 ` Matan Azrad
2018-02-12 5:33 ` Jerin Jacob
2018-02-12 5:54 ` [dpdk-dev] [PATCH v2] ethdev: make ethdev data cache aligned Jerin Jacob
2018-02-12 9:04 ` Matan Azrad
2018-02-12 9:25 ` Jerin Jacob
2018-02-12 9:49 ` Matan Azrad
2018-02-12 10:20 ` Jerin Jacob
2018-02-12 12:10 ` Matan Azrad
2018-02-12 13:13 ` [dpdk-dev] [PATCH v3] ethdev: fix ethdev data alignment Jerin Jacob
2018-02-12 13:44 ` Matan Azrad
2018-02-12 13:50 ` Jerin Jacob
2018-02-12 14:02 ` Matan Azrad
2018-02-12 14:11 ` Jerin Jacob
2018-02-13 9:42 ` Ferruh Yigit
2018-02-13 15:16 ` Thomas Monjalon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2314871.4g4HrYFpav@xps \
--to=thomas@monjalon.net \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=jerin.jacob@caviumnetworks.com \
--cc=konstantin.ananyev@intel.com \
--cc=matan@mellanox.com \
--cc=pbhagavatula@caviumnetworks.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).