From: "Nélio Laranjeiro" <nelio.laranjeiro@6wind.com>
To: Olivier Matz <olivier.matz@6wind.com>
Cc: dev@dpdk.org, Adrien Mazarguil <adrien.mazarguil@6wind.com>,
Yongseok Koh <yskoh@mellanox.com>,
stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 2/2] net/mlx5: fix allocation when no memory on device NUMA node
Date: Thu, 18 Jan 2018 17:19:26 +0100 [thread overview]
Message-ID: <20180118161926.e7dqlkr2w5wfhvi4@laranjeiro-vm.dev.6wind.com> (raw)
In-Reply-To: <20180118130043.31773-2-olivier.matz@6wind.com>
On Thu, Jan 18, 2018 at 02:00:43PM +0100, Olivier Matz wrote:
> If there is no memory available on the same numa node than the
> device, it is preferable to fallback on another socket instead
> of failing.
>
> Fixes: 1e3a39f72d5d ("net/mlx5: allocate verbs object into shared memory")
> Cc: stable@dpdk.org
>
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> ---
> drivers/net/mlx5/mlx5.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
> index 1c95f3520..312f3d5be 100644
> --- a/drivers/net/mlx5/mlx5.c
> +++ b/drivers/net/mlx5/mlx5.c
> @@ -143,6 +143,10 @@ mlx5_alloc_verbs_buf(size_t size, void *data)
> assert(data != NULL);
> ret = rte_malloc_socket(__func__, size, alignment,
> priv->dev->device->numa_node);
> + if (ret == NULL)
> + ret = rte_malloc_socket(__func__, size, alignment,
> + SOCKET_ID_ANY);
> +
> DEBUG("Extern alloc size: %lu, align: %lu: %p", size, alignment, ret);
> return ret;
> }
> --
> 2.11.0
>
This function is the finalisation of the creation of the queues and
contains the buffers to the CQ/WQ which must be on the correct socket
otherwise the performances will be limited.
Even if this function is only called on dev_start() it must reflect the
configuration requested from the application on the
rte_eth_{tx,rx}_queue_setup().
Regards,
--
Nélio Laranjeiro
6WIND
next prev parent reply other threads:[~2018-01-18 16:19 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-18 13:00 [dpdk-dev] [PATCH 1/2] net/mlx5: fix return value of start operation Olivier Matz
2018-01-18 13:00 ` [dpdk-dev] [PATCH 2/2] net/mlx5: fix allocation when no memory on device NUMA node Olivier Matz
2018-01-18 16:19 ` Nélio Laranjeiro [this message]
2018-01-18 16:04 ` [dpdk-dev] [PATCH 1/2] net/mlx5: fix return value of start operation Nélio Laranjeiro
2018-01-18 16:13 ` Olivier Matz
2018-01-19 6:28 ` Yongseok Koh
2018-01-19 8:35 ` Nélio Laranjeiro
2018-01-19 8:43 ` Olivier Matz
2018-01-19 13:30 ` Olivier Matz
2018-01-19 13:43 ` Nélio Laranjeiro
2018-01-19 14:18 ` Nélio Laranjeiro
2018-01-19 13:42 ` Olivier Matz
2018-01-19 16:25 ` [dpdk-dev] [PATCH v2 " Olivier Matz
2018-01-19 16:25 ` [dpdk-dev] [PATCH v2 2/2] net/mlx5: fix allocation when no memory on device NUMA node Olivier Matz
2018-01-21 6:58 ` [dpdk-dev] [dpdk-stable] " Shahaf Shuler
2018-01-22 8:20 ` Olivier Matz
2018-01-22 12:33 ` [dpdk-dev] [PATCH v3 1/2] net/mlx5: fix return value of start operation Olivier Matz
2018-01-22 12:33 ` [dpdk-dev] [PATCH v3 2/2] net/mlx5: fix allocation when no memory on device NUMA node Olivier Matz
2018-01-22 20:27 ` [dpdk-dev] [dpdk-stable] [PATCH v3 1/2] net/mlx5: fix return value of start operation Shahaf Shuler
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=20180118161926.e7dqlkr2w5wfhvi4@laranjeiro-vm.dev.6wind.com \
--to=nelio.laranjeiro@6wind.com \
--cc=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
--cc=olivier.matz@6wind.com \
--cc=stable@dpdk.org \
--cc=yskoh@mellanox.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).