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 ACB12A034E; Tue, 21 Dec 2021 12:24:28 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2C39B40040; Tue, 21 Dec 2021 12:24:28 +0100 (CET) Received: from mail-il1-f171.google.com (mail-il1-f171.google.com [209.85.166.171]) by mails.dpdk.org (Postfix) with ESMTP id 904B84003C; Tue, 21 Dec 2021 12:24:27 +0100 (CET) Received: by mail-il1-f171.google.com with SMTP id x15so9896659ilc.5; Tue, 21 Dec 2021 03:24:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=om9ZyO/Ht2V5/7TqrZ5d3OJs/LlfKkr0kWUbNIsJexA=; b=VbkzBrHHA8WKVxCne72bBO03tunVlUPNgNpriieT/oTQ1Ib0WBntSBX9wPgC7OAC/3 T/3/MiE7Z50hW5LWXIe2iHbdqZ9ro5vnWAMr1IgRpTnifcJlEbUF1ko9JOEBG5K/13Eh oZt8teH5t+EXxHWqtiIMJdxgxTh71cVXKL9sE2WEke7CAy/qR9xD5OUBZZQlxBxQTdiY UiVQLLSOQh7yikPeImWqrjWrbvPWCu67Lg/CtZb2jFnCJLZdiMbSpu26316MctWoAky1 i8I4LXLMXkQj5XkrOJC7FNx01rYjQsJQea+S9CwTEGUprq3wxgXLSN3T59pipsxzuqZa tPrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=om9ZyO/Ht2V5/7TqrZ5d3OJs/LlfKkr0kWUbNIsJexA=; b=L80MkamvrcPwnLtXaptgWVl+RlDnCBn0ZYjbLxqnOZ3fRTRUklX1Cc80VwJqrOpv7z cQfi3zhzq68PK7sacr2bFT/xKovJarKenV/+PdIGytbj7uLZdFIC3Abn29VW93w2b2Ag AYBBiQl1LIXn1KTgqcrmgPAdQBBgCQK8B4in4Uh5YL5Elyn39qI2gQ1YEY5x2xLdehKs YLQ6DRXuLhx0oHDRD0BmT6VkK4/jvF/KWAKPExmEktEtU/Ixja6DUI1/Y4/4HgWjWDQ8 KLgN2a0BmEnIFvdfU+wvePi0nOcrzkV27N4DMUl+WP4NnxyXXE0XQTPvf1vvF3taWcm2 J6fg== X-Gm-Message-State: AOAM530F5i/564+5YKoRgPosozQzU1K9pyz/2PerRXWy0KiaaY8a0DMY v4eQCB7DOpOh/a/pfVu7L55pe2SfrPyGyaKT97E= X-Google-Smtp-Source: ABdhPJxhKiDjSTSNWmdPGUcDJrf2FgxUFwuxQTV1dUcj1EZKOceO7nUHxQR2T+AhQjDjYTf+sY5GhCBms5HO1aW4UHk= X-Received: by 2002:a05:6e02:1906:: with SMTP id w6mr1304522ilu.192.1640085866868; Tue, 21 Dec 2021 03:24:26 -0800 (PST) MIME-Version: 1.0 References: <20211124075528.10293-1-psatheesh@marvell.com> In-Reply-To: <20211124075528.10293-1-psatheesh@marvell.com> From: Jerin Jacob Date: Tue, 21 Dec 2021 16:54:00 +0530 Message-ID: Subject: Re: [dpdk-dev] [PATCH ] common/cnxk: fix nibble parsing order when dumping MCAM To: Satheesh Paul , Ferruh Yigit , Andrew Rybchenko Cc: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , dpdk-dev , dpdk stable Content-Type: text/plain; charset="UTF-8" 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 On Wed, Nov 24, 2021 at 1:43 PM wrote: > > 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 Acked-by: Jerin Jacob Applied to dpdk-next-net-mrvl/for-next-net. Thanks > --- > 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 >