Add possibility to use RTE_FLOW_ACTION_TYPE_MARK

Signed-off-by: Serhii Iliushyk <sil-...@napatech.com>
---
 doc/guides/nics/features/ntnic.ini               |  1 +
 .../profile_inline/flow_api_profile_inline.c     | 16 ++++++++++++++++
 2 files changed, 17 insertions(+)

diff --git a/doc/guides/nics/features/ntnic.ini 
b/doc/guides/nics/features/ntnic.ini
index 5b3c26da05..42ac9f9c31 100644
--- a/doc/guides/nics/features/ntnic.ini
+++ b/doc/guides/nics/features/ntnic.ini
@@ -17,5 +17,6 @@ x86-64               = Y
 any                  = Y
 
 [rte_flow actions]
+mark                 = Y
 port_id              = Y
 queue                = Y
diff --git 
a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.c 
b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.c
index a3fe2fe902..96b7192edc 100644
--- a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.c
+++ b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.c
@@ -386,6 +386,22 @@ static int interpret_flow_actions(const struct 
flow_eth_dev *dev,
 
                        break;
 
+               case RTE_FLOW_ACTION_TYPE_MARK:
+                       NT_LOG(DBG, FILTER, "Dev:%p: 
RTE_FLOW_ACTION_TYPE_MARK", dev);
+
+                       if (action[aidx].conf) {
+                               struct rte_flow_action_mark mark_tmp;
+                               const struct rte_flow_action_mark *mark =
+                                       memcpy_mask_if(&mark_tmp, 
action[aidx].conf,
+                                       action_mask ? action_mask[aidx].conf : 
NULL,
+                                       sizeof(struct rte_flow_action_mark));
+
+                               fd->mark = mark->id;
+                               NT_LOG(DBG, FILTER, "Mark: %i", mark->id);
+                       }
+
+                       break;
+
                default:
                        NT_LOG(ERR, FILTER, "Invalid or unsupported flow action 
received - %i",
                                action[aidx].type);
-- 
2.45.0

Reply via email to