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

flm stat module interface was added.

Signed-off-by: Danylo Vodopianov <dvo-...@napatech.com>
---
 drivers/net/ntnic/include/flow_api.h       |  2 ++
 drivers/net/ntnic/include/flow_filter.h    |  1 +
 drivers/net/ntnic/nthw/flow_api/flow_api.c | 11 +++++++++++
 drivers/net/ntnic/ntnic_mod_reg.h          |  2 ++
 4 files changed, 16 insertions(+)

diff --git a/drivers/net/ntnic/include/flow_api.h 
b/drivers/net/ntnic/include/flow_api.h
index 4a1525f237..ed96f77bc0 100644
--- a/drivers/net/ntnic/include/flow_api.h
+++ b/drivers/net/ntnic/include/flow_api.h
@@ -233,4 +233,6 @@ int flow_nic_set_hasher(struct flow_nic_dev *ndev, int 
hsh_idx, enum flow_nic_ha
 int flow_nic_set_hasher_fields(struct flow_nic_dev *ndev, int hsh_idx,
        struct nt_eth_rss_conf rss_conf);
 
+int flow_get_flm_stats(struct flow_nic_dev *ndev, uint64_t *data, uint64_t 
size);
+
 #endif
diff --git a/drivers/net/ntnic/include/flow_filter.h 
b/drivers/net/ntnic/include/flow_filter.h
index d204c0d882..01777f8c9f 100644
--- a/drivers/net/ntnic/include/flow_filter.h
+++ b/drivers/net/ntnic/include/flow_filter.h
@@ -11,5 +11,6 @@
 
 int flow_filter_init(nthw_fpga_t *p_fpga, struct flow_nic_dev **p_flow_device, 
int adapter_no);
 int flow_filter_done(struct flow_nic_dev *dev);
+int flow_get_flm_stats(struct flow_nic_dev *ndev, uint64_t *data, uint64_t 
size);
 
 #endif  /* __FLOW_FILTER_HPP__ */
diff --git a/drivers/net/ntnic/nthw/flow_api/flow_api.c 
b/drivers/net/ntnic/nthw/flow_api/flow_api.c
index aac3144cc0..e953fc1a12 100644
--- a/drivers/net/ntnic/nthw/flow_api/flow_api.c
+++ b/drivers/net/ntnic/nthw/flow_api/flow_api.c
@@ -1048,6 +1048,16 @@ int flow_nic_set_hasher_fields(struct flow_nic_dev 
*ndev, int hsh_idx,
        return profile_inline_ops->flow_nic_set_hasher_fields_inline(ndev, 
hsh_idx, rss_conf);
 }
 
+int flow_get_flm_stats(struct flow_nic_dev *ndev, uint64_t *data, uint64_t 
size)
+{
+       (void)ndev;
+       (void)data;
+       (void)size;
+
+       NT_LOG_DBGX(DBG, FILTER, "Not implemented yet");
+       return -1;
+}
+
 static const struct flow_filter_ops ops = {
        .flow_filter_init = flow_filter_init,
        .flow_filter_done = flow_filter_done,
@@ -1062,6 +1072,7 @@ static const struct flow_filter_ops ops = {
        .flow_destroy = flow_destroy,
        .flow_flush = flow_flush,
        .flow_dev_dump = flow_dev_dump,
+       .flow_get_flm_stats = flow_get_flm_stats,
 
        /*
         * Other
diff --git a/drivers/net/ntnic/ntnic_mod_reg.h 
b/drivers/net/ntnic/ntnic_mod_reg.h
index 8b825d8c48..8703d478b6 100644
--- a/drivers/net/ntnic/ntnic_mod_reg.h
+++ b/drivers/net/ntnic/ntnic_mod_reg.h
@@ -336,6 +336,8 @@ struct flow_filter_ops {
        int (*flow_flush)(struct flow_eth_dev *dev, uint16_t caller_id,
                struct rte_flow_error *error);
 
+       int (*flow_get_flm_stats)(struct flow_nic_dev *ndev, uint64_t *data, 
uint64_t size);
+
        /*
         * Other
         */
-- 
2.45.0

Reply via email to