From: Dekel Peled <dekelp@mellanox.com>
To: "ferruh.yigit@intel.com" <ferruh.yigit@intel.com>,
"arybchenko@solarflare.com" <arybchenko@solarflare.com>,
Ori Kam <orika@mellanox.com>,
"john.mcnamara@intel.com" <john.mcnamara@intel.com>,
"Kovacevic, Marko" <marko.kovacevic@intel.com>
Cc: Asaf Penso <asafp@mellanox.com>, Matan Azrad <matan@mellanox.com>,
Eli Britstein <elibr@mellanox.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: [dpdk-dev] [RFC] ethdev: add IPv6 fragment extension header item
Date: Wed, 18 Mar 2020 16:46:00 +0000 [thread overview]
Message-ID: <AM4PR05MB346028872FE2236D90CA1DE4B6F70@AM4PR05MB3460.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <AM4PR05MB34601FD61A89BE0A2CD8B6BEB6F70@AM4PR05MB3460.eurprd05.prod.outlook.com>
Applications handling fragmented IPv6 packets need to match on IPv6 fragment extension header,
in order to identify the fragments order and location in the packet.
This RFC introduced the IPv6 fragment extension header item.
Signed-off-by: Dekel Peled <dekelp@mellanox.com<mailto:dekelp@mellanox.com>>
---
diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
index 41c1479..fd8d5b7 100644
--- a/doc/guides/prog_guide/rte_flow.rst
+++ b/doc/guides/prog_guide/rte_flow.rst
@@ -1170,6 +1170,19 @@ Normally preceded by any of:
- `Item: IPV6`_
- `Item: IPV6_EXT`_
+Item: ``IPV6_FRAG_EXT``
+^^^^^^^^^^^^^^^^^^^^^^^
+
+Matches the presence of IPv6 fragment extension header.
+
+- ``hdr``: IPv6 fragment extension header definition (``rte_ip_frag.h``).
+- Default ``mask`` matches next_header and frag_data fields only.
+
+Preceded by any of:
+
+- `Item: IPV6`_
+- `Item: IPV6_EXT`_
+
Item: ``ICMP6``
^^^^^^^^^^^^^^^
diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
index b43238b..7f30a09 100644
--- a/lib/librte_ethdev/rte_flow.h
+++ b/lib/librte_ethdev/rte_flow.h
@@ -30,6 +30,7 @@
#include <rte_higig.h>
#include <rte_mbuf.h>
#include <rte_mbuf_dyn.h>
+#include <rte_ip_frag.h>
#ifdef __cplusplus
extern "C" {
@@ -367,6 +368,13 @@ enum rte_flow_item_type {
RTE_FLOW_ITEM_TYPE_IPV6_EXT,
/**
+ * Matches the presence of IPv6 fragment extension header.
+ *
+ * See struct rte_flow_item_ipv6_frag_ext.
+ */
+ RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT,
+
+ /**
* Matches any ICMPv6 header.
*
* See struct rte_flow_item_icmp6.
@@ -1149,6 +1157,31 @@ struct rte_flow_item_ipv6_ext rte_flow_item_ipv6_ext_mask = {
#endif
/**
+ * RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT
+ *
+ * Matches the presence of IPv6 fragment extension header.
+ *
+ * Preceded by any of:
+ *
+ * - RTE_FLOW_ITEM_TYPE_IPV6
+ * - RTE_FLOW_ITEM_TYPE_IPV6_EXT
+ */
+struct rte_flow_item_ipv6_frag_ext {
+ struct ipv6_extension_fragment hdr;
+};
+
+/** Default mask for RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT. */
+#ifndef __cplusplus
+static const
+struct rte_flow_item_ipv6_frag_ext rte_flow_item_ipv6_frag_ext_mask = {
+ .hdr = {
+ .next_header = 0xff,
+ .frag_data = RTE_BE16(0xffff),
+ },
+};
+#endif
+
+/**
* RTE_FLOW_ITEM_TYPE_ICMP6
*
* Matches any ICMPv6 header.
parent reply other threads:[~2020-03-18 16:46 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <AM4PR05MB34601FD61A89BE0A2CD8B6BEB6F70@AM4PR05MB3460.eurprd05.prod.outlook.com>]
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=AM4PR05MB346028872FE2236D90CA1DE4B6F70@AM4PR05MB3460.eurprd05.prod.outlook.com \
--to=dekelp@mellanox.com \
--cc=arybchenko@solarflare.com \
--cc=asafp@mellanox.com \
--cc=dev@dpdk.org \
--cc=elibr@mellanox.com \
--cc=ferruh.yigit@intel.com \
--cc=john.mcnamara@intel.com \
--cc=marko.kovacevic@intel.com \
--cc=matan@mellanox.com \
--cc=orika@mellanox.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).