DPDK patches and discussions
 help / color / mirror / Atom feed
From: fengchengwen <fengchengwen@huawei.com>
To: Wenwu Ma <wenwux.ma@intel.com>, <dev@dpdk.org>
Cc: <songx.jiale@intel.com>, <stable@dpdk.org>
Subject: Re: [PATCH v2] dmadev: fix structure alignment
Date: Fri, 15 Mar 2024 14:06:07 +0800	[thread overview]
Message-ID: <096d2161-026c-f89e-c44b-340a3148bccc@huawei.com> (raw)
In-Reply-To: <20240315014331.1376720-1-wenwux.ma@intel.com>

Hi Wenwu,

On 2024/3/15 9:43, Wenwu Ma wrote:
> The structure rte_dma_dev needs only 8 byte alignment.
> This patch replaces __rte_cache_aligned of rte_dma_dev
> with __rte_aligned(8).
> 
> Fixes: b36970f2e13e ("dmadev: introduce DMA device library")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
> ---
> v2:
>  - Because of performance drop, adjust the code to
>    no longer demand cache line alignment

Which two versions observed performance drop? And which benchmark observed drop?
Could you provide more information?

> 
> ---
>  lib/dmadev/rte_dmadev_pmd.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/dmadev/rte_dmadev_pmd.h b/lib/dmadev/rte_dmadev_pmd.h
> index 58729088ff..b569bb3502 100644
> --- a/lib/dmadev/rte_dmadev_pmd.h
> +++ b/lib/dmadev/rte_dmadev_pmd.h
> @@ -122,7 +122,7 @@ enum rte_dma_dev_state {
>   * @internal
>   * The generic data structure associated with each DMA device.
>   */
> -struct __rte_cache_aligned rte_dma_dev {
> +struct __rte_aligned(8) rte_dma_dev {

The DMA fast-path was implemented by struct rte_dma_fp_objs, which is not
rte_dma_dev? So why is it a problem here?

Thanks

>  	/** Device info which supplied during device initialization. */
>  	struct rte_device *device;
>  	struct rte_dma_dev_data *data; /**< Pointer to shared device data. */
> 

  parent reply	other threads:[~2024-03-15  6:07 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-08  5:37 [PATCH] " Wenwu Ma
2024-03-08  7:01 ` fengchengwen
2024-03-15  1:43 ` [PATCH v2] " Wenwu Ma
2024-03-15  6:02   ` Tyler Retzlaff
2024-03-15  6:06   ` fengchengwen [this message]
2024-03-15  6:25     ` Ma, WenwuX
2024-03-15  7:44       ` Ma, WenwuX
2024-03-15  8:31         ` fengchengwen
2024-03-15  9:27           ` Ma, WenwuX
2024-03-20  4:11             ` fengchengwen
2024-03-20  7:34               ` Ma, WenwuX
2024-03-19  9:48   ` Jiale, SongX
2024-03-20  7:23 ` [PATCH v3] " Wenwu Ma
2024-03-20  9:31   ` fengchengwen
2024-03-20 11:37   ` Thomas Monjalon
2024-03-21  1:25     ` Ma, WenwuX
2024-03-21  8:30       ` Thomas Monjalon
2024-03-21  8:57         ` Ma, WenwuX
2024-03-21  9:18         ` Ma, WenwuX
2024-03-21 10:06           ` Thomas Monjalon
2024-03-21 16:05             ` Tyler Retzlaff

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=096d2161-026c-f89e-c44b-340a3148bccc@huawei.com \
    --to=fengchengwen@huawei.com \
    --cc=dev@dpdk.org \
    --cc=songx.jiale@intel.com \
    --cc=stable@dpdk.org \
    --cc=wenwux.ma@intel.com \
    /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).