From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 64C37CD6E71 for ; Thu, 4 Jun 2026 07:50:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Ato99urV+TJI9keJXJxq4w1QU/DPwW65iRUxfGjeLIg=; b=SuI4RMN4P2wOZUEjoyzDDZ44kL EdZHzKlvJiZ4XlYulCH4CtwzHy5ZdypL5zjy/Rnr8wqpJDH3bM4Z0CDcFMZUnLkyt4oLNQfc2p0xu XEGLZC8EwFsbUkYT5mCJXMTG5PMiQHmGRonBL2KxKTIrnY9Vw94MJLftEv0srgA4hMpxRomSL/R6y XoMnrorPfBtPzYh/t3/5gkbQ5HlQQvpx44i85e93jPMMthP4jr1OrCVjF4VQFJoTilPYiJfe9L1jk q+T/gZmN7I+7EPKijC+i6Ycty67faXnrxph6DRiEUNIpUInpqdT8NW1k+BB1W+vuilyWYy3Fo0oHm FgYOAy0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wV2qP-0000000GKFF-0jwQ; Thu, 04 Jun 2026 07:50:25 +0000 Received: from canpmsgout12.his.huawei.com ([113.46.200.227]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wV2qI-0000000GKB6-2BMo for linux-arm-kernel@lists.infradead.org; Thu, 04 Jun 2026 07:50:22 +0000 dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=Ato99urV+TJI9keJXJxq4w1QU/DPwW65iRUxfGjeLIg=; b=knSCBs2QrywHvIxahoy+tlt1DC5xIp19y612n7v380yC5+Djn/8DqZmAY0yc2ZarA3P5BXXds 5MNCI0LSYI7kd2W6fBhxeYbEL5IrMBRQoiv/j2D0gM373E2Hzzb9CLLxGlSZXxU6YKWyBYitJjn zw89k4odiC86Mx0vzw2VyWo= Received: from mail.maildlp.com (unknown [172.19.162.92]) by canpmsgout12.his.huawei.com (SkyGuard) with ESMTPS id 4gWGk33RWBznTZ3; Thu, 4 Jun 2026 15:42:19 +0800 (CST) Received: from dggemv712-chm.china.huawei.com (unknown [10.1.198.32]) by mail.maildlp.com (Postfix) with ESMTPS id 1086840565; Thu, 4 Jun 2026 15:50:12 +0800 (CST) Received: from kwepemn200012.china.huawei.com (7.202.194.135) by dggemv712-chm.china.huawei.com (10.1.198.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 4 Jun 2026 15:50:11 +0800 Received: from huawei.com (10.50.163.32) by kwepemn200012.china.huawei.com (7.202.194.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 4 Jun 2026 15:50:10 +0800 From: Sizhe Liu To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , , Subject: [PATCH 05/10] perf hisi-ptt: Complete the field names for 4DW and 8DW packets Date: Thu, 4 Jun 2026 15:50:00 +0800 Message-ID: <20260604075005.2219785-6-liusizhe5@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20260604075005.2219785-1-liusizhe5@huawei.com> References: <20260604075005.2219785-1-liusizhe5@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.50.163.32] X-ClientProxiedBy: kwepems200001.china.huawei.com (7.221.188.67) To kwepemn200012.china.huawei.com (7.202.194.135) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260604_005018_884028_3A9932D4 X-CRM114-Status: GOOD ( 11.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. Replace the variable in the printing loop with enum members. 8DW format is like: bits [ 31:11 ][ 10:0 ] |---------------------------------------|-------------------| DW0 [ 0x1fffff ][ Reserved (0x7ff) ] DW1 [ Prefix ] DW2 [ Header DW0 ] DW3 [ Header DW1 ] DW4 [ Header DW2 ] DW5 [ Header DW3 ] DW6 [ Reserved (0x0) ] DW7 [ Time ] Signed-off-by: Sizhe Liu --- .../hisi-ptt-decoder/hisi-ptt-pkt-decoder.c | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 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 201ca948c4fb..33804bcd0642 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 @@ -53,6 +53,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, @@ -60,15 +61,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", @@ -114,7 +118,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; @@ -160,9 +164,8 @@ 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