[3/5] net/mlx5: support match on IPv6 fragment packets
diff mbox series

Message ID 42f210b14cc615d9bd0787ef7e68e55c8dca67ae.1602598055.git.dekelp@nvidia.com
State Superseded, archived
Delegated to: Raslan Darawsheh
Headers show
Series
  • net/mlx5: support match on L3 fragmented packets
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Dekel Peled Oct. 13, 2020, 2:16 p.m. UTC
This patch adds to MLX5 PMD the support of matching on IPv6
fragmented and non-fragmented packets, using the new field
has_frag_ext, added to rte_flow following RFC [1].

[1] https://mails.dpdk.org/archives/dev/2020-August/177257.html

Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 doc/guides/rel_notes/release_20_11.rst | 2 +-
 drivers/net/mlx5/mlx5_flow_dv.c        | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
index 792d547..ceb4770 100644
--- a/doc/guides/rel_notes/release_20_11.rst
+++ b/doc/guides/rel_notes/release_20_11.rst
@@ -152,7 +152,7 @@  New Features
 
   Updated Mellanox mlx5 driver with new features and improvements, including:
 
-  * Added support for matching on fragmented/non-fragmented IPv4 packets.
+  * Added support for matching on fragmented/non-fragmented IPv4/IPv6 packets.
 
 Removed Items
 -------------
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 08e6f74..6f7377b 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -5211,6 +5211,7 @@  struct field_modify_info modify_tcp[] = {
 			.proto = 0xff,
 			.hop_limits = 0xff,
 		},
+		.has_frag_ext = 1,
 	};
 	const struct rte_flow_item_ecpri nic_ecpri_mask = {
 		.hdr = {
@@ -6519,6 +6520,10 @@  struct field_modify_info modify_tcp[] = {
 		 ipv6_m->hdr.hop_limits);
 	MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_ttl_hoplimit,
 		 ipv6_v->hdr.hop_limits & ipv6_m->hdr.hop_limits);
+	MLX5_SET(fte_match_set_lyr_2_4, headers_m, frag,
+		 !!(ipv6_m->has_frag_ext));
+	MLX5_SET(fte_match_set_lyr_2_4, headers_v, frag,
+		 !!(ipv6_v->has_frag_ext & ipv6_m->has_frag_ext));
 }
 
 /**