DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dekel Peled <dekelp@nvidia.com>
To: matan@nvidia.com, shahafs@nvidia.com, viacheslavo@nvidia.com
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v2 3/5] net/mlx5: support match on IPv6 fragment packets
Date: Thu, 15 Oct 2020 17:05:55 +0300
Message-ID: <3098502b1635b489078285c118d3807b06a9fc44.1602770369.git.dekelp@nvidia.com> (raw)
In-Reply-To: <cover.1602770369.git.dekelp@nvidia.com>

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(-)

diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
index 18e2c5e..097117e 100644
--- a/doc/guides/rel_notes/release_20_11.rst
+++ b/doc/guides/rel_notes/release_20_11.rst
@@ -218,7 +218,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 ff97f78..b61a361 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -5417,6 +5417,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 = {
@@ -6734,6 +6735,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));
 }
 
 /**
-- 
1.8.3.1


  parent reply	other threads:[~2020-10-15 14:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-13 14:16 [dpdk-dev] [PATCH 0/5] net/mlx5: support match on L3 fragmented packets Dekel Peled
2020-10-13 14:16 ` [dpdk-dev] [PATCH 1/5] net/mlx5: remove handling of ICMP " Dekel Peled
2020-10-13 14:16 ` [dpdk-dev] [PATCH 2/5] net/mlx5: support match on IPv4 fragment packets Dekel Peled
2020-10-13 14:16 ` [dpdk-dev] [PATCH 3/5] net/mlx5: support match on IPv6 " Dekel Peled
2020-10-13 14:16 ` [dpdk-dev] [PATCH 4/5] net/mlx5: support match on IPv6 fragment ext. item Dekel Peled
2020-10-13 14:16 ` [dpdk-dev] [PATCH 5/5] net/mlx5: enforce limitation on IPv6 next proto Dekel Peled
2020-10-15 14:05 ` [dpdk-dev] [PATCH v2 0/5] net/mlx5: support match on L3 fragmented packets Dekel Peled
2020-10-15 14:05   ` [dpdk-dev] [PATCH v2 1/5] net/mlx5: remove handling of ICMP " Dekel Peled
2020-10-15 14:05   ` [dpdk-dev] [PATCH v2 2/5] net/mlx5: support match on IPv4 fragment packets Dekel Peled
2020-10-15 14:05   ` Dekel Peled [this message]
2020-10-15 14:05   ` [dpdk-dev] [PATCH v2 4/5] net/mlx5: support match on IPv6 fragment ext. item Dekel Peled
2020-10-15 14:05   ` [dpdk-dev] [PATCH v2 5/5] net/mlx5: enforce limitation on IPv6 next proto Dekel Peled
2020-10-18 15:14   ` [dpdk-dev] [PATCH v2 0/5] net/mlx5: support match on L3 fragmented packets Raslan Darawsheh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3098502b1635b489078285c118d3807b06a9fc44.1602770369.git.dekelp@nvidia.com \
    --to=dekelp@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=shahafs@nvidia.com \
    --cc=viacheslavo@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git