From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To: dev@dpdk.org
Cc: John McNamara <john.mcnamara@intel.com>
Subject: [dpdk-dev] [PATCH 3/5] ethdev: clarify MARK and FLAG actions in flow API
Date: Tue, 10 Jan 2017 14:08:28 +0100 [thread overview]
Message-ID: <603311a3e4fb0e0d86939a0e3a5db4386b259445.1484046037.git.adrien.mazarguil@6wind.com> (raw)
In-Reply-To: <cover.1484046037.git.adrien.mazarguil@6wind.com>
Both actions share the PKT_RX_FDIR mbuf flag, as a result there is no way
to tell them apart. Moreover, the maximum allowed value for the MARK action
may not necessarily cover the entire 32-bit space.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Cc: John McNamara <john.mcnamara@intel.com>
---
doc/guides/prog_guide/rte_flow.rst | 24 ++++++++++++------------
lib/librte_ether/rte_flow.h | 19 ++++++++++---------
2 files changed, 22 insertions(+), 21 deletions(-)
diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
index f415a73..a6acbbf 100644
--- a/doc/guides/prog_guide/rte_flow.rst
+++ b/doc/guides/prog_guide/rte_flow.rst
@@ -1049,31 +1049,31 @@ flow rules:
Action: ``MARK``
^^^^^^^^^^^^^^^^
-Attaches a 32 bit value to packets.
+Attaches an integer value to packets and sets ``PKT_RX_FDIR`` and
+``PKT_RX_FDIR_ID`` mbuf flags.
-This value is arbitrary and application-defined. For compatibility with FDIR
-it is returned in the ``hash.fdir.hi`` mbuf field. ``PKT_RX_FDIR_ID`` is
-also set in ``ol_flags``.
+This value is arbitrary and application-defined. Maximum allowed value
+depends on the underlying implementation. It is returned in the
+``hash.fdir.hi`` mbuf field.
.. _table_rte_flow_action_mark:
.. table:: MARK
- +--------+-------------------------------------+
- | Field | Value |
- +========+=====================================+
- | ``id`` | 32 bit value to return with packets |
- +--------+-------------------------------------+
+ +--------+--------------------------------------+
+ | Field | Value |
+ +========+======================================+
+ | ``id`` | integer value to return with packets |
+ +--------+--------------------------------------+
Action: ``FLAG``
^^^^^^^^^^^^^^^^
-Flag packets. Similar to `Action: MARK`_ but only affects ``ol_flags``.
+Flags packets. Similar to `Action: MARK`_ without a specific value; only
+sets the ``PKT_RX_FDIR`` mbuf flag.
- No configurable properties.
-Note: a distinctive flag must be defined for it.
-
.. _table_rte_flow_action_flag:
.. table:: FLAG
diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h
index 98084ac..c2b9fc5 100644
--- a/lib/librte_ether/rte_flow.h
+++ b/lib/librte_ether/rte_flow.h
@@ -556,7 +556,8 @@ enum rte_flow_action_type {
/**
* [META]
*
- * Attaches a 32 bit value to packets.
+ * Attaches an integer value to packets and sets PKT_RX_FDIR and
+ * PKT_RX_FDIR_ID mbuf flags.
*
* See struct rte_flow_action_mark.
*/
@@ -565,9 +566,8 @@ enum rte_flow_action_type {
/**
* [META]
*
- * Flag packets. Similar to MARK but only affects ol_flags.
- *
- * Note: a distinctive flag must be defined for it.
+ * Flags packets. Similar to MARK without a specific value; only
+ * sets the PKT_RX_FDIR mbuf flag.
*
* No associated configuration structure.
*/
@@ -640,14 +640,15 @@ enum rte_flow_action_type {
/**
* RTE_FLOW_ACTION_TYPE_MARK
*
- * Attaches a 32 bit value to packets.
+ * Attaches an integer value to packets and sets PKT_RX_FDIR and
+ * PKT_RX_FDIR_ID mbuf flags.
*
- * This value is arbitrary and application-defined. For compatibility with
- * FDIR it is returned in the hash.fdir.hi mbuf field. PKT_RX_FDIR_ID is
- * also set in ol_flags.
+ * This value is arbitrary and application-defined. Maximum allowed value
+ * depends on the underlying implementation. It is returned in the
+ * hash.fdir.hi mbuf field.
*/
struct rte_flow_action_mark {
- uint32_t id; /**< 32 bit value to return with packets. */
+ uint32_t id; /**< Integer value to return with packets. */
};
/**
--
2.1.4
next prev parent reply other threads:[~2017-01-10 13:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-10 13:08 [dpdk-dev] [PATCH 0/5] Assorted fixes for the " Adrien Mazarguil
2017-01-10 13:08 ` [dpdk-dev] [PATCH 1/5] app/testpmd: fix array bounds checks Adrien Mazarguil
2017-01-10 13:08 ` [dpdk-dev] [PATCH 2/5] ethdev: modify flow API's error setting function Adrien Mazarguil
2017-01-10 13:08 ` Adrien Mazarguil [this message]
2017-01-10 13:08 ` [dpdk-dev] [PATCH 4/5] ethdev: clarify RSS action in flow API Adrien Mazarguil
2017-01-10 13:08 ` [dpdk-dev] [PATCH 5/5] ethdev: define default item masks " Adrien Mazarguil
2017-01-11 15:57 ` [dpdk-dev] [PATCH 0/5] Assorted fixes for the " Thomas Monjalon
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=603311a3e4fb0e0d86939a0e3a5db4386b259445.1484046037.git.adrien.mazarguil@6wind.com \
--to=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
--cc=john.mcnamara@intel.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).