diff --git a/bpf/types.h b/bpf/types.h index f5cd7fba53131d0e633fd912c8f9da5410362238..a0ae968d893e21487e1851dff6d9a9a9c8368c3b 100644 --- a/bpf/types.h +++ b/bpf/types.h @@ -30,7 +30,7 @@ typedef enum tcp_flags_t { } tcp_flags; // Force emitting enums/structs into the ELF -const enum tcp_flags_t *unused0 __attribute__((unused)); +const static enum tcp_flags_t *unused0 __attribute__((unused)); #if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && \ __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ @@ -77,9 +77,9 @@ typedef enum direction_t { } direction; // Force emitting enums/structs into the ELF -const enum direction_t *unused1 __attribute__((unused)); +const static enum direction_t *unused1 __attribute__((unused)); -const u8 ip4in6[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff}; +const static u8 ip4in6[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff}; typedef struct flow_metrics_t { // Flow start and end times as monotomic timestamps in nanoseconds @@ -111,7 +111,7 @@ typedef struct flow_metrics_t { } flow_metrics; // Force emitting enums/structs into the ELF -const struct flow_metrics_t *unused2 __attribute__((unused)); +const static struct flow_metrics_t *unused2 __attribute__((unused)); typedef struct additional_metrics_t { u64 start_mono_time_ts; @@ -143,11 +143,11 @@ typedef struct additional_metrics_t { } additional_metrics; // Force emitting enums/structs into the ELF -const struct additional_metrics_t *unused3 __attribute__((unused)); -const struct dns_record_t *unused4 __attribute__((unused)); -const struct pkt_drops_t *unused5 __attribute__((unused)); -const struct translated_flow_t *unused6 __attribute__((unused)); -const struct observed_intf_t *unused13 __attribute__((unused)); +const static struct additional_metrics_t *unused3 __attribute__((unused)); +const static struct dns_record_t *unused4 __attribute__((unused)); +const static struct pkt_drops_t *unused5 __attribute__((unused)); +const static struct translated_flow_t *unused6 __attribute__((unused)); +const static struct observed_intf_t *unused13 __attribute__((unused)); // Attributes that uniquely identify a flow typedef struct flow_id_t { @@ -166,7 +166,7 @@ typedef struct flow_id_t { } flow_id; // Force emitting enums/structs into the ELF -const struct flow_id_t *unused7 __attribute__((unused)); +const static struct flow_id_t *unused7 __attribute__((unused)); // Flow record is a tuple containing both flow identifier and metrics. It is used to send // a complete flow via ring buffer when only when the accounting hashmap is full. @@ -233,7 +233,7 @@ struct filter_key_t { } filter_key; // Force emitting enums/structs into the ELF -const struct filter_key_t *unused10 __attribute__((unused)); +const static struct filter_key_t *unused10 __attribute__((unused)); // Enum to define filter action typedef enum filter_action_t { @@ -243,7 +243,7 @@ typedef enum filter_action_t { } filter_action; // Force emitting enums/structs into the ELF -const enum filter_action_t *unused11 __attribute__((unused)); +const static enum filter_action_t *unused11 __attribute__((unused)); // filter value used as value from LPM map lookup to filter out flows that are not interesting for the user struct filter_value_t { @@ -271,6 +271,6 @@ struct filter_value_t { } filter_value; // Force emitting enums/structs into the ELF -const struct filter_value_t *unused12 __attribute__((unused)); +const static struct filter_value_t *unused12 __attribute__((unused)); #endif /* __TYPES_H__ */ diff --git a/pkg/ebpf/bpf_arm64_bpfel.go b/pkg/ebpf/bpf_arm64_bpfel.go index f2d4d55c0a187f40f898f989be014d9c39fdc9e2..6138b75122f9b4f06fee34631e4539e8d1fe7fdc 100644 --- a/pkg/ebpf/bpf_arm64_bpfel.go +++ b/pkg/ebpf/bpf_arm64_bpfel.go @@ -267,22 +267,9 @@ type BpfVariableSpecs struct { FilterKey *ebpf.VariableSpec `ebpf:"filter_key"` FilterValue *ebpf.VariableSpec `ebpf:"filter_value"` HasFilterSampling *ebpf.VariableSpec `ebpf:"has_filter_sampling"` - Ip4in6 *ebpf.VariableSpec `ebpf:"ip4in6"` NetworkEventsMonitoringGroupid *ebpf.VariableSpec `ebpf:"network_events_monitoring_groupid"` Sampling *ebpf.VariableSpec `ebpf:"sampling"` TraceMessages *ebpf.VariableSpec `ebpf:"trace_messages"` - Unused0 *ebpf.VariableSpec `ebpf:"unused0"` - Unused1 *ebpf.VariableSpec `ebpf:"unused1"` - Unused10 *ebpf.VariableSpec `ebpf:"unused10"` - Unused11 *ebpf.VariableSpec `ebpf:"unused11"` - Unused12 *ebpf.VariableSpec `ebpf:"unused12"` - Unused13 *ebpf.VariableSpec `ebpf:"unused13"` - Unused2 *ebpf.VariableSpec `ebpf:"unused2"` - Unused3 *ebpf.VariableSpec `ebpf:"unused3"` - Unused4 *ebpf.VariableSpec `ebpf:"unused4"` - Unused5 *ebpf.VariableSpec `ebpf:"unused5"` - Unused6 *ebpf.VariableSpec `ebpf:"unused6"` - Unused7 *ebpf.VariableSpec `ebpf:"unused7"` Unused8 *ebpf.VariableSpec `ebpf:"unused8"` Unused9 *ebpf.VariableSpec `ebpf:"unused9"` } @@ -344,22 +331,9 @@ type BpfVariables struct { FilterKey *ebpf.Variable `ebpf:"filter_key"` FilterValue *ebpf.Variable `ebpf:"filter_value"` HasFilterSampling *ebpf.Variable `ebpf:"has_filter_sampling"` - Ip4in6 *ebpf.Variable `ebpf:"ip4in6"` NetworkEventsMonitoringGroupid *ebpf.Variable `ebpf:"network_events_monitoring_groupid"` Sampling *ebpf.Variable `ebpf:"sampling"` TraceMessages *ebpf.Variable `ebpf:"trace_messages"` - Unused0 *ebpf.Variable `ebpf:"unused0"` - Unused1 *ebpf.Variable `ebpf:"unused1"` - Unused10 *ebpf.Variable `ebpf:"unused10"` - Unused11 *ebpf.Variable `ebpf:"unused11"` - Unused12 *ebpf.Variable `ebpf:"unused12"` - Unused13 *ebpf.Variable `ebpf:"unused13"` - Unused2 *ebpf.Variable `ebpf:"unused2"` - Unused3 *ebpf.Variable `ebpf:"unused3"` - Unused4 *ebpf.Variable `ebpf:"unused4"` - Unused5 *ebpf.Variable `ebpf:"unused5"` - Unused6 *ebpf.Variable `ebpf:"unused6"` - Unused7 *ebpf.Variable `ebpf:"unused7"` Unused8 *ebpf.Variable `ebpf:"unused8"` Unused9 *ebpf.Variable `ebpf:"unused9"` } diff --git a/pkg/ebpf/bpf_arm64_bpfel.o b/pkg/ebpf/bpf_arm64_bpfel.o index 706f43fb00c82daa7f9f4194997fc5e204db5712..e310772ab567cb89f1324bb483aa673e4a4bebc0 100644 Binary files a/pkg/ebpf/bpf_arm64_bpfel.o and b/pkg/ebpf/bpf_arm64_bpfel.o differ diff --git a/pkg/ebpf/bpf_powerpc_bpfel.go b/pkg/ebpf/bpf_powerpc_bpfel.go index 83dfb7724fdad3f1ae83cb5d91ae2dfd2aaa4d8d..877ba895ae0047feab19e355be3b44f961582374 100644 --- a/pkg/ebpf/bpf_powerpc_bpfel.go +++ b/pkg/ebpf/bpf_powerpc_bpfel.go @@ -267,22 +267,9 @@ type BpfVariableSpecs struct { FilterKey *ebpf.VariableSpec `ebpf:"filter_key"` FilterValue *ebpf.VariableSpec `ebpf:"filter_value"` HasFilterSampling *ebpf.VariableSpec `ebpf:"has_filter_sampling"` - Ip4in6 *ebpf.VariableSpec `ebpf:"ip4in6"` NetworkEventsMonitoringGroupid *ebpf.VariableSpec `ebpf:"network_events_monitoring_groupid"` Sampling *ebpf.VariableSpec `ebpf:"sampling"` TraceMessages *ebpf.VariableSpec `ebpf:"trace_messages"` - Unused0 *ebpf.VariableSpec `ebpf:"unused0"` - Unused1 *ebpf.VariableSpec `ebpf:"unused1"` - Unused10 *ebpf.VariableSpec `ebpf:"unused10"` - Unused11 *ebpf.VariableSpec `ebpf:"unused11"` - Unused12 *ebpf.VariableSpec `ebpf:"unused12"` - Unused13 *ebpf.VariableSpec `ebpf:"unused13"` - Unused2 *ebpf.VariableSpec `ebpf:"unused2"` - Unused3 *ebpf.VariableSpec `ebpf:"unused3"` - Unused4 *ebpf.VariableSpec `ebpf:"unused4"` - Unused5 *ebpf.VariableSpec `ebpf:"unused5"` - Unused6 *ebpf.VariableSpec `ebpf:"unused6"` - Unused7 *ebpf.VariableSpec `ebpf:"unused7"` Unused8 *ebpf.VariableSpec `ebpf:"unused8"` Unused9 *ebpf.VariableSpec `ebpf:"unused9"` } @@ -344,22 +331,9 @@ type BpfVariables struct { FilterKey *ebpf.Variable `ebpf:"filter_key"` FilterValue *ebpf.Variable `ebpf:"filter_value"` HasFilterSampling *ebpf.Variable `ebpf:"has_filter_sampling"` - Ip4in6 *ebpf.Variable `ebpf:"ip4in6"` NetworkEventsMonitoringGroupid *ebpf.Variable `ebpf:"network_events_monitoring_groupid"` Sampling *ebpf.Variable `ebpf:"sampling"` TraceMessages *ebpf.Variable `ebpf:"trace_messages"` - Unused0 *ebpf.Variable `ebpf:"unused0"` - Unused1 *ebpf.Variable `ebpf:"unused1"` - Unused10 *ebpf.Variable `ebpf:"unused10"` - Unused11 *ebpf.Variable `ebpf:"unused11"` - Unused12 *ebpf.Variable `ebpf:"unused12"` - Unused13 *ebpf.Variable `ebpf:"unused13"` - Unused2 *ebpf.Variable `ebpf:"unused2"` - Unused3 *ebpf.Variable `ebpf:"unused3"` - Unused4 *ebpf.Variable `ebpf:"unused4"` - Unused5 *ebpf.Variable `ebpf:"unused5"` - Unused6 *ebpf.Variable `ebpf:"unused6"` - Unused7 *ebpf.Variable `ebpf:"unused7"` Unused8 *ebpf.Variable `ebpf:"unused8"` Unused9 *ebpf.Variable `ebpf:"unused9"` } diff --git a/pkg/ebpf/bpf_powerpc_bpfel.o b/pkg/ebpf/bpf_powerpc_bpfel.o index f5c2f4d479c92c8f4d604fdb4759573d98f62bae..b2679131ab8a8a4da7ed2d34c2ca24ae73bda014 100644 Binary files a/pkg/ebpf/bpf_powerpc_bpfel.o and b/pkg/ebpf/bpf_powerpc_bpfel.o differ diff --git a/pkg/ebpf/bpf_s390_bpfeb.go b/pkg/ebpf/bpf_s390_bpfeb.go index a94c3d795fe96e3b8b5bdb820e167d77d3c1bf52..262930a5f9785a8caaeb838bd1db88bd8e482c19 100644 --- a/pkg/ebpf/bpf_s390_bpfeb.go +++ b/pkg/ebpf/bpf_s390_bpfeb.go @@ -267,22 +267,9 @@ type BpfVariableSpecs struct { FilterKey *ebpf.VariableSpec `ebpf:"filter_key"` FilterValue *ebpf.VariableSpec `ebpf:"filter_value"` HasFilterSampling *ebpf.VariableSpec `ebpf:"has_filter_sampling"` - Ip4in6 *ebpf.VariableSpec `ebpf:"ip4in6"` NetworkEventsMonitoringGroupid *ebpf.VariableSpec `ebpf:"network_events_monitoring_groupid"` Sampling *ebpf.VariableSpec `ebpf:"sampling"` TraceMessages *ebpf.VariableSpec `ebpf:"trace_messages"` - Unused0 *ebpf.VariableSpec `ebpf:"unused0"` - Unused1 *ebpf.VariableSpec `ebpf:"unused1"` - Unused10 *ebpf.VariableSpec `ebpf:"unused10"` - Unused11 *ebpf.VariableSpec `ebpf:"unused11"` - Unused12 *ebpf.VariableSpec `ebpf:"unused12"` - Unused13 *ebpf.VariableSpec `ebpf:"unused13"` - Unused2 *ebpf.VariableSpec `ebpf:"unused2"` - Unused3 *ebpf.VariableSpec `ebpf:"unused3"` - Unused4 *ebpf.VariableSpec `ebpf:"unused4"` - Unused5 *ebpf.VariableSpec `ebpf:"unused5"` - Unused6 *ebpf.VariableSpec `ebpf:"unused6"` - Unused7 *ebpf.VariableSpec `ebpf:"unused7"` Unused8 *ebpf.VariableSpec `ebpf:"unused8"` Unused9 *ebpf.VariableSpec `ebpf:"unused9"` } @@ -344,22 +331,9 @@ type BpfVariables struct { FilterKey *ebpf.Variable `ebpf:"filter_key"` FilterValue *ebpf.Variable `ebpf:"filter_value"` HasFilterSampling *ebpf.Variable `ebpf:"has_filter_sampling"` - Ip4in6 *ebpf.Variable `ebpf:"ip4in6"` NetworkEventsMonitoringGroupid *ebpf.Variable `ebpf:"network_events_monitoring_groupid"` Sampling *ebpf.Variable `ebpf:"sampling"` TraceMessages *ebpf.Variable `ebpf:"trace_messages"` - Unused0 *ebpf.Variable `ebpf:"unused0"` - Unused1 *ebpf.Variable `ebpf:"unused1"` - Unused10 *ebpf.Variable `ebpf:"unused10"` - Unused11 *ebpf.Variable `ebpf:"unused11"` - Unused12 *ebpf.Variable `ebpf:"unused12"` - Unused13 *ebpf.Variable `ebpf:"unused13"` - Unused2 *ebpf.Variable `ebpf:"unused2"` - Unused3 *ebpf.Variable `ebpf:"unused3"` - Unused4 *ebpf.Variable `ebpf:"unused4"` - Unused5 *ebpf.Variable `ebpf:"unused5"` - Unused6 *ebpf.Variable `ebpf:"unused6"` - Unused7 *ebpf.Variable `ebpf:"unused7"` Unused8 *ebpf.Variable `ebpf:"unused8"` Unused9 *ebpf.Variable `ebpf:"unused9"` } diff --git a/pkg/ebpf/bpf_s390_bpfeb.o b/pkg/ebpf/bpf_s390_bpfeb.o index 8d3338d220a7e55e5158c0cbfd8a29616c7a0cc2..0d14e0a61b004a09b181731a41a25bba912b24d9 100644 Binary files a/pkg/ebpf/bpf_s390_bpfeb.o and b/pkg/ebpf/bpf_s390_bpfeb.o differ diff --git a/pkg/ebpf/bpf_x86_bpfel.go b/pkg/ebpf/bpf_x86_bpfel.go index 254d9d5a112219a5ad9c39e3f786f446fb0b2423..43ae902d522b7ae533470d479253d4954869fdab 100644 --- a/pkg/ebpf/bpf_x86_bpfel.go +++ b/pkg/ebpf/bpf_x86_bpfel.go @@ -267,22 +267,9 @@ type BpfVariableSpecs struct { FilterKey *ebpf.VariableSpec `ebpf:"filter_key"` FilterValue *ebpf.VariableSpec `ebpf:"filter_value"` HasFilterSampling *ebpf.VariableSpec `ebpf:"has_filter_sampling"` - Ip4in6 *ebpf.VariableSpec `ebpf:"ip4in6"` NetworkEventsMonitoringGroupid *ebpf.VariableSpec `ebpf:"network_events_monitoring_groupid"` Sampling *ebpf.VariableSpec `ebpf:"sampling"` TraceMessages *ebpf.VariableSpec `ebpf:"trace_messages"` - Unused0 *ebpf.VariableSpec `ebpf:"unused0"` - Unused1 *ebpf.VariableSpec `ebpf:"unused1"` - Unused10 *ebpf.VariableSpec `ebpf:"unused10"` - Unused11 *ebpf.VariableSpec `ebpf:"unused11"` - Unused12 *ebpf.VariableSpec `ebpf:"unused12"` - Unused13 *ebpf.VariableSpec `ebpf:"unused13"` - Unused2 *ebpf.VariableSpec `ebpf:"unused2"` - Unused3 *ebpf.VariableSpec `ebpf:"unused3"` - Unused4 *ebpf.VariableSpec `ebpf:"unused4"` - Unused5 *ebpf.VariableSpec `ebpf:"unused5"` - Unused6 *ebpf.VariableSpec `ebpf:"unused6"` - Unused7 *ebpf.VariableSpec `ebpf:"unused7"` Unused8 *ebpf.VariableSpec `ebpf:"unused8"` Unused9 *ebpf.VariableSpec `ebpf:"unused9"` } @@ -344,22 +331,9 @@ type BpfVariables struct { FilterKey *ebpf.Variable `ebpf:"filter_key"` FilterValue *ebpf.Variable `ebpf:"filter_value"` HasFilterSampling *ebpf.Variable `ebpf:"has_filter_sampling"` - Ip4in6 *ebpf.Variable `ebpf:"ip4in6"` NetworkEventsMonitoringGroupid *ebpf.Variable `ebpf:"network_events_monitoring_groupid"` Sampling *ebpf.Variable `ebpf:"sampling"` TraceMessages *ebpf.Variable `ebpf:"trace_messages"` - Unused0 *ebpf.Variable `ebpf:"unused0"` - Unused1 *ebpf.Variable `ebpf:"unused1"` - Unused10 *ebpf.Variable `ebpf:"unused10"` - Unused11 *ebpf.Variable `ebpf:"unused11"` - Unused12 *ebpf.Variable `ebpf:"unused12"` - Unused13 *ebpf.Variable `ebpf:"unused13"` - Unused2 *ebpf.Variable `ebpf:"unused2"` - Unused3 *ebpf.Variable `ebpf:"unused3"` - Unused4 *ebpf.Variable `ebpf:"unused4"` - Unused5 *ebpf.Variable `ebpf:"unused5"` - Unused6 *ebpf.Variable `ebpf:"unused6"` - Unused7 *ebpf.Variable `ebpf:"unused7"` Unused8 *ebpf.Variable `ebpf:"unused8"` Unused9 *ebpf.Variable `ebpf:"unused9"` } diff --git a/pkg/ebpf/bpf_x86_bpfel.o b/pkg/ebpf/bpf_x86_bpfel.o index 9e16c66d847e8cd3f0ea3b6a82f6fe98a57122d6..62342f62a9a8da17cb5c63912bb243a130b1fb39 100644 Binary files a/pkg/ebpf/bpf_x86_bpfel.o and b/pkg/ebpf/bpf_x86_bpfel.o differ