Skip to content

Commit

Permalink
Fix rebase issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jotak committed Dec 20, 2024
1 parent 43ab1bd commit 7c34d61
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 19 deletions.
2 changes: 1 addition & 1 deletion bpf/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ typedef struct additional_metrics_t {
} pkt_drops;
u64 flow_rtt;
u8 network_events[MAX_NETWORK_EVENTS][MAX_EVENT_MD];
u16 eth_protocol;
struct translated_flow_t {
u8 saddr[IP_MAX_LEN];
u8 daddr[IP_MAX_LEN];
Expand All @@ -140,6 +139,7 @@ typedef struct additional_metrics_t {
u8 direction;
u32 if_index;
} observed_intf[MAX_OBSERVED_INTERFACES];
u16 eth_protocol;
u8 network_events_idx;
u8 nb_observed_intf;
} additional_metrics;
Expand Down
5 changes: 2 additions & 3 deletions pkg/ebpf/bpf_arm64_bpfel.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified pkg/ebpf/bpf_arm64_bpfel.o
Binary file not shown.
5 changes: 2 additions & 3 deletions pkg/ebpf/bpf_powerpc_bpfel.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified pkg/ebpf/bpf_powerpc_bpfel.o
Binary file not shown.
5 changes: 2 additions & 3 deletions pkg/ebpf/bpf_s390_bpfeb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified pkg/ebpf/bpf_s390_bpfeb.o
Binary file not shown.
5 changes: 2 additions & 3 deletions pkg/ebpf/bpf_x86_bpfel.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified pkg/ebpf/bpf_x86_bpfel.o
Binary file not shown.
2 changes: 1 addition & 1 deletion pkg/model/flow_content_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ func TestAccumulate(t *testing.T) {
{FlowRtt: 500},
{PktDrops: ebpf.BpfPktDropsT{Packets: 5, Bytes: 1000, LatestFlags: 1}},
},
expected: model.BpfFlowContent{
expected: BpfFlowContent{
BpfFlowMetrics: &ebpf.BpfFlowMetrics{StartMonoTimeTs: 15, EndMonoTimeTs: 25, Flags: 1},
AdditionalMetrics: &ebpf.BpfAdditionalMetrics{
StartMonoTimeTs: 15,
Expand Down
9 changes: 4 additions & 5 deletions pkg/model/record_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ func TestAdditionalMetricsBinaryEncoding(t *testing.T) {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, // 1 byte padding
0x03, 0x00, // u16 eth_protocol
// translated flow
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Expand All @@ -114,9 +112,10 @@ func TestAdditionalMetricsBinaryEncoding(t *testing.T) {
0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // [1]: u8 direction + 3 bytes padding + u32 if_index
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // [2]: u8 direction + 3 bytes padding + u32 if_index
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // [3]: u8 direction + 3 bytes padding + u32 if_index
0x01, // u8 network_events_idx
0x02, // u8 nb_observed_intf
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 6 bytes padding
0x03, 0x00, // u16 eth_protocol
0x01, // u8 network_events_idx
0x02, // u8 nb_observed_intf
0x00, 0x00, 0x00, 0x00, // 4 bytes padding
}
var addmet ebpf.BpfAdditionalMetrics
err := binary.Read(bytes.NewReader(b), binary.LittleEndian, &addmet)
Expand Down

0 comments on commit 7c34d61

Please sign in to comment.