From: Yongseok Koh <yskoh@mellanox.com>
To: David Marchand <david.marchand@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"Adrien Mazarguil" <adrien.mazarguil@6wind.com>,
"Nélio Laranjeiro" <nelio.laranjeiro@6wind.com>,
"Thomas Monjalon" <thomas@monjalon.net>,
"Shahaf Shuler" <shahafs@mellanox.com>
Subject: Re: [dpdk-dev] [PATCH] net/mlx5: only register memory callback when probing a device
Date: Wed, 30 May 2018 15:59:55 +0000 [thread overview]
Message-ID: <73FA6D64-52F7-4273-971E-6A1579073631@mellanox.com> (raw)
In-Reply-To: <20180530144253.8935-1-david.marchand@6wind.com>
> On May 30, 2018, at 7:42 AM, David Marchand <david.marchand@6wind.com> wrote:
>
> The callback should be invoked only for memory that has been registered
> in a device, hence, no need to track cleanup events if no device is
> present.
>
> Bugzilla-ID: 56
> Fixes: 974f1e7ef146 ("net/mlx5: add new memory region support")
>
> Signed-off-by: David Marchand <david.marchand@6wind.com>
> ---
Good finding! Thank you so much for the patch.
Patch is good. Just to be sure, I've run traffic with testpmd and also run
multi-process test examples with traffic. It runs well.
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Thanks
> drivers/net/mlx5/mlx5.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
> index d77a20db4..601d03f71 100644
> --- a/drivers/net/mlx5/mlx5.c
> +++ b/drivers/net/mlx5/mlx5.c
> @@ -138,6 +138,8 @@ mlx5_prepare_shared_data(void)
> LIST_INIT(&mlx5_shared_data->mem_event_cb_list);
> rte_rwlock_init(&mlx5_shared_data->mem_event_rwlock);
> }
> + rte_mem_event_callback_register("MLX5_MEM_EVENT_CB",
> + mlx5_mr_mem_event_cb, NULL);
> }
> rte_spinlock_unlock(&mlx5_shared_data_lock);
> }
> @@ -1460,8 +1462,6 @@ rte_mlx5_pmd_init(void)
> }
> mlx5_glue->fork_init();
> rte_pci_register(&mlx5_driver);
> - rte_mem_event_callback_register("MLX5_MEM_EVENT_CB",
> - mlx5_mr_mem_event_cb, NULL);
> }
>
> RTE_PMD_EXPORT_NAME(net_mlx5, __COUNTER__);
> --
> 2.11.0
>
next prev parent reply other threads:[~2018-05-30 15:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-30 14:42 David Marchand
2018-05-30 15:59 ` Yongseok Koh [this message]
2018-05-30 16:04 ` David Marchand
2018-05-30 19:07 ` Thomas Monjalon
2018-05-30 16:02 ` Ferruh Yigit
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=73FA6D64-52F7-4273-971E-6A1579073631@mellanox.com \
--to=yskoh@mellanox.com \
--cc=adrien.mazarguil@6wind.com \
--cc=david.marchand@6wind.com \
--cc=dev@dpdk.org \
--cc=nelio.laranjeiro@6wind.com \
--cc=shahafs@mellanox.com \
--cc=thomas@monjalon.net \
/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).