From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
To: Subbaraya Sundeep <sbhatta@marvell.com>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Cc: <davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
<pabeni@redhat.com>, <sgoutham@marvell.com>,
<lcherian@marvell.com>, <gakula@marvell.com>,
<hkelam@marvell.com>, <naveenm@marvell.com>, <horms@kernel.org>
Subject: Re: [PATCH net] octeontx2-af: Consider the action set by PF
Date: Wed, 21 Feb 2024 12:24:22 +0100 [thread overview]
Message-ID: <a7f9e99b-e2ec-4acf-88d9-5d70de7b7588@intel.com> (raw)
In-Reply-To: <1708347314-21624-1-git-send-email-sbhatta@marvell.com>
On 2/19/24 13:55, Subbaraya Sundeep wrote:
> AF reserves MCAM entries for each PF, VF present in the
> system and populates the entry with DMAC and action with
> default RSS so that basic packet I/O works. Since PF/VF is
> not aware of the RSS action installed by AF, AF only fixup
> the actions of the rules installed by PF/VF with corresponding
> default RSS action. This worked well for rules installed by
> PF/VF for features like RX VLAN offload and DMAC filters but
> rules involving action like drop/forward to queue are also
> getting modified by AF. Hence fix it by setting the default
> RSS action only if requested by PF/VF.
>
> Fixes: 967db3529eca ("octeontx2-af: add support for multicast/promisc packet replication feature")
> Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
> ---
> drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
> index e5d6156..516adb5 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
> @@ -415,6 +415,10 @@ static void npc_fixup_vf_rule(struct rvu *rvu, struct npc_mcam *mcam,
> return;
> }
>
> + /* AF modifies given action iff PF/VF has requested for it */
> + if ((entry->action & 0xFULL) != NIX_RX_ACTION_DEFAULT)
this is a magic constant, even if nice sounding one
and it's equal to NIX_RX_ACTION_DEFAULT BTW, but it's incidental
(perhaps you should have two defines, one for mask, and one for action)
> + return;
> +
> /* copy VF default entry action to the VF mcam entry */
> rx_action = npc_get_default_entry_action(rvu, mcam, blkaddr,
> target_func);
Otherwise the patch makes sense
prev parent reply other threads:[~2024-02-21 11:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-19 12:55 [PATCH net] octeontx2-af: Consider the action set by PF Subbaraya Sundeep
2024-02-21 11:20 ` patchwork-bot+netdevbpf
2024-02-21 11:24 ` Przemek Kitszel [this message]
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=a7f9e99b-e2ec-4acf-88d9-5d70de7b7588@intel.com \
--to=przemyslaw.kitszel@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gakula@marvell.com \
--cc=hkelam@marvell.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=lcherian@marvell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=naveenm@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sbhatta@marvell.com \
--cc=sgoutham@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.