From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2FE7FA0562; Sat, 17 Apr 2021 11:10:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E0EDE161EB5; Sat, 17 Apr 2021 11:09:55 +0200 (CEST) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by mails.dpdk.org (Postfix) with ESMTP id 7AEB84069C for ; Sat, 17 Apr 2021 11:09:44 +0200 (CEST) Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FMnJQ44VPzpY2K; Sat, 17 Apr 2021 17:06:46 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.498.0; Sat, 17 Apr 2021 17:09:38 +0800 From: "Min Hu (Connor)" To: CC: , , , , , , , , Date: Sat, 17 Apr 2021 17:09:43 +0800 Message-ID: <1618650588-34268-3-git-send-email-humin29@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1618650588-34268-1-git-send-email-humin29@huawei.com> References: <1618051221-19962-1-git-send-email-humin29@huawei.com> <1618650588-34268-1-git-send-email-humin29@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH v2 2/7] net/ice: support set VSI reset thread name X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Chengwen Feng This patch supports set VSI reset thread name which is helpful for debugging. Signed-off-by: Chengwen Feng Signed-off-by: Min Hu (Connor) --- drivers/net/ice/ice_dcf_parent.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/ice/ice_dcf_parent.c b/drivers/net/ice/ice_dcf_parent.c index a8571b3..c8e4332 100644 --- a/drivers/net/ice/ice_dcf_parent.c +++ b/drivers/net/ice/ice_dcf_parent.c @@ -151,7 +151,9 @@ ice_dcf_vsi_update_service_handler(void *param) static void start_vsi_reset_thread(struct ice_dcf_hw *dcf_hw, bool vfr, uint16_t vf_id) { +#define THREAD_NAME_LEN 16 struct ice_dcf_reset_event_param *param; + char name[THREAD_NAME_LEN]; pthread_t thread; int ret; @@ -165,9 +167,10 @@ start_vsi_reset_thread(struct ice_dcf_hw *dcf_hw, bool vfr, uint16_t vf_id) param->vfr = vfr; param->vf_id = vf_id; - ret = pthread_create(&thread, NULL, - ice_dcf_vsi_update_service_handler, param); - if (ret) { + snprintf(name, sizeof(name), "ice-reset-%u", vf_id); + ret = rte_ctrl_thread_create(&thread, name, NULL, + ice_dcf_vsi_update_service_handler, param); + if (ret != 0) { PMD_DRV_LOG(ERR, "Failed to start the thread for reset handling"); free(param); } -- 2.7.4