From: Leon Romanovsky <leon@kernel.org>
To: Suman Ghosh <sumang@marvell.com>
Cc: sgoutham@marvell.com, gakula@marvell.com, sbhatta@marvell.com,
hkelam@marvell.com, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [net-next PATCH V2] octeontx2-af: Install TC filter rules in hardware based on priority
Date: Mon, 17 Jul 2023 08:47:25 +0300 [thread overview]
Message-ID: <20230717054725.GB9461@unreal> (raw)
In-Reply-To: <20230716182442.2467328-1-sumang@marvell.com>
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@marvell.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.
> +
> + 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.
> +
<...>
> +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.
> struct npc_delete_flow_req *req;
> int err;
<...>
> + ntuple = !!(nic->netdev->features & NETIF_F_NTUPLE);
No need in !! for bool variables.
Thanks
next prev parent reply other threads:[~2023-07-17 5:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-16 18:24 [net-next PATCH V2] octeontx2-af: Install TC filter rules in hardware based on priority Suman Ghosh
2023-07-17 5:47 ` Leon Romanovsky [this message]
2023-07-18 4:32 ` [EXT] " Suman Ghosh
-- strict thread matches above, loose matches on Subject: below --
2023-07-16 18:26 Suman Ghosh
2023-07-17 5:50 ` Leon Romanovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230717054725.GB9461@unreal \
--to=leon@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gakula@marvell.com \
--cc=hkelam@marvell.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.com \
--cc=sumang@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.