From: Danylo Vodopianov <dvo-...@napatech.com>

flow_filter_ops was extended with flow action update API.

Signed-off-by: Danylo Vodopianov <dvo-...@napatech.com>
---
 drivers/net/ntnic/nthw/flow_api/flow_api.c       | 16 ++++++++++++++++
 .../profile_inline/flow_api_profile_inline.h     |  5 +++++
 2 files changed, 21 insertions(+)

diff --git a/drivers/net/ntnic/nthw/flow_api/flow_api.c 
b/drivers/net/ntnic/nthw/flow_api/flow_api.c
index 5349dc84ab..9164f4cc2e 100644
--- a/drivers/net/ntnic/nthw/flow_api/flow_api.c
+++ b/drivers/net/ntnic/nthw/flow_api/flow_api.c
@@ -266,6 +266,21 @@ static int flow_flush(struct flow_eth_dev *dev, uint16_t 
caller_id, struct rte_f
        return profile_inline_ops->flow_flush_profile_inline(dev, caller_id, 
error);
 }
 
+static int flow_actions_update(struct flow_eth_dev *dev,
+       struct flow_handle *flow,
+       const struct rte_flow_action action[],
+       struct rte_flow_error *error)
+{
+       const struct profile_inline_ops *profile_inline_ops = 
get_profile_inline_ops();
+
+       if (profile_inline_ops == NULL) {
+               NT_LOG_DBGX(ERR, FILTER, "profile_inline module uninitialized");
+               return -1;
+       }
+
+       return profile_inline_ops->flow_actions_update_profile_inline(dev, 
flow, action, error);
+}
+
 /*
  * Device Management API
  */
@@ -1127,6 +1142,7 @@ static const struct flow_filter_ops ops = {
        .flow_create = flow_create,
        .flow_destroy = flow_destroy,
        .flow_flush = flow_flush,
+       .flow_actions_update = flow_actions_update,
        .flow_dev_dump = flow_dev_dump,
        .flow_get_flm_stats = flow_get_flm_stats,
        .flow_get_aged_flows = flow_get_aged_flows,
diff --git 
a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.h 
b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.h
index ea1d9c31b2..8a03be1ab7 100644
--- a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.h
+++ b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.h
@@ -42,6 +42,11 @@ int flow_flush_profile_inline(struct flow_eth_dev *dev,
        uint16_t caller_id,
        struct rte_flow_error *error);
 
+int flow_actions_update_profile_inline(struct flow_eth_dev *dev,
+       struct flow_handle *flow,
+       const struct rte_flow_action action[],
+       struct rte_flow_error *error);
+
 int flow_dev_dump_profile_inline(struct flow_eth_dev *dev,
        struct flow_handle *flow,
        uint16_t caller_id,
-- 
2.45.0

Reply via email to