Skip to contentSkip to conversation

octeontx2-af: Allow mkex profile without DMAC and add L2M/L2B header extraction support

PATCH Applied Suman Ghosh 2 participants 2 messages Oct 31, 2022 – Nov 3, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 octeontx2-af: Allow mkex profile without DMAC and add L2M/L2B header extraction support

1. It is possible to have custom mkex profiles which do not extract DMAC at all into the key. Hence allow mkex profiles which do not have DMAC to be loaded into MCAM hardware. This patch also adds debugging prints needed to identify profiles with wrong configuration.

2. If a mkex profile set "l2l3mb" field for Rx interface, then Rx multicast and broadcast entry should be configured.

---
 .../net/ethernet/marvell/octeontx2/af/npc.h   |  1 +
 .../marvell/octeontx2/af/rvu_debugfs.c        |  6 ++
 .../marvell/octeontx2/af/rvu_npc_fs.c         | 81 ++++++++++++++-----
 3 files changed, 70 insertions(+), 18 deletions(-)
drivers/net/ethernet/marvell/octeontx2/af/npc.h +1 -0
index f187293e3e08..d027c23b8ef8 100644
@@ -620,6 +620,7 @@ struct rvu_npc_mcam_rule {
 	bool vfvlan_cfg;
 	u16 chan;
 	u16 chan_mask;
+	u8 lxmb;
 };
 
 #endif /* NPC_H */
drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c +6 -0
index a1970ebedf95..642e58a04da0 100644
@@ -2756,6 +2756,12 @@ static void rvu_dbg_npc_mcam_show_flows(struct seq_file *s,
 	for_each_set_bit(bit, (unsigned long *)&rule->features, 64) {
 		seq_printf(s, "\t%s  ", npc_get_field_name(bit));
 		switch (bit) {
+		case NPC_LXMB:
+			if (rule->lxmb == 1)
+				seq_puts(s, "\tL2M nibble is set\n");
+			else
+				seq_puts(s, "\tL2B nibble is set\n");
+			break;
 		case NPC_DMAC:
 			seq_printf(s, "%pM ", rule->packet.dmac);
 			seq_printf(s, "mask %pM\n", rule->mask.dmac);
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c +63 -18

167 lines not on this page · raw message

Signature · 1 line
2.25.1
#1 lore raw
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Quoted 10 lines · On Mon, 31 Oct 2022 14:38:56 +0530 you wrote:

1. It is possible to have custom mkex profiles which do not extract DMAC at all into the key. Hence allow mkex profiles which do not have DMAC to be loaded into MCAM hardware. This patch also adds debugging prints needed to identify profiles with wrong configuration.

2. If a mkex profile set "l2l3mb" field for Rx interface, then Rx multicast and broadcast entry should be configured.

[...]

Here is the summary with links:
- [net-next] octeontx2-af: Allow mkex profile without DMAC and add L2M/L2B header extraction support

    https://git.kernel.org/netdev/net-next/c/2cee6401c4ea

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html