From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from canpmsgout05.his.huawei.com (canpmsgout05.his.huawei.com [113.46.200.220]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 40B1325B099; Thu, 3 Sep 2026 07:52:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.220 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788421975; cv=none; b=cPexNjHOSaI5qgrMNIVnWIO2J9a2d66gJ6wWiPwQQSBPXD5ek8nZMHnLJI25oNKgt8JlPWdbUtSxxpIcDvjTBGWYhGpS7mfaAUNZPSK7d+NH5lP0NG7fdsLKHpKbFBpTirjOyub+lTgu+j2Vls8Y6xcY6jXaVn8tJ9ByS4a+jqA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788421975; c=relaxed/simple; bh=uv31mMGJY8917i0D41i+PSbwTCNxtolCmItMY7GqkH0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=umYcuKiO53QybyLvOIzYQKSt3xxnWwuLBb2wQ4x9kuS+d5fdMxnuw+MA/k420L/GpBhlRzH0C20yPtiEPHSutBAjt//zm//sEHDDVHeJhLVqU8E98xFmGcWZchPDkZBseMVQrRvk5VwYcrYsn8fERE8P2vtIKOLBUaAfP5WZuZo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=KWuF6IC6; arc=none smtp.client-ip=113.46.200.220 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="KWuF6IC6" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=SHFtsegYkSXAAQ6VLTBIGRfXAcm81uMjTTor0MXHuTI=; b=KWuF6IC6bGKi3ranAbI8gv4Ii8gUY2i6kQGwdMJTdCvr84XKLmPVUEiqnlsqQezcuJF0YoE9V n+IXuXFtWfSPpwbhu1sHzejM/vwmpPiFHKShH/JP3LT0DdkhFBdE+eZ0at7vhrFHa4xhAltw2w9 zzRxS6N5Gufcj4+3IEI7YS8= Received: from mail.maildlp.com (unknown [172.19.162.197]) by canpmsgout05.his.huawei.com (SkyGuard) with ESMTPS id 4hbBPB0Gy3z12LDV; Thu, 3 Sep 2026 15:41:34 +0800 (CST) Received: from whupemo200004.china.huawei.com (unknown [7.152.184.18]) by mail.maildlp.com (Postfix) with ESMTPS id BF95B40591; Thu, 3 Sep 2026 15:52:49 +0800 (CST) Received: from huawei.com (10.50.163.32) by whupemo200004.china.huawei.com (7.152.184.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.45; Thu, 3 Sep 2026 15:52:47 +0800 From: Sizhe Liu To: , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH v3 2/8] perf hisi-ptt: Complete the field names for 4DW and 8DW packets Date: Thu, 3 Sep 2026 15:52:35 +0800 Message-ID: <20260903075241.1445338-3-liusizhe5@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20260903075241.1445338-1-liusizhe5@huawei.com> References: <20260903075241.1445338-1-liusizhe5@huawei.com> Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: kwepems500001.china.huawei.com (7.221.188.70) To whupemo200004.china.huawei.com (7.152.184.18) Add the missing HISI_PTT_4DW_HEAD0 entry to the 4DW field name table and add the HISI_PTT_8DW_CHK_AND_RSV0/HISI_PTT_8DW_RSV1 entries to the 8DW field name table so that all DW indices have corresponding names. Reviewed-by: Yushan Wang Signed-off-by: Sizhe Liu --- .../hisi-ptt-decoder/hisi-ptt-pkt-decoder.c | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tools/perf/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.c b/tools/perf/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.c index ef72223d3854..766665414ad8 100644 --- a/tools/perf/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.c +++ b/tools/perf/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.c @@ -54,6 +54,7 @@ enum hisi_ptt_8dw_pkt_field_type { }; enum hisi_ptt_4dw_pkt_field_type { + HISI_PTT_4DW_HEAD0, HISI_PTT_4DW_HEAD1, HISI_PTT_4DW_HEAD2, HISI_PTT_4DW_HEAD3, @@ -61,15 +62,18 @@ enum hisi_ptt_4dw_pkt_field_type { }; static const char * const hisi_ptt_8dw_pkt_field_name[] = { - [HISI_PTT_8DW_PREFIX] = "Prefix", - [HISI_PTT_8DW_HEAD0] = "Header DW0", - [HISI_PTT_8DW_HEAD1] = "Header DW1", - [HISI_PTT_8DW_HEAD2] = "Header DW2", - [HISI_PTT_8DW_HEAD3] = "Header DW3", - [HISI_PTT_8DW_TIME] = "Time" + [HISI_PTT_8DW_CHK_AND_RSV0] = "CHK & RSV0", + [HISI_PTT_8DW_PREFIX] = "Prefix", + [HISI_PTT_8DW_HEAD0] = "Header DW0", + [HISI_PTT_8DW_HEAD1] = "Header DW1", + [HISI_PTT_8DW_HEAD2] = "Header DW2", + [HISI_PTT_8DW_HEAD3] = "Header DW3", + [HISI_PTT_8DW_RSV1] = "RSV1", + [HISI_PTT_8DW_TIME] = "Time" }; static const char * const hisi_ptt_4dw_pkt_field_name[] = { + [HISI_PTT_4DW_HEAD0] = "Header DW0", [HISI_PTT_4DW_HEAD1] = "Header DW1", [HISI_PTT_4DW_HEAD2] = "Header DW2", [HISI_PTT_4DW_HEAD3] = "Header DW3", @@ -100,7 +104,7 @@ static int hisi_ptt_8dw_pkt_desc(struct hisi_ptt_pkt_buf *pkt_buf) { int i; - for (i = 0; i < HISI_PTT_8DW_TYPE_MAX; i++) { + for (i = HISI_PTT_8DW_CHK_AND_RSV0; i < HISI_PTT_8DW_TYPE_MAX; i++) { /* Do not show 8DW check field and reserved fields */ if (i == HISI_PTT_8DW_CHK_AND_RSV0 || i == HISI_PTT_8DW_RSV1) { pkt_buf->pos += HISI_PTT_FIELD_LENGTH; @@ -150,7 +154,7 @@ static int hisi_ptt_4dw_pkt_desc(struct hisi_ptt_pkt_buf *pkt_buf) hisi_ptt_4dw_print_dw0(pkt_buf); - for (i = 0; i < HISI_PTT_4DW_TYPE_MAX; i++) + for (i = HISI_PTT_4DW_HEAD1; i < HISI_PTT_4DW_TYPE_MAX; i++) hisi_ptt_print_pkt(pkt_buf, hisi_ptt_4dw_pkt_field_name[i]); return hisi_ptt_pkt_size[HISI_PTT_4DW_PKT]; -- 2.33.0