Skip to content

Commit

Permalink
feat(ct-metrics): remove traffic_direction from conntrackmetadata
Browse files Browse the repository at this point in the history
  • Loading branch information
SRodi committed Dec 10, 2024
1 parent 1c8cfbf commit 9bb8eac
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 15 deletions.
9 changes: 0 additions & 9 deletions pkg/plugin/conntrack/_cprog/conntrack.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ struct conntrackmetadata {
*/
__u64 packets_forward_count;
__u64 packets_reply_count;
/*
This is the inital direction of the connection.
It is set to egress if the connection is initiated from the host and ingress otherwise.
*/
__u8 traffic_direction;
};

struct packet
Expand Down Expand Up @@ -153,10 +148,6 @@ static __always_inline bool _ct_create_new_tcp_connection(struct packet *p, stru
#if CONNTRACK_METRICS == 1
new_value.conntrack_metadata.packets_forward_count = 1;
new_value.conntrack_metadata.bytes_forward_count = p->bytes;
// The initial SYN is captured. Set the traffic direction of the connection.
// This is important for the case where the SYN packet is not captured
// and the connection is created with unknown direction.
new_value.conntrack_metadata.traffic_direction = new_value.traffic_direction;
// Update initial conntrack metadata for the connection.
__builtin_memcpy(&p->conntrack_metadata, &new_value.conntrack_metadata, sizeof(struct conntrackmetadata));
#endif
Expand Down
2 changes: 0 additions & 2 deletions pkg/plugin/conntrack/conntrack_bpfel_x86.go

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

Binary file modified pkg/plugin/packetforward/packetforward_bpfel_x86.o
Binary file not shown.
4 changes: 0 additions & 4 deletions pkg/plugin/packetparser/packetparser_bpfel_x86.go

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

0 comments on commit 9bb8eac

Please sign in to comment.