public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] octeontx2-af: Harden rule validation.
@ 2023-08-09  6:40 Ratheesh Kannoth
  2023-08-10 14:34 ` Simon Horman
  2023-08-11  8:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Ratheesh Kannoth @ 2023-08-09  6:40 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: sgoutham, lcherian, gakula, jerinj, hkelam, sbhatta, davem,
	edumazet, kuba, pabeni, Ratheesh Kannoth

Accept TC offload classifier rule only if SPI field
can be extracted by HW.

Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
index 5c8f9fc15ff8..237f82082ebe 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
@@ -580,7 +580,9 @@ static void npc_set_features(struct rvu *rvu, int blkaddr, u8 intf)
 		if (!npc_check_field(rvu, blkaddr, NPC_LB, intf))
 			*features &= ~BIT_ULL(NPC_OUTER_VID);
 
-	if (*features & (BIT_ULL(NPC_IPPROTO_AH) | BIT_ULL(NPC_IPPROTO_ESP)))
+	/* Set SPI flag only if AH/ESP and IPSEC_SPI are in the key */
+	if (npc_check_field(rvu, blkaddr, NPC_IPSEC_SPI, intf) &&
+	    (*features & (BIT_ULL(NPC_IPPROTO_ESP) | BIT_ULL(NPC_IPPROTO_AH))))
 		*features |= BIT_ULL(NPC_IPSEC_SPI);
 
 	/* for vlan ethertypes corresponding layer type should be in the key */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] octeontx2-af: Harden rule validation.
  2023-08-09  6:40 [PATCH net-next] octeontx2-af: Harden rule validation Ratheesh Kannoth
@ 2023-08-10 14:34 ` Simon Horman
  2023-08-11  8:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2023-08-10 14:34 UTC (permalink / raw)
  To: Ratheesh Kannoth
  Cc: netdev, linux-kernel, sgoutham, lcherian, gakula, jerinj, hkelam,
	sbhatta, davem, edumazet, kuba, pabeni

On Wed, Aug 09, 2023 at 12:10:39PM +0530, Ratheesh Kannoth wrote:
> Accept TC offload classifier rule only if SPI field
> can be extracted by HW.
> 
> Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>

Reviewed-by: Simon Horman <horms@kernel.org>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] octeontx2-af: Harden rule validation.
  2023-08-09  6:40 [PATCH net-next] octeontx2-af: Harden rule validation Ratheesh Kannoth
  2023-08-10 14:34 ` Simon Horman
@ 2023-08-11  8:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-08-11  8:30 UTC (permalink / raw)
  To: Ratheesh Kannoth
  Cc: netdev, linux-kernel, sgoutham, lcherian, gakula, jerinj, hkelam,
	sbhatta, davem, edumazet, kuba, pabeni

Hello:

This patch was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:

On Wed, 9 Aug 2023 12:10:39 +0530 you wrote:
> Accept TC offload classifier rule only if SPI field
> can be extracted by HW.
> 
> Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>
> ---
>  drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Here is the summary with links:
  - [net-next] octeontx2-af: Harden rule validation.
    https://git.kernel.org/netdev/net-next/c/12aa0a3b93f3

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

end of thread, other threads:[~2023-08-11  8:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-09  6:40 [PATCH net-next] octeontx2-af: Harden rule validation Ratheesh Kannoth
2023-08-10 14:34 ` Simon Horman
2023-08-11  8:30 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox