octeontx2-pf: Add flow classification using IP next level protocol
Subsystems (4)
PATCH 1/1 octeontx2-pf: Add flow classification using IP next level protocol
This patch adds support to install flow rules using ipv4 proto or ipv6 next header field to distinguish between tcp/udp/sctp/esp/ah flows when user doesn't specify the other match creteria related to the flow such as tcp/udp/sctp source port and destination port, ah/esp spi value. This is achieved by matching the layer type extracted by NPC HW into the search key. Modified the driver to use Ethertype as match criteria when user doesn't specify source IP address and dest IP address. The esp/ah flow rule matching using security parameter index (spi) is not supported as of now since the field is not extracted into MCAM search key. Modified npc_check_field function to return bool.
--- drivers/net/ethernet/marvell/octeontx2/af/npc.h | 5 + .../ethernet/marvell/octeontx2/af/rvu_debugfs.c | 1 + .../net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 52 ++++++--- .../ethernet/marvell/octeontx2/nic/otx2_flows.c | 116 +++++++++++++++++++-- 4 files changed, 153 insertions(+), 21 deletions(-)
drivers/net/ethernet/marvell/octeontx2/af/npc.h +5 -0
@@ -162,6 +162,11 @@ enum key_fields {NPC_DIP_IPV4 ,NPC_SIP_IPV6 ,NPC_DIP_IPV6 , +NPC_IPPROTO_TCP , +NPC_IPPROTO_UDP , +NPC_IPPROTO_SCTP , +NPC_IPPROTO_AH , +NPC_IPPROTO_ESP ,NPC_SPORT_TCP ,NPC_DPORT_TCP , NPC_SPORT_UDP,
drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c +1 -0
@@ -1757,6 +1757,7 @@ static void rvu_dbg_npc_mcam_show_flows(struct seq_file *s,seq_printf (s,"mask 0x%x\n" ,ntohs (rule->mask.dport));break ;default : +seq_puts (s,"\n" );break ; } }
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c +39 -13
104 lines not on this page · raw message
drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c +108 -8
191 lines not on this page · raw message
Signature · 1 line
2.16.5
This patch was applied to netdev/net-next.git (refs/heads/master):
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
Quoted 11 lines · On Mon, 11 Jan 2021 16:55:37 +0530 you wrote:
This patch adds support to install flow rules using ipv4 proto or ipv6 next header field to distinguish between tcp/udp/sctp/esp/ah flows when user doesn't specify the other match creteria related to the flow such as tcp/udp/sctp source port and destination port, ah/esp spi value. This is achieved by matching the layer type extracted by NPC HW into the search key. Modified the driver to use Ethertype as match criteria when user doesn't specify source IP address and dest IP address. The esp/ah flow rule matching using security parameter index (spi) is not supported as of now since the field is not extracted into MCAM search key. Modified
npc_check_fieldfunction to return bool.
Quoted 1 line
[...]
Here is the summary with links:
- octeontx2-pf: Add flow classification using IP next level protocol
https://git.kernel.org/netdev/net-next/c/b7cf966126eb
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html