summaryrefslogtreecommitdiffstats
path: root/src/vnet/ipfix-export/flow_api.c
diff options
context:
space:
mode:
authorPaul Atkins <patkins@graphiant.com>2021-09-22 10:06:23 +0100
committerNeale Ranns <neale@graphiant.com>2021-11-22 09:30:09 +0000
commit40f9a7ac7ea0c22ee1aade671c871c67af4a5d51 (patch)
treeb30a39fa3b929c944cd9eeb84e763a797091de27 /src/vnet/ipfix-export/flow_api.c
parent9e827819a7a442e35fcd171de48d859f84d6bf28 (diff)
ipfix-export: pass an exp to flow_report_add_del
Pass an ipfix_exporter to this function so that callers can choose which exporter they are modifying. Type: improvement Signed-off-by: Paul Atkins <patkins@graphiant.com> Change-Id: Ice0ed19a57baf15b1dc85cd27fe01913e36d7f4f
Diffstat (limited to 'src/vnet/ipfix-export/flow_api.c')
-rw-r--r--src/vnet/ipfix-export/flow_api.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/vnet/ipfix-export/flow_api.c b/src/vnet/ipfix-export/flow_api.c
index 7e4f1fe8626..3636168139d 100644
--- a/src/vnet/ipfix-export/flow_api.c
+++ b/src/vnet/ipfix-export/flow_api.c
@@ -117,7 +117,7 @@ vl_api_set_ipfix_exporter_t_handler (vl_api_set_ipfix_exporter_t * mp)
if (exp->ipfix_collector.as_u32 != collector.as_u32 ||
exp->src_address.as_u32 != src.as_u32 ||
exp->collector_port != collector_port)
- vnet_flow_reports_reset (frm);
+ vnet_flow_reports_reset (exp);
exp->ipfix_collector.as_u32 = collector.as_u32;
exp->collector_port = collector_port;
@@ -183,6 +183,7 @@ static void
vl_api_set_ipfix_classify_stream_reply_t *rmp;
flow_report_classify_main_t *fcm = &flow_report_classify_main;
flow_report_main_t *frm = &flow_report_main;
+ ipfix_exporter_t *exp = &frm->exporters[0];
u32 domain_id = 0;
u32 src_port = UDP_DST_PORT_ipfix;
int rv = 0;
@@ -193,7 +194,7 @@ static void
if (fcm->src_port != 0 &&
(fcm->domain_id != domain_id || fcm->src_port != (u16) src_port))
{
- int rv = vnet_stream_change (frm, fcm->domain_id, fcm->src_port,
+ int rv = vnet_stream_change (exp, fcm->domain_id, fcm->src_port,
domain_id, (u16) src_port);
ASSERT (rv == 0);
}
@@ -234,6 +235,7 @@ static void
vl_api_registration_t *reg;
flow_report_classify_main_t *fcm = &flow_report_classify_main;
flow_report_main_t *frm = &flow_report_main;
+ ipfix_exporter_t *exp = &frm->exporters[0];
vnet_flow_report_add_del_args_t args;
ipfix_classify_table_t *table;
int is_add;
@@ -299,7 +301,7 @@ static void
args.domain_id = fcm->domain_id;
args.src_port = fcm->src_port;
- rv = vnet_flow_report_add_del (frm, &args, NULL);
+ rv = vnet_flow_report_add_del (exp, &args, NULL);
/* If deleting, or add failed */
if (is_add == 0 || (rv && is_add))