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 82F0AA0546; Sat, 10 Apr 2021 12:40:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B6B7B141239; Sat, 10 Apr 2021 12:40:15 +0200 (CEST) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by mails.dpdk.org (Postfix) with ESMTP id B3080141209 for ; Sat, 10 Apr 2021 12:40:08 +0200 (CEST) Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FHWf410qrzpWBY; Sat, 10 Apr 2021 18:37:16 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.498.0; Sat, 10 Apr 2021 18:40:01 +0800 From: "Min Hu (Connor)" To: CC: , , , , , , Date: Sat, 10 Apr 2021 18:40:16 +0800 Message-ID: <1618051221-19962-3-git-send-email-humin29@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1618051221-19962-1-git-send-email-humin29@huawei.com> References: <1618051221-19962-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 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 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ice/ice_dcf_parent.c b/drivers/net/ice/ice_dcf_parent.c index a8571b3..86aa32b 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; @@ -171,6 +173,9 @@ start_vsi_reset_thread(struct ice_dcf_hw *dcf_hw, bool vfr, uint16_t vf_id) PMD_DRV_LOG(ERR, "Failed to start the thread for reset handling"); free(param); } + + snprintf(name, sizeof(name), "ice-reset-%u", vf_id); + rte_thread_setname(thread, name); } void -- 2.7.4