[v3,3/7] ethdev: add flow action type update as an offload
Checks
Commit Message
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Add new Rx offload flag `DEV_RX_OFFLOAD_FLOW_MARK` that can be used to
enable/disable PMDs write to `rte_mbuf::hash::fdir::hi` and
`rte_mbuf::ol_flags` when flow actions `RTE_FLOW_ACTION_MARK` and
`RTE_FLOW_ACTION_FLAG` are enabled.
PMDs notify the validity of `rte_mbuf::hash:fdir::hi` to the applcation
by enabling `PKT_RX_FDIR_ID` flag in `rte_mbuf::ol_flags`.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
doc/guides/nics/features.rst | 12 ++++++++++++
doc/guides/rel_notes/release_19_11.rst | 9 +++++++++
lib/librte_ethdev/rte_ethdev.c | 1 +
lib/librte_ethdev/rte_ethdev.h | 1 +
lib/librte_ethdev/rte_flow.h | 6 ++++--
5 files changed, 27 insertions(+), 2 deletions(-)
@@ -594,6 +594,18 @@ Allows application to set ptypes it is interested in.
* **[provides] mbuf**: ``mbuf.packet_type``.
+.. _nic_features_flow_flag_mark:
+
+Flow flag/mark update
+---------------------
+
+Supports flow action type update to ``mbuf.ol_flags`` and ``mbuf.hash.fdir.hi``.
+
+* **[uses] rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_FLOW_MARK``.
+* **[provides] mbuf**: ``mbuf.ol_flags:PKT_RX_FDIR``, ``mbuf.ol_flags:PKT_RX_FDIR_ID;``,
+ ``mbuf.hash.fdir.hi``
+
+
.. _nic_features_timesync:
Timesync
@@ -71,6 +71,15 @@ New Features
* PMDs notify the validity of `rte_mbuf::hash:rss` to the applcation
by enabling `PKT_RX_RSS_HASH ` flag in `rte_mbuf::ol_flags`.
+* **Added Rx offload flag to enable or diable flow action type update**
+
+ * Add new Rx offload flag `DEV_RX_OFFLOAD_FLOW_MARK` that can be used to
+ enable/disable PMDs write to `rte_mbuf::hash::fdir::hi` and
+ `rte_mbuf::ol_flags` when flow actions `RTE_FLOW_ACTION_MARK` and
+ `RTE_FLOW_ACTION_FLAG` are enabled.
+ * PMDs notify the validity of `rte_mbuf::hash:fdir::hi` to the applcation
+ by enabling `PKT_RX_FDIR_ID` flag in `rte_mbuf::ol_flags`.
+
Removed Items
-------------
@@ -130,6 +130,7 @@ static const struct {
RTE_RX_OFFLOAD_BIT2STR(SCTP_CKSUM),
RTE_RX_OFFLOAD_BIT2STR(OUTER_UDP_CKSUM),
RTE_RX_OFFLOAD_BIT2STR(RSS_HASH),
+ RTE_RX_OFFLOAD_BIT2STR(FLOW_MARK),
};
#undef RTE_RX_OFFLOAD_BIT2STR
@@ -1014,6 +1014,7 @@ struct rte_eth_conf {
#define DEV_RX_OFFLOAD_SCTP_CKSUM 0x00020000
#define DEV_RX_OFFLOAD_OUTER_UDP_CKSUM 0x00040000
#define DEV_RX_OFFLOAD_RSS_HASH 0x00080000
+#define DEV_RX_OFFLOAD_FLOW_MARK 0x00100000
#define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \
DEV_RX_OFFLOAD_UDP_CKSUM | \
@@ -1316,7 +1316,8 @@ enum rte_flow_action_type {
/**
* Attaches an integer value to packets and sets PKT_RX_FDIR and
- * PKT_RX_FDIR_ID mbuf flags.
+ * PKT_RX_FDIR_ID mbuf flags when
+ * `rx_mode:offloads:DEV_RX_OFFLOAD_FLOW_MARK` is enabled.
*
* See struct rte_flow_action_mark.
*/
@@ -1324,7 +1325,8 @@ enum rte_flow_action_type {
/**
* Flags packets. Similar to MARK without a specific value; only
- * sets the PKT_RX_FDIR mbuf flag.
+ * sets the PKT_RX_FDIR mbuf flag when
+ * `rx_mode:offloads:DEV_RX_OFFLOAD_FLOW_MARK` is enabled.
*
* No associated configuration structure.
*/