* [PATCH net] octeontx2-af: Consider the action set by PF
@ 2024-02-19 12:55 Subbaraya Sundeep
2024-02-21 11:20 ` patchwork-bot+netdevbpf
2024-02-21 11:24 ` Przemek Kitszel
0 siblings, 2 replies; 3+ messages in thread
From: Subbaraya Sundeep @ 2024-02-19 12:55 UTC (permalink / raw)
To: netdev, linux-kernel
Cc: davem, edumazet, kuba, pabeni, sgoutham, lcherian, gakula, hkelam,
naveenm, horms, Subbaraya Sundeep
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)
+ return;
+
/* copy VF default entry action to the VF mcam entry */
rx_action = npc_get_default_entry_action(rvu, mcam, blkaddr,
target_func);
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] octeontx2-af: Consider the action set by PF
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
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-02-21 11:20 UTC (permalink / raw)
To: Subbaraya Sundeep
Cc: netdev, linux-kernel, davem, edumazet, kuba, pabeni, sgoutham,
lcherian, gakula, hkelam, naveenm, horms
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:
On Mon, 19 Feb 2024 18:25:14 +0530 you 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.
>
> [...]
Here is the summary with links:
- [net] octeontx2-af: Consider the action set by PF
https://git.kernel.org/netdev/net/c/3b1ae9b71c2a
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] octeontx2-af: Consider the action set by PF
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
1 sibling, 0 replies; 3+ messages in thread
From: Przemek Kitszel @ 2024-02-21 11:24 UTC (permalink / raw)
To: Subbaraya Sundeep, netdev, linux-kernel
Cc: davem, edumazet, kuba, pabeni, sgoutham, lcherian, gakula, hkelam,
naveenm, horms
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-21 11:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).