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

Add age event generating only for physical ports.

Fixes: 4033e0539435 ("net/ntnic: add flow meter")

Signed-off-by: Danylo Vodopianov <dvo-...@napatech.com>
---
 .../nthw/flow_api/profile_inline/flow_api_profile_inline.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

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 e5abd372bc..e911860c38 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
@@ -479,13 +479,16 @@ static void flm_mtr_read_inf_records(struct flow_eth_dev 
*dev, uint32_t *data, u
                                struct flow_handle *fh = (struct flow_handle 
*)flm_h.p;
                                struct flm_age_event_s age_event;
                                uint8_t port;
+                               bool is_remote;
 
                                age_event.context = fh->context;
 
-                               is_remote_caller(caller_id, &port);
+                               is_remote = is_remote_caller(caller_id, &port);
 
                                flm_age_queue_put(caller_id, &age_event);
-                               flm_age_event_set(port);
+                               /* age events are supported only for physical 
ports */
+                               if (!is_remote)
+                                       flm_age_event_set(port);
                        }
                        break;
 
-- 
2.45.0

Reply via email to