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 070DFA0C53 for ; Wed, 24 Nov 2021 08:55:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E5ACF410E7; Wed, 24 Nov 2021 08:55:42 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 3A62840688; Wed, 24 Nov 2021 08:55:41 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 1AO2UdnP007481; Tue, 23 Nov 2021 23:55:40 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=uMzihLcBG1s6q2yKN1a5a9rS046C5QSe9s6vd2fd4lA=; b=Rz7T73moFjG481f6neuSwNCtpLgGGfSkiRmRQqyPwc7p4pALcas8GUDdDu6BSDlfwABd 4JcqEf/ERKJjdIcX+ZfH5lQOXnNA9aiFETMX8QRhGZfqjhlNDyuVfRe7M1TOitaqt2Fh cR7WwhWVe+ZtfvYK2SsfipjTzKSrq6sWmpD0j0GmEekjVF6MhrSc8lVQg8f1jqwIXVs1 +KotHNj4lLDcSyxZ9c3Y65OH5NRX49+8wsejVgvaq5cl8Rm0PXdU0vYoxSchThyA87kT BJFozhfnuA1nBFtnCYCZQTMC5ednjkmyXjtlLoHb+Jx0A/BoPPRoLk/xooS6lCm9tkaf fA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3ch9tt1p0u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 23 Nov 2021 23:55:40 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 23 Nov 2021 23:55:38 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Tue, 23 Nov 2021 23:55:38 -0800 Received: from localhost.localdomain (unknown [10.28.34.33]) by maili.marvell.com (Postfix) with ESMTP id 49DC95B692F; Tue, 23 Nov 2021 23:55:36 -0800 (PST) From: To: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao CC: , Satheesh Paul , Subject: [dpdk-dev] [PATCH ] common/cnxk: fix nibble parsing order when dumping MCAM Date: Wed, 24 Nov 2021 13:25:27 +0530 Message-ID: <20211124075528.10293-1-psatheesh@marvell.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: wFOT7Kp2UyojPGiq7UYW8XsO1G6tYJa- X-Proofpoint-GUID: wFOT7Kp2UyojPGiq7UYW8XsO1G6tYJa- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-11-24_02,2021-11-23_01,2020-04-07_01 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org From: Satheesh Paul Fix the order in which layer flags and layer type fields are parsed when dumping the MCAM data. Fixes: 9869c39918 ("common/cnxk: support flow entry dump") Cc: stable@dpdk.org Signed-off-by: Satheesh Paul --- drivers/common/cnxk/roc_npc_mcam_dump.c | 40 ++++++++++++------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/common/cnxk/roc_npc_mcam_dump.c b/drivers/common/cnxk/roc_npc_mcam_dump.c index 19b4901a52..278056591e 100644 --- a/drivers/common/cnxk/roc_npc_mcam_dump.c +++ b/drivers/common/cnxk/roc_npc_mcam_dump.c @@ -159,6 +159,12 @@ npc_flow_print_parse_nibbles(FILE *file, struct roc_npc_flow *flow, offset += 4; } + if (rx_parse->laflags) { + data = npc_get_nibbles(flow, 2, offset); + fprintf(file, "\tNPC_PARSE_NIBBLE_LA_FLAGS:%#02X\n", data); + offset += 8; + } + if (rx_parse->latype) { data = npc_get_nibbles(flow, 1, offset); fprintf(file, "\tNPC_PARSE_NIBBLE_LA_LTYPE:%s\n", @@ -166,9 +172,9 @@ npc_flow_print_parse_nibbles(FILE *file, struct roc_npc_flow *flow, offset += 4; } - if (rx_parse->laflags) { + if (rx_parse->lbflags) { data = npc_get_nibbles(flow, 2, offset); - fprintf(file, "\tNPC_PARSE_NIBBLE_LA_FLAGS:%#02X\n", data); + fprintf(file, "\tNPC_PARSE_NIBBLE_LB_FLAGS:%#02X\n", data); offset += 8; } @@ -179,9 +185,9 @@ npc_flow_print_parse_nibbles(FILE *file, struct roc_npc_flow *flow, offset += 4; } - if (rx_parse->lbflags) { + if (rx_parse->lcflags) { data = npc_get_nibbles(flow, 2, offset); - fprintf(file, "\tNPC_PARSE_NIBBLE_LB_FLAGS:%#02X\n", data); + fprintf(file, "\tNPC_PARSE_NIBBLE_LC_FLAGS:%#02X\n", data); offset += 8; } @@ -192,9 +198,9 @@ npc_flow_print_parse_nibbles(FILE *file, struct roc_npc_flow *flow, offset += 4; } - if (rx_parse->lcflags) { + if (rx_parse->ldflags) { data = npc_get_nibbles(flow, 2, offset); - fprintf(file, "\tNPC_PARSE_NIBBLE_LC_FLAGS:%#02X\n", data); + fprintf(file, "\tNPC_PARSE_NIBBLE_LD_FLAGS:%#02X\n", data); offset += 8; } @@ -205,9 +211,9 @@ npc_flow_print_parse_nibbles(FILE *file, struct roc_npc_flow *flow, offset += 4; } - if (rx_parse->ldflags) { + if (rx_parse->leflags) { data = npc_get_nibbles(flow, 2, offset); - fprintf(file, "\tNPC_PARSE_NIBBLE_LD_FLAGS:%#02X\n", data); + fprintf(file, "\tNPC_PARSE_NIBBLE_LE_FLAGS:%#02X\n", data); offset += 8; } @@ -218,9 +224,9 @@ npc_flow_print_parse_nibbles(FILE *file, struct roc_npc_flow *flow, offset += 4; } - if (rx_parse->leflags) { + if (rx_parse->lfflags) { data = npc_get_nibbles(flow, 2, offset); - fprintf(file, "\tNPC_PARSE_NIBBLE_LE_FLAGS:%#02X\n", data); + fprintf(file, "\tNPC_PARSE_NIBBLE_LF_FLAGS:%#02X\n", data); offset += 8; } @@ -231,9 +237,9 @@ npc_flow_print_parse_nibbles(FILE *file, struct roc_npc_flow *flow, offset += 4; } - if (rx_parse->lfflags) { + if (rx_parse->lgflags) { data = npc_get_nibbles(flow, 2, offset); - fprintf(file, "\tNPC_PARSE_NIBBLE_LF_FLAGS:%#02X\n", data); + fprintf(file, "\tNPC_PARSE_NIBBLE_LG_FLAGS:%#02X\n", data); offset += 8; } @@ -244,10 +250,9 @@ npc_flow_print_parse_nibbles(FILE *file, struct roc_npc_flow *flow, offset += 4; } - if (rx_parse->lgflags) { + if (rx_parse->lhflags) { data = npc_get_nibbles(flow, 2, offset); - fprintf(file, "\tNPC_PARSE_NIBBLE_LG_FLAGS:%#02X\n", data); - offset += 8; + fprintf(file, "\tNPC_PARSE_NIBBLE_LH_FLAGS:%#02X\n", data); } if (rx_parse->lhtype) { @@ -256,11 +261,6 @@ npc_flow_print_parse_nibbles(FILE *file, struct roc_npc_flow *flow, ltype_str[NPC_LID_LH][data]); offset += 4; } - - if (rx_parse->lhflags) { - data = npc_get_nibbles(flow, 2, offset); - fprintf(file, "\tNPC_PARSE_NIBBLE_LH_FLAGS:%#02X\n", data); - } } static void -- 2.25.4