patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Raslan Darawsheh <rasland@nvidia.com>
To: Matan Azrad <matan@nvidia.com>, Slava Ovsiienko <viacheslavo@nvidia.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] common/mlx5: fix compilation for zero-length array
Date: Wed, 10 Nov 2021 08:49:18 +0000	[thread overview]
Message-ID: <DM4PR12MB531216BC5D9E215FB0C94BC4CF939@DM4PR12MB5312.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20211108122204.2225227-1-matan@nvidia.com>

Hi,

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Matan Azrad
> Sent: Monday, November 8, 2021 2:22 PM
> To: Slava Ovsiienko <viacheslavo@nvidia.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] common/mlx5: fix compilation for zero-length
> array
> 
> The structure of the striding RQ(MPRQ) buffer includes an array size
> defined by the RTE_PKTMBUF_HEADROOM macro added in [1].
> 
> When RTE_PKTMBUF_HEADROOM is set to 0 in the compilation config file
> the
> the compilation with debug type failed:
> 
> "In file included from ../drivers/common/mlx5/mlx5_common.h:25,
>                  from ../drivers/common/mlx5/linux/mlx5_nl.h:12,
>                  from ../drivers/common/mlx5/linux/mlx5_nl.c:22:
> ../drivers/common/mlx5/mlx5_common_mr.h:96:10: error: ISO C forbids
>                              zero-size array 'pad' [-Werror=pedantic]"
> 
> Actually, the array for the first stride headroom is not needed:
> 
> Each stride in the striding RQ buffer includes the headroom of the next
> stride, so the headroom of the first stride should be allocated before
> the starting point of the buffer posted to the HW(HW buffer).
> 
> The striding RQ buffer is used as an attached buffer to mbuf and have
> shared information per stride.
> 
> The LRO support moved all the strides shared information to the top of
> the buffer before the first stride headroom but didn't remove the old
> memory of this headroom from the buffer.
> 
> Remove the old headroom memory from the striding RQ buffer.
> 
> Fixes: 3a22f3877c9d ("net/mlx5: replace external mbuf shared memory")
> Cc: stable@dpdk.org
> 
> [1] commit 7d6bf6b866b8 ("net/mlx5: add Multi-Packet Rx support")
> 
> Signed-off-by: Matan Azrad <matan@nvidia.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

      reply	other threads:[~2021-11-10  8:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-08 12:22 [dpdk-stable] " Matan Azrad
2021-11-10  8:49 ` Raslan Darawsheh [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=DM4PR12MB531216BC5D9E215FB0C94BC4CF939@DM4PR12MB5312.namprd12.prod.outlook.com \
    --to=rasland@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=stable@dpdk.org \
    --cc=viacheslavo@nvidia.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).