From: Thomas Monjalon Date: Wed, 21 Apr 2021 17:59:23 +0000 (+0200) Subject: vdpa/mlx5: improve portability of thread naming X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=91d7e764622671e19e530447cb63a77a48a52c9d;p=dpdk.git 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 Reviewed-by: Chenbo Xia Acked-by: Matan Azrad Reviewed-by: Chengwen Feng --- 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;