DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Xia, Chenbo" <chenbo.xia@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>, "dev@dpdk.org" <dev@dpdk.org>
Cc: Matan Azrad <matan@nvidia.com>,
	Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Subject: Re: [dpdk-dev] [PATCH] vdpa/mlx5: improve portability of thread naming
Date: Mon, 26 Apr 2021 05:04:37 +0000	[thread overview]
Message-ID: <MN2PR11MB40631698244C4EAB1E4599EB9C429@MN2PR11MB4063.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210421175924.1541816-1-thomas@monjalon.net>

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Thomas Monjalon
> Sent: Thursday, April 22, 2021 1:59 AM
> To: dev@dpdk.org
> Cc: Matan Azrad <matan@nvidia.com>; Viacheslav Ovsiienko
> <viacheslavo@nvidia.com>
> Subject: [dpdk-dev] [PATCH] vdpa/mlx5: improve portability of thread naming
> 
> The function pthread_setname_np is non-portable,
> so it may be unavailable in old glibc or other systems.
> The function rte_thread_setname is workarounding portability issues.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
>  drivers/vdpa/mlx5/mlx5_vdpa_event.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_event.c
> b/drivers/vdpa/mlx5/mlx5_vdpa_event.c
> index 404e135d5c..ca6e985336 100644
> --- a/drivers/vdpa/mlx5/mlx5_vdpa_event.c
> +++ b/drivers/vdpa/mlx5/mlx5_vdpa_event.c
> @@ -544,7 +544,7 @@ mlx5_vdpa_cqe_event_setup(struct mlx5_vdpa_priv *priv)
>  			goto error;
>  		}
>  		snprintf(name, sizeof(name), "vDPA-mlx5-%d", priv->vid);
> -		ret = pthread_setname_np(priv->timer_tid, name);
> +		ret = rte_thread_setname(priv->timer_tid, name);
>  		if (ret) {
>  			DRV_LOG(ERR, "Failed to set timer thread name.");
>  			return -1;
> --
> 2.31.1

Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>

  reply	other threads:[~2021-04-26  5:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-21 17:59 Thomas Monjalon
2021-04-26  5:04 ` Xia, Chenbo [this message]
2021-04-26  7:59 ` Matan Azrad
2021-04-26  9:04 ` fengchengwen
2021-04-28  3:29 ` Xia, Chenbo

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=MN2PR11MB40631698244C4EAB1E4599EB9C429@MN2PR11MB4063.namprd11.prod.outlook.com \
    --to=chenbo.xia@intel.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=thomas@monjalon.net \
    --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).