[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <SJ0PR18MB5216555C87CD36768503D923DB38A@SJ0PR18MB5216.namprd18.prod.outlook.com>
Date: Tue, 18 Jul 2023 04:32:25 +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>
Subject: RE: [EXT] Re: [net-next PATCH V2] octeontx2-af: Install TC filter
rules in hardware based on priority
>On Sun, Jul 16, 2023 at 11:54:42PM +0530, Suman Ghosh wrote:
>> As of today, hardware does not support installing tc filter rules
>> based on priority. This patch fixes the issue and install the hardware
>> rules based on priority. The final hardware rules will not be
>> dependent on rule installation order, it will be strictly priority
>> based, same as software.
>>
>> Signed-off-by: Suman Ghosh <sumang@...vell.com>
>> ---
>> Changes since v1:
>> - Rebased the patch on top of current 'main' branch
>>
>> .../net/ethernet/marvell/octeontx2/af/mbox.h | 9 +-
>> .../marvell/octeontx2/af/rvu_npc_fs.c | 9 +-
>> .../marvell/octeontx2/af/rvu_switch.c | 6 +-
>> .../marvell/octeontx2/nic/otx2_common.h | 11 +-
>> .../marvell/octeontx2/nic/otx2_devlink.c | 1 -
>> .../marvell/octeontx2/nic/otx2_ethtool.c | 1 +
>> .../marvell/octeontx2/nic/otx2_flows.c | 2 +
>> .../ethernet/marvell/octeontx2/nic/otx2_tc.c | 313
>> +++++++++++++-----
>> 8 files changed, 248 insertions(+), 104 deletions(-)
>
><...>
>
>> +static void otx2_tc_del_from_flow_list(struct otx2_flow_config
>*flow_cfg,
>> + struct otx2_tc_flow *node)
>> {
>> + struct otx2_tc_flow *tmp;
>> + struct list_head *pos, *n;
>
>Please declared variables in rversed Christmas tree, in all places,
>thanks.
[Suman] Ack, will update in v3 patch.
>
>> +
>> + list_for_each_safe(pos, n, &flow_cfg->flow_list_tc) {
>> + tmp = list_entry(pos, struct otx2_tc_flow, list);
>> + if (node == tmp) {
>> + list_del(&node->list);
>> + return;
>> + }
>> + }
>> +}
>> +
>> +static int otx2_tc_add_to_flow_list(struct otx2_flow_config
>*flow_cfg,
>> + struct otx2_tc_flow *node)
>> +{
>> + struct otx2_tc_flow *tmp;
>> + struct list_head *pos, *n;
>> + int index = 0;
>
>Ditto.
[Suman] Ack, will update in v3 patch.
>
>> +
>
><...>
>
>> +static int otx2_del_mcam_flow_entry(struct otx2_nic *nic, u16 entry,
>> +u16 *cntr_val) {
>> + struct npc_delete_flow_rsp __maybe_unused *rsp;
>
>Why __maybe_unused? This keyword is usually used when in some CONFIG_*
>option, it won't be used. It is not the case here.
[Suman] Ack, not needed her. Will update in v3 patch
>
>> struct npc_delete_flow_req *req;
>> int err;
>
><...>
>
>> + ntuple = !!(nic->netdev->features & NETIF_F_NTUPLE);
>
>No need in !! for bool variables.
[Suman] Ack, will update in v3 patch.
>
>Thanks
Powered by blists - more mailing lists