[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<SJ0PR18MB521633C59700B7C8DE352B76DB01A@SJ0PR18MB5216.namprd18.prod.outlook.com>
Date: Thu, 27 Jul 2023 05:03:56 +0000
From: Suman Ghosh <sumang@...vell.com>
To: Leon Romanovsky <leon@...nel.org>
CC: Sunil Kovvuri Goutham <sgoutham@...vell.com>,
Geethasowjanya Akula
<gakula@...vell.com>,
Subbaraya Sundeep Bhatta <sbhatta@...vell.com>,
Hariprasad Kelam <hkelam@...vell.com>,
"davem@...emloft.net"
<davem@...emloft.net>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"kuba@...nel.org" <kuba@...nel.org>,
"pabeni@...hat.com" <pabeni@...hat.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Linu Cherian
<lcherian@...vell.com>,
Jerin Jacob Kollanukkaran <jerinj@...vell.com>
Subject: RE: [EXT] Re: [net-next PATCH] octeontx2-af: Tc flower offload
support for inner VLAN
>> This patch extends current TC flower offload support to allow filters
>> involving inner VLAN matching, to be offloaded to HW.
>>
>> Example command:
>> tc filter add dev eth2 protocol 802.1AD parent ffff: flower vlan_id 10
>> vlan_ethtype 802.1Q cvlan_id 20 skip_sw action drop
>>
>> Signed-off-by: Suman Ghosh <sumang@...vell.com>
>> ---
>> .../net/ethernet/marvell/octeontx2/af/mbox.h | 1 +
>> .../net/ethernet/marvell/octeontx2/af/npc.h | 3 +
>> .../marvell/octeontx2/af/rvu_debugfs.c | 5 +
>> .../marvell/octeontx2/af/rvu_npc_fs.c | 13 +++
>> .../ethernet/marvell/octeontx2/nic/otx2_tc.c | 106
>> +++++++++++-------
>> 5 files changed, 90 insertions(+), 38 deletions(-)
>
><...>
>
>> + if (!is_inner)
>> + flow_rule_match_vlan(rule, &match);
>> + else
>> + flow_rule_match_cvlan(rule, &match);
>
><...>
>
>> + if (!is_inner) {
>> + flow_spec->vlan_tci = htons(vlan_tci);
>> + flow_mask->vlan_tci = htons(vlan_tci_mask);
>> + req->features |= BIT_ULL(NPC_OUTER_VID);
>> + } else {
>> + flow_spec->vlan_itci = htons(vlan_tci);
>> + flow_mask->vlan_itci = htons(vlan_tci_mask);
>> + req->features |= BIT_ULL(NPC_INNER_VID);
>> + }
>
>Slightly better approach will be to reverse these checks from "if
>(!is_inner)" to be "f (is_inner)".
>
>Other than that,
[Suman] Sure Leon. Will push a v2 addressing the same.
>Reviewed-by: Leon Romanovsky <leonro@...dia.com>
Powered by blists - more mailing lists