From: "Tan, Jianfeng" <jianfeng.tan@intel.com>
To: "xiangxia.m.yue@gmail.com" <xiangxia.m.yue@gmail.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 2/2] vhost: add fdset-event thread name
Date: Fri, 23 Mar 2018 01:38:58 +0000 [thread overview]
Message-ID: <ED26CBA2FAD1BF48A8719AEF02201E365149CDE7@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1521722398-93353-2-git-send-email-xiangxia.m.yue@gmail.com>
> -----Original Message-----
> From: xiangxia.m.yue@gmail.com [mailto:xiangxia.m.yue@gmail.com]
> Sent: Thursday, March 22, 2018 8:40 PM
> To: Tan, Jianfeng
> Cc: dev@dpdk.org; Tonghao Zhang
> Subject: [PATCH 2/2] vhost: add fdset-event thread name
>
> From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
>
> This patch adds the name for vhost fdset thread.
> It can help us to know whether the thread is running.
>
> Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Thanks,
Jianfeng
> ---
> lib/librte_vhost/socket.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
> index 8ca01df..93175ba 100644
> --- a/lib/librte_vhost/socket.c
> +++ b/lib/librte_vhost/socket.c
> @@ -820,6 +820,7 @@ struct vhost_device_ops const *
> {
> struct vhost_user_socket *vsocket;
> static pthread_t fdset_tid;
> + char thread_name[RTE_MAX_THREAD_NAME_LEN];
>
> pthread_mutex_lock(&vhost_user.mutex);
> vsocket = find_vhost_user_socket(path);
> @@ -835,6 +836,14 @@ struct vhost_device_ops const *
> RTE_LOG(ERR, VHOST_CONFIG,
> "failed to create fdset handling thread");
> return ret;
> + } else {
> + snprintf(thread_name,
> RTE_MAX_THREAD_NAME_LEN,
> + "vhost-events");
> +
> + if (rte_thread_setname(fdset_tid, thread_name)) {
> + RTE_LOG(DEBUG, VHOST_CONFIG,
> + "failed to set vhost-event thread
> name");
> + }
> }
> }
>
> --
> 1.8.3.1
next prev parent reply other threads:[~2018-03-23 1:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-22 12:39 [dpdk-dev] [PATCH 1/2] vhost: make sure vhost fdset-thread created successfully xiangxia.m.yue
2018-03-22 12:39 ` [dpdk-dev] [PATCH 2/2] vhost: add fdset-event thread name xiangxia.m.yue
2018-03-23 1:38 ` Tan, Jianfeng [this message]
2018-03-23 1:30 ` [dpdk-dev] [PATCH 1/2] vhost: make sure vhost fdset-thread created successfully Tan, Jianfeng
2018-03-23 1:53 ` Tonghao Zhang
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=ED26CBA2FAD1BF48A8719AEF02201E365149CDE7@SHSMSX103.ccr.corp.intel.com \
--to=jianfeng.tan@intel.com \
--cc=dev@dpdk.org \
--cc=xiangxia.m.yue@gmail.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).