From d0e575f317d8bd2288ea86ff8d4ead12d52e6787 Mon Sep 17 00:00:00 2001 From: Herbert Wolverson Date: Fri, 15 Mar 2024 13:24:58 -0500 Subject: [PATCH] Add compatibility with the 5.x kernel version eBPF verifier. --- src/rust/lqos_sys/src/bpf/common/flows.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/rust/lqos_sys/src/bpf/common/flows.h b/src/rust/lqos_sys/src/bpf/common/flows.h index 4c283863..49200d47 100644 --- a/src/rust/lqos_sys/src/bpf/common/flows.h +++ b/src/rust/lqos_sys/src/bpf/common/flows.h @@ -306,11 +306,10 @@ static __always_inline void process_tcp( ) { __u64 elapsed = dissector->now - data->ts_change_time[other_rate_index]; if (elapsed < TWO_SECONDS_IN_NANOS) { - struct flowbee_event event = { - .key = key, - .round_trip_time = elapsed, - .effective_direction = rate_index - }; + struct flowbee_event event = { 0 }; + event.key = key; + event.round_trip_time = elapsed; + event.effective_direction = rate_index; bpf_ringbuf_output(&flowbee_events, &event, sizeof(event), 0); } }