Skip to content

Commit

Permalink
usm: classification: Shrink classification buffer to 24 bytes (#14925)
Browse files Browse the repository at this point in the history
  • Loading branch information
guyarb authored Jan 3, 2023
1 parent ef5563b commit 76da3cb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pkg/ebpf/bytecode/runtime/conntrack.go

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

2 changes: 1 addition & 1 deletion pkg/ebpf/bytecode/runtime/http.go

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

2 changes: 1 addition & 1 deletion pkg/ebpf/bytecode/runtime/tracer.go

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

7 changes: 3 additions & 4 deletions pkg/network/ebpf/c/protocols/protocol-classification-defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
#include "amqp-defs.h"
#include "mongo-defs.h"

// Represents the max buffer size required to classify protocols .
// We need to round it to be multiplication of 16 since we are reading blocks of 16 bytes in read_into_buffer_skb_all_kernels.
// ATM, it is HTTP2_MARKER_SIZE + 8 bytes for padding,
#define CLASSIFICATION_MAX_BUFFER (HTTP2_MARKER_SIZE + 8)
// Represents the max buffer size required to classify protocols.
// ATM, it is HTTP2_MARKER_SIZE.
#define CLASSIFICATION_MAX_BUFFER (HTTP2_MARKER_SIZE)

// Checkout https://datatracker.ietf.org/doc/html/rfc7540 under "HTTP/2 Connection Preface" section
#define HTTP2_MARKER_SIZE 24
Expand Down

0 comments on commit 76da3cb

Please sign in to comment.