octeontx2-af: Add KPU changes to parse NGIO as separate layer

[ Upstream commit 745166fcf0 ]

With current KPU profile NGIO is being parsed along with CTAG as
a single layer. Because of this MCAM/ntuple rules installed with
ethertype as 0x8842 are not being hit. Adding KPU profile changes
to parse NGIO in separate ltype and CTAG in separate ltype.

Fixes: f9c49be90c ("octeontx2-af: Update the default KPU profile and fixes")
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Kiran Kumar K 2022-01-21 12:04:47 +05:30 коммит произвёл Greg Kroah-Hartman
Родитель 63138001c9
Коммит f1c0163bb8
1 изменённых файлов: 35 добавлений и 35 удалений

Просмотреть файл

@ -186,7 +186,6 @@ enum npc_kpu_parser_state {
NPC_S_KPU2_ETAG, NPC_S_KPU2_ETAG,
NPC_S_KPU2_PREHEADER, NPC_S_KPU2_PREHEADER,
NPC_S_KPU2_EXDSA, NPC_S_KPU2_EXDSA,
NPC_S_KPU2_NGIO,
NPC_S_KPU2_CPT_CTAG, NPC_S_KPU2_CPT_CTAG,
NPC_S_KPU2_CPT_QINQ, NPC_S_KPU2_CPT_QINQ,
NPC_S_KPU3_CTAG, NPC_S_KPU3_CTAG,
@ -213,6 +212,7 @@ enum npc_kpu_parser_state {
NPC_S_KPU5_NSH, NPC_S_KPU5_NSH,
NPC_S_KPU5_CPT_IP, NPC_S_KPU5_CPT_IP,
NPC_S_KPU5_CPT_IP6, NPC_S_KPU5_CPT_IP6,
NPC_S_KPU5_NGIO,
NPC_S_KPU6_IP6_EXT, NPC_S_KPU6_IP6_EXT,
NPC_S_KPU6_IP6_HOP_DEST, NPC_S_KPU6_IP6_HOP_DEST,
NPC_S_KPU6_IP6_ROUT, NPC_S_KPU6_IP6_ROUT,
@ -1117,15 +1117,6 @@ static struct npc_kpu_profile_cam kpu1_cam_entries[] = {
0x0000, 0x0000,
0x0000, 0x0000,
}, },
{
NPC_S_KPU1_ETHER, 0xff,
NPC_ETYPE_CTAG,
0xffff,
NPC_ETYPE_NGIO,
0xffff,
0x0000,
0x0000,
},
{ {
NPC_S_KPU1_ETHER, 0xff, NPC_S_KPU1_ETHER, 0xff,
NPC_ETYPE_CTAG, NPC_ETYPE_CTAG,
@ -1986,6 +1977,15 @@ static struct npc_kpu_profile_cam kpu2_cam_entries[] = {
0x0000, 0x0000,
0x0000, 0x0000,
}, },
{
NPC_S_KPU2_CTAG, 0xff,
NPC_ETYPE_NGIO,
0xffff,
0x0000,
0x0000,
0x0000,
0x0000,
},
{ {
NPC_S_KPU2_CTAG, 0xff, NPC_S_KPU2_CTAG, 0xff,
NPC_ETYPE_PPPOE, NPC_ETYPE_PPPOE,
@ -2877,15 +2877,6 @@ static struct npc_kpu_profile_cam kpu2_cam_entries[] = {
0x0000, 0x0000,
0x0000, 0x0000,
}, },
{
NPC_S_KPU2_NGIO, 0xff,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
},
{ {
NPC_S_KPU2_CPT_CTAG, 0xff, NPC_S_KPU2_CPT_CTAG, 0xff,
NPC_ETYPE_IP, NPC_ETYPE_IP,
@ -5205,6 +5196,15 @@ static struct npc_kpu_profile_cam kpu5_cam_entries[] = {
0x0000, 0x0000,
0x0000, 0x0000,
}, },
{
NPC_S_KPU5_NGIO, 0xff,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
},
{ {
NPC_S_NA, 0X00, NPC_S_NA, 0X00,
0x0000, 0x0000,
@ -8499,14 +8499,6 @@ static struct npc_kpu_profile_action kpu1_action_entries[] = {
0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
}, },
{
NPC_ERRLEV_RE, NPC_EC_NOERR,
8, 12, 0, 0, 0,
NPC_S_KPU2_NGIO, 12, 1,
NPC_LID_LA, NPC_LT_LA_ETHER,
0,
0, 0, 0, 0,
},
{ {
NPC_ERRLEV_RE, NPC_EC_NOERR, NPC_ERRLEV_RE, NPC_EC_NOERR,
8, 12, 0, 0, 0, 8, 12, 0, 0, 0,
@ -9291,6 +9283,14 @@ static struct npc_kpu_profile_action kpu2_action_entries[] = {
0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
}, },
{
NPC_ERRLEV_RE, NPC_EC_NOERR,
0, 0, 0, 2, 0,
NPC_S_KPU5_NGIO, 6, 1,
NPC_LID_LB, NPC_LT_LB_CTAG,
0,
0, 0, 0, 0,
},
{ {
NPC_ERRLEV_RE, NPC_EC_NOERR, NPC_ERRLEV_RE, NPC_EC_NOERR,
8, 0, 6, 2, 0, 8, 0, 6, 2, 0,
@ -10083,14 +10083,6 @@ static struct npc_kpu_profile_action kpu2_action_entries[] = {
NPC_F_LB_U_UNK_ETYPE | NPC_F_LB_L_EXDSA, NPC_F_LB_U_UNK_ETYPE | NPC_F_LB_L_EXDSA,
0, 0, 0, 0, 0, 0, 0, 0,
}, },
{
NPC_ERRLEV_RE, NPC_EC_NOERR,
0, 0, 0, 0, 1,
NPC_S_NA, 0, 1,
NPC_LID_LC, NPC_LT_LC_NGIO,
0,
0, 0, 0, 0,
},
{ {
NPC_ERRLEV_RE, NPC_EC_NOERR, NPC_ERRLEV_RE, NPC_EC_NOERR,
8, 0, 6, 2, 0, 8, 0, 6, 2, 0,
@ -12154,6 +12146,14 @@ static struct npc_kpu_profile_action kpu5_action_entries[] = {
0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
}, },
{
NPC_ERRLEV_RE, NPC_EC_NOERR,
0, 0, 0, 0, 1,
NPC_S_NA, 0, 1,
NPC_LID_LC, NPC_LT_LC_NGIO,
0,
0, 0, 0, 0,
},
{ {
NPC_ERRLEV_LC, NPC_EC_UNK, NPC_ERRLEV_LC, NPC_EC_UNK,
0, 0, 0, 0, 1, 0, 0, 0, 0, 1,