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> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com> Acked-by: Matan Azrad <matan@nvidia.com> Reviewed-by: Chengwen Feng <fengchengwen@huawei.com>
This commit is contained in:
parent
9f528374bf
commit
91d7e76462
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user