From: Tariq Toukan <ttoukan.linux@gmail.com>
To: Sebastian Ott <sebott@redhat.com>,
netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Saeed Mahameed <saeedm@nvidia.com>,
Leon Romanovsky <leon@kernel.org>,
Tariq Toukan <tariqt@nvidia.com>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Parav Pandit <parav@nvidia.com>, Breno Leitao <leitao@debian.org>
Subject: Re: [PATCH v2 RESEND] net/mlx5: unique names for per device caches
Date: Thu, 24 Oct 2024 19:47:54 +0300 [thread overview]
Message-ID: <4e3fbf05-3a88-43be-826c-a16a6718217f@gmail.com> (raw)
In-Reply-To: <20241023134146.28448-1-sebott@redhat.com>
On 23/10/2024 16:41, Sebastian Ott wrote:
> Add the device name to the per device kmem_cache names to
> ensure their uniqueness. This fixes warnings like this:
> "kmem_cache of name 'mlx5_fs_fgs' already exists".
>
> Reviwed-by: Breno Leitao <leitao@debian.org>
> Signed-off-by: Sebastian Ott <sebott@redhat.com>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
> index 8505d5e241e1..c2db0a1c132b 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
> @@ -3689,6 +3689,7 @@ void mlx5_fs_core_free(struct mlx5_core_dev *dev)
> int mlx5_fs_core_alloc(struct mlx5_core_dev *dev)
> {
> struct mlx5_flow_steering *steering;
> + char name[80];
> int err = 0;
>
> err = mlx5_init_fc_stats(dev);
> @@ -3713,10 +3714,12 @@ int mlx5_fs_core_alloc(struct mlx5_core_dev *dev)
> else
> steering->mode = MLX5_FLOW_STEERING_MODE_DMFS;
>
> - steering->fgs_cache = kmem_cache_create("mlx5_fs_fgs",
> + snprintf(name, sizeof(name), "%s-mlx5_fs_fgs", dev_name(dev->device));
> + steering->fgs_cache = kmem_cache_create(name,
> sizeof(struct mlx5_flow_group), 0,
> 0, NULL);
> - steering->ftes_cache = kmem_cache_create("mlx5_fs_ftes", sizeof(struct fs_fte), 0,
> + snprintf(name, sizeof(name), "%s-mlx5_fs_ftes", dev_name(dev->device));
> + steering->ftes_cache = kmem_cache_create(name, sizeof(struct fs_fte), 0,
> 0, NULL);
> if (!steering->ftes_cache || !steering->fgs_cache) {
> err = -ENOMEM;
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Thanks.
next prev parent reply other threads:[~2024-10-24 16:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-20 14:33 [PATCH] net/mlx5: unique names for per device caches Sebastian Ott
2024-09-20 16:32 ` Parav Pandit
2024-09-20 18:11 ` [PATCH v2] " Sebastian Ott
2024-10-04 10:47 ` Breno Leitao
2024-10-23 13:41 ` [PATCH v2 RESEND] " Sebastian Ott
2024-10-23 13:42 ` Breno Leitao
2024-10-24 16:47 ` Tariq Toukan [this message]
2024-10-29 0:50 ` patchwork-bot+netdevbpf
2024-10-25 4:03 ` [PATCH v2] " Kalesh Anakkur Purayil
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=4e3fbf05-3a88-43be-826c-a16a6718217f@gmail.com \
--to=ttoukan.linux@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=leitao@debian.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=parav@nvidia.com \
--cc=saeedm@nvidia.com \
--cc=sebott@redhat.com \
--cc=tariqt@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