summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorPaul Atkins <patkins@graphiant.com>2021-09-21 21:08:14 +0100
committerOle Tr�an <otroan@employees.org>2021-11-17 12:00:29 +0000
commit292992e009a20386f0a8b2b41586271f1e77f51a (patch)
treeca4d8ccb2fe3dc4f12c2613bc8af7e37b90c7bb0 /src/vnet
parent5df0b34898b261f90f7df0686ae702941108b6bb (diff)
ipfix-export: tidy code style in flow_report.c
Indent sections of code properly in vec_foreach loops. Type: style Signed-off-by: Paul Atkins <patkins@graphiant.com> Change-Id: I90183ace164df753f3f47b6c4a6305ded21d744d
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/ipfix-export/flow_report.c92
1 files changed, 46 insertions, 46 deletions
diff --git a/src/vnet/ipfix-export/flow_report.c b/src/vnet/ipfix-export/flow_report.c
index 760de5f8c66..85839323b3e 100644
--- a/src/vnet/ipfix-export/flow_report.c
+++ b/src/vnet/ipfix-export/flow_report.c
@@ -289,44 +289,44 @@ flow_report_process (vlib_main_t * vm,
wait_time = def_wait_time;
vec_foreach (fr, frm->reports)
- {
- f64 next_template;
- now = vlib_time_now (vm);
-
- /* Need to send a template packet? */
- send_template =
- now > (fr->last_template_sent + frm->template_interval);
- send_template += fr->last_template_sent == 0;
- template_bi = ~0;
- rv = 0;
-
- if (send_template)
- rv = send_template_packet (frm, fr, &template_bi);
-
- if (rv < 0)
- continue;
-
- /* decide if template should be sent sooner than current wait time */
- next_template =
- (fr->last_template_sent + frm->template_interval) - now;
- wait_time = clib_min (wait_time, next_template);
-
- nf = vlib_get_frame_to_node (vm, ip4_lookup_node_index);
- nf->n_vectors = 0;
- to_next = vlib_frame_vector_args (nf);
-
- if (template_bi != ~0)
- {
- to_next[0] = template_bi;
- to_next++;
- nf->n_vectors++;
- }
-
- nf = fr->flow_data_callback (frm, fr,
- nf, to_next, ip4_lookup_node_index);
- if (nf)
- vlib_put_frame_to_node (vm, ip4_lookup_node_index, nf);
- }
+ {
+ f64 next_template;
+ now = vlib_time_now (vm);
+
+ /* Need to send a template packet? */
+ send_template =
+ now > (fr->last_template_sent + frm->template_interval);
+ send_template += fr->last_template_sent == 0;
+ template_bi = ~0;
+ rv = 0;
+
+ if (send_template)
+ rv = send_template_packet (frm, fr, &template_bi);
+
+ if (rv < 0)
+ continue;
+
+ /* decide if template should be sent sooner than current wait time */
+ next_template =
+ (fr->last_template_sent + frm->template_interval) - now;
+ wait_time = clib_min (wait_time, next_template);
+
+ nf = vlib_get_frame_to_node (vm, ip4_lookup_node_index);
+ nf->n_vectors = 0;
+ to_next = vlib_frame_vector_args (nf);
+
+ if (template_bi != ~0)
+ {
+ to_next[0] = template_bi;
+ to_next++;
+ nf->n_vectors++;
+ }
+
+ nf = fr->flow_data_callback (frm, fr, nf, to_next,
+ ip4_lookup_node_index);
+ if (nf)
+ vlib_put_frame_to_node (vm, ip4_lookup_node_index, nf);
+ }
}
return 0; /* not so much */
@@ -452,10 +452,10 @@ vnet_flow_reports_reset (flow_report_main_t * frm)
frm->streams[i].sequence_number = 0;
vec_foreach (fr, frm->reports)
- {
- fr->update_rewrite = 1;
- fr->last_template_sent = 0;
- }
+ {
+ fr->update_rewrite = 1;
+ fr->last_template_sent = 0;
+ }
}
void
@@ -467,10 +467,10 @@ vnet_stream_reset (flow_report_main_t * frm, u32 stream_index)
vec_foreach (fr, frm->reports)
if (frm->reports->stream_index == stream_index)
- {
- fr->update_rewrite = 1;
- fr->last_template_sent = 0;
- }
+ {
+ fr->update_rewrite = 1;
+ fr->last_template_sent = 0;
+ }
}
int