Skip to content

Commit 5a281d0

Browse files
authored
Add support for dynamic gRPC tables (#1530)
1 parent bf091bb commit 5a281d0

File tree

73 files changed

+1993
-130
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1993
-130
lines changed

Makefile

+6-1
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,13 @@ oats-test-kafka: oats-prereq
352352
mkdir -p test/oats/kafka/$(TEST_OUTPUT)/run
353353
cd test/oats/kafka && TESTCASE_TIMEOUT=120s TESTCASE_BASE_PATH=./yaml $(GINKGO) -v -r
354354

355+
.PHONY: oats-test-http
356+
oats-test-http: oats-prereq
357+
mkdir -p test/oats/http/$(TEST_OUTPUT)/run
358+
cd test/oats/http && TESTCASE_BASE_PATH=./yaml $(GINKGO) -v -r
359+
355360
.PHONY: oats-test
356-
oats-test: oats-test-sql oats-test-redis oats-test-kafka
361+
oats-test: oats-test-sql oats-test-redis oats-test-kafka oats-test-http
357362
$(MAKE) itest-coverage-data
358363

359364
.PHONY: oats-test-debug

bpf/http_types.h

+1
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ typedef struct http2_grpc_request {
192192
// with other instrumented processes
193193
pid_info pid;
194194
u8 ssl;
195+
u8 new_conn;
195196
tp_info_t tp;
196197
} http2_grpc_request_t;
197198

bpf/k_tracer_defs.h

+6-3
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,14 @@ static __always_inline void handle_buf_with_args(void *ctx, call_protocol_args_t
4242
bpf_tail_call(ctx, &jump_table, k_tail_protocol_http);
4343
} else if (is_http2_or_grpc(args->small_buf, MIN_HTTP2_SIZE)) {
4444
bpf_dbg_printk("Found HTTP2 or gRPC connection");
45-
u8 is_ssl = args->ssl;
46-
bpf_map_update_elem(&ongoing_http2_connections, &args->pid_conn, &is_ssl, BPF_ANY);
45+
u8 flags = http2_conn_flag_new;
46+
if (args->ssl) {
47+
flags |= http2_conn_flag_ssl;
48+
}
49+
bpf_map_update_elem(&ongoing_http2_connections, &args->pid_conn, &flags, BPF_ANY);
4750
} else {
4851
u8 *h2g = bpf_map_lookup_elem(&ongoing_http2_connections, &args->pid_conn);
49-
if (h2g && *h2g == args->ssl) {
52+
if (h2g && (http2_flag_ssl(*h2g) == args->ssl)) {
5053
bpf_tail_call(ctx, &jump_table, k_tail_protocol_http2);
5154
} else { // large request tracking
5255
http_info_t *info = bpf_map_lookup_elem(&ongoing_http, &args->pid_conn);

bpf/protocol_http2.h

+19-1
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@
1010
#include "protocol_common.h"
1111
#include "ringbuf.h"
1212

13+
// These are bit flags, if you add any use power of 2 values
14+
enum { http2_conn_flag_ssl = WITH_SSL, http2_conn_flag_new = 0x2 };
15+
1316
struct {
1417
__uint(type, BPF_MAP_TYPE_LRU_HASH);
1518
__type(key, pid_connection_info_t);
16-
__type(value, u8); // ssl or not
19+
__type(value, u8); // flags
1720
__uint(max_entries, MAX_CONCURRENT_REQUESTS);
1821
} ongoing_http2_connections SEC(".maps");
1922

@@ -62,6 +65,14 @@ static __always_inline grpc_frames_ctx_t *grpc_ctx() {
6265
return bpf_map_lookup_elem(&grpc_frames_ctx_mem, &zero);
6366
}
6467

68+
static __always_inline u8 http2_flag_ssl(u8 flags) {
69+
return flags & http2_conn_flag_ssl;
70+
}
71+
72+
static __always_inline u8 http2_flag_new(u8 flags) {
73+
return flags & http2_conn_flag_new;
74+
}
75+
6576
static __always_inline http2_grpc_request_t *empty_http2_info() {
6677
int zero = 0;
6778
http2_grpc_request_t *value = bpf_map_lookup_elem(&http2_info_mem, &zero);
@@ -98,6 +109,13 @@ static __always_inline void http2_grpc_start(
98109
h2g_info->pid = meta->pid;
99110
h2g_info->type = meta->type;
100111
}
112+
113+
h2g_info->new_conn = 0;
114+
u8 *h2g = bpf_map_lookup_elem(&ongoing_http2_connections, &s_key->pid_conn);
115+
if (h2g && http2_flag_new(*h2g)) {
116+
h2g_info->new_conn = 1;
117+
}
118+
101119
fixup_connection_info(
102120
&h2g_info->conn_info, h2g_info->type == EVENT_HTTP_CLIENT, orig_dport);
103121
bpf_probe_read(h2g_info->data, KPROBES_HTTP2_BUF_SIZE, u_buf);

pkg/internal/ebpf/bhpack/hpack.go

+10-5
Original file line numberDiff line numberDiff line change
@@ -95,17 +95,19 @@ type Decoder struct {
9595
// to fully parse before. Unlike buf, we own this data.
9696
saveBuf bytes.Buffer
9797

98-
firstField bool // processing the first field of the header block
98+
firstField bool // processing the first field of the header block
99+
failedToIndex bool
99100
}
100101

101102
// NewDecoder returns a new decoder with the provided maximum dynamic
102103
// table size. The emitFunc will be called for each valid field
103104
// parsed, in the same goroutine as calls to Write, before Write returns.
104105
func NewDecoder(maxDynamicTableSize uint32, emitFunc func(f HeaderField)) *Decoder {
105106
d := &Decoder{
106-
emit: emitFunc,
107-
emitEnabled: true,
108-
firstField: true,
107+
emit: emitFunc,
108+
emitEnabled: true,
109+
firstField: true,
110+
failedToIndex: false,
109111
}
110112
d.dynTab.table.init()
111113
d.dynTab.allowedMaxSize = maxDynamicTableSize
@@ -345,7 +347,10 @@ func (d *Decoder) parseFieldIndexed() error {
345347
}
346348
hf, ok := d.at(idx)
347349
d.buf = buf
350+
// If we've failed once to find an index, don't allow us to find
351+
// a value for index that's greater than the last successful one
348352
if !ok {
353+
d.failedToIndex = true
349354
return d.callEmit(HeaderField{Name: "<BAD INDEX>", Value: ""})
350355
}
351356
return d.callEmit(HeaderField{Name: hf.Name, Value: hf.Value})
@@ -392,7 +397,7 @@ func (d *Decoder) parseFieldLiteral(n uint8, it indexType) error {
392397
}
393398
}
394399
d.buf = buf
395-
if it.indexed() {
400+
if it.indexed() && !d.failedToIndex {
396401
d.dynTab.add(hf)
397402
}
398403
hf.Sensitive = it.sensitive()

pkg/internal/ebpf/common/bpf_arm64_bpfel.go

+4-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:7b01d5155416c0085c68af36e96ae7d5991ed6222402a7d403a93086c2beee68
3-
size 4544
2+
oid sha256:73302bb00ece4f200a40e33ef3d9a91d25b61b3a4048b048950e9a754fd872ab
3+
size 4568

pkg/internal/ebpf/common/bpf_x86_bpfel.go

+4-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:7b01d5155416c0085c68af36e96ae7d5991ed6222402a7d403a93086c2beee68
3-
size 4544
2+
oid sha256:73302bb00ece4f200a40e33ef3d9a91d25b61b3a4048b048950e9a754fd872ab
3+
size 4568

pkg/internal/ebpf/common/http2grpc_transform.go

+25-13
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ const (
2727
GRPC
2828
)
2929

30+
const initialHeaderTableSize = 4096
31+
3032
type h2Connection struct {
3133
hdec *bhpack.Decoder
3234
hdecRet *bhpack.Decoder
@@ -45,13 +47,18 @@ func byteFramer(data []uint8) *http2.Framer {
4547
return fr
4648
}
4749

48-
func getOrInitH2Conn(conn *BPFConnInfo) *h2Connection {
50+
func getOrInitH2Conn(conn *BPFConnInfo, newConn bool) *h2Connection {
4951
v, ok := activeGRPCConnections.Get(*conn)
5052

53+
dynamicTableSize := initialHeaderTableSize
54+
if !newConn {
55+
dynamicTableSize = 0
56+
}
57+
5158
if !ok {
5259
h := h2Connection{
53-
hdec: bhpack.NewDecoder(0, nil),
54-
hdecRet: bhpack.NewDecoder(0, nil),
60+
hdec: bhpack.NewDecoder(uint32(dynamicTableSize), nil),
61+
hdecRet: bhpack.NewDecoder(uint32(dynamicTableSize), nil),
5562
protocol: HTTP2,
5663
}
5764
activeGRPCConnections.Add(*conn, h)
@@ -64,8 +71,8 @@ func getOrInitH2Conn(conn *BPFConnInfo) *h2Connection {
6471
return &v
6572
}
6673

67-
func protocolIsGRPC(conn *BPFConnInfo) {
68-
h2c := getOrInitH2Conn(conn)
74+
func protocolIsGRPC(conn *BPFConnInfo, newConn bool) {
75+
h2c := getOrInitH2Conn(conn, newConn)
6976
if h2c != nil {
7077
h2c.protocol = GRPC
7178
}
@@ -102,8 +109,8 @@ func knownFrameKeys(fr *http2.Framer, hf *http2.HeadersFrame) bool {
102109
return known
103110
}
104111

105-
func readMetaFrame(conn *BPFConnInfo, fr *http2.Framer, hf *http2.HeadersFrame) (string, string, string, bool) {
106-
h2c := getOrInitH2Conn(conn)
112+
func readMetaFrame(conn *BPFConnInfo, newConn bool, fr *http2.Framer, hf *http2.HeadersFrame) (string, string, string, bool) {
113+
h2c := getOrInitH2Conn(conn, newConn)
107114

108115
ok := false
109116
method := ""
@@ -126,7 +133,7 @@ func readMetaFrame(conn *BPFConnInfo, fr *http2.Framer, hf *http2.HeadersFrame)
126133
case "content-type":
127134
contentType = strings.ToLower(hf.Value)
128135
if contentType == "application/grpc" {
129-
protocolIsGRPC(conn)
136+
protocolIsGRPC(conn, newConn)
130137
}
131138
ok = true
132139
}
@@ -162,8 +169,8 @@ func http2grpcStatus(status int) int {
162169
return 2 // Unknown
163170
}
164171

165-
func readRetMetaFrame(conn *BPFConnInfo, fr *http2.Framer, hf *http2.HeadersFrame) (int, bool, bool) {
166-
h2c := getOrInitH2Conn(conn)
172+
func readRetMetaFrame(conn *BPFConnInfo, newConn bool, fr *http2.Framer, hf *http2.HeadersFrame) (int, bool, bool) {
173+
h2c := getOrInitH2Conn(conn, newConn)
167174

168175
ok := false
169176
status := 0
@@ -184,7 +191,7 @@ func readRetMetaFrame(conn *BPFConnInfo, fr *http2.Framer, hf *http2.HeadersFram
184191
ok = true
185192
case "grpc-status":
186193
status, _ = strconv.Atoi(hf.Value)
187-
protocolIsGRPC(conn)
194+
protocolIsGRPC(conn, newConn)
188195
grpc = true
189196
ok = true
190197
}
@@ -276,6 +283,11 @@ func http2FromBuffers(event *BPFHTTP2Info) (request.Span, bool, error) {
276283
status := 0
277284
eventType := HTTP2
278285

286+
newConn := true
287+
if event.NewConn == 0 {
288+
newConn = false
289+
}
290+
279291
for {
280292
f, err := framer.ReadFrame()
281293

@@ -285,7 +297,7 @@ func http2FromBuffers(event *BPFHTTP2Info) (request.Span, bool, error) {
285297

286298
if ff, ok := f.(*http2.HeadersFrame); ok {
287299
rok := false
288-
method, path, contentType, ok := readMetaFrame((*BPFConnInfo)(&event.ConnInfo), framer, ff)
300+
method, path, contentType, ok := readMetaFrame((*BPFConnInfo)(&event.ConnInfo), newConn, framer, ff)
289301

290302
if path == "" {
291303
path = "*"
@@ -301,7 +313,7 @@ func http2FromBuffers(event *BPFHTTP2Info) (request.Span, bool, error) {
301313
}
302314

303315
if ff, ok := retF.(*http2.HeadersFrame); ok {
304-
status, grpcInStatus, rok = readRetMetaFrame((*BPFConnInfo)(&event.ConnInfo), retFramer, ff)
316+
status, grpcInStatus, rok = readRetMetaFrame((*BPFConnInfo)(&event.ConnInfo), newConn, retFramer, ff)
305317
break
306318
}
307319
}

pkg/internal/ebpf/common/http2grpc_transform_test.go

+81-4
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ func TestHTTP2Parsing(t *testing.T) {
119119

120120
if ff, ok := f.(*http2.HeadersFrame); ok {
121121
connInfo := BPFConnInfo{}
122-
method, path, contentType, _ := readMetaFrame(&connInfo, framer, ff)
123-
assert.Equal(t, method, tt.method)
124-
assert.Equal(t, path, tt.path)
125-
assert.Equal(t, contentType, tt.contentType)
122+
method, path, contentType, _ := readMetaFrame(&connInfo, false, framer, ff)
123+
assert.Equal(t, tt.method, method)
124+
assert.Equal(t, tt.path, path)
125+
assert.Equal(t, tt.contentType, contentType)
126126
}
127127
}
128128
})
@@ -169,6 +169,74 @@ func TestHTTP2EventsParsing(t *testing.T) {
169169
}
170170
}
171171

172+
func TestDynamicTableUpdates(t *testing.T) {
173+
rinput := []byte{0, 0, 138, 1, 36, 0, 0, 0, 11, 0, 0, 0, 0, 15, 0, 0, 0, 0, 45, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
174+
175+
tests := []struct {
176+
name string
177+
input []byte
178+
inputLen int
179+
}{
180+
{
181+
name: "Full path, lots of headers",
182+
input: []byte{0, 0, 222, 1, 4, 0, 0, 0, 1, 64, 5, 58, 112, 97, 116, 104, 33, 47, 114, 111, 117, 116, 101, 103, 117, 105, 100, 101, 46, 82, 111, 117, 116, 101, 71, 117, 105, 100, 101, 47, 71, 101, 116, 70, 101, 97, 116, 117, 114, 101, 64, 10, 58, 97, 117, 116, 104, 111, 114, 105, 116, 121, 15, 108, 111, 99, 97, 108, 104, 111, 115, 116, 58, 53, 48, 48, 53, 49, 131, 134, 64, 12, 99, 111, 110, 116, 101, 110, 116, 45, 116, 121, 112, 101, 16, 97, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 47, 103, 114, 112, 99, 64, 2, 116, 101, 8, 116, 114, 97, 105, 108, 101, 114, 115, 64, 20, 103, 114, 112, 99, 45, 97, 99, 99, 101, 112, 116, 45, 101, 110, 99, 111, 100, 105, 110, 103, 23, 105, 100, 101, 110, 116, 105, 116, 121, 44, 32, 100, 101, 102, 108, 97, 116, 101, 44, 32, 103, 122, 105, 112, 64, 10, 117, 115, 101, 114, 45, 97, 103, 101, 110, 116, 48, 103, 114, 112, 99, 45, 112, 121, 116, 104, 111, 110, 47, 49, 46, 54, 57, 46, 48, 32, 103, 114, 112, 99, 45, 99, 47, 52, 52, 46, 50, 46, 48, 32, 40, 108, 105, 110, 117, 120, 59, 32, 99, 104, 116, 116, 112, 50, 41, 0, 0, 4, 8, 0, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 22, 0, 1, 0, 0, 0, 1, 0, 0, 0},
183+
inputLen: 1024,
184+
},
185+
{
186+
name: "Full path only",
187+
input: []byte{0, 0, 222, 1, 4, 0, 0, 0, 1, 64, 5, 58, 112, 97, 116, 104, 33, 47, 114, 111, 117, 116, 101, 103, 117, 105, 100, 101, 46, 82, 111, 117, 116, 101, 71, 117, 105, 100, 101, 47, 71, 101, 116, 70, 101, 97, 116, 117, 114, 101, 131},
188+
inputLen: 1024,
189+
},
190+
{
191+
name: "Index encoded",
192+
input: []byte{0, 0, 8, 1, 4, 0, 0, 0, 3, 195, 194, 131, 134, 193, 192, 191, 190, 0, 0, 4, 8, 0, 0, 0, 0, 3, 0, 0, 0, 5, 0, 0, 5, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 0, 84},
193+
inputLen: 1024,
194+
},
195+
}
196+
197+
for _, tt := range tests {
198+
t.Run(tt.name, func(t *testing.T) {
199+
info := makeBPFHTTP2InfoNewRequest(tt.input, rinput, tt.inputLen)
200+
s, ignore, _ := http2FromBuffers(&info)
201+
assert.False(t, ignore)
202+
assert.Equal(t, "POST", s.Method)
203+
assert.Equal(t, "/routeguide.RouteGuide/GetFeature", s.Path)
204+
})
205+
}
206+
207+
// Now let's break the decoder with pushing unknown indices
208+
unknownIndexInput := []byte{0, 0, 8, 1, 4, 0, 0, 0, 3, 199, 200, 131, 134, 201, 202, 203, 204, 0, 0, 4, 8, 0, 0, 0, 0, 3, 0, 0, 0, 5, 0, 0, 5, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 0, 84}
209+
210+
info := makeBPFHTTP2InfoNewRequest(unknownIndexInput, rinput, 1024)
211+
s, ignore, _ := http2FromBuffers(&info)
212+
assert.False(t, ignore)
213+
assert.Equal(t, "POST", s.Method)
214+
assert.Equal(t, "*", s.Path)
215+
216+
nextIndex := 8 + 61 // 61 is the static table index size, 7 is how many entries we store in the dynamic table with that first request
217+
218+
// Now let's send new path
219+
newPathInput := []byte{0, 0, 222, 1, 4, 0, 0, 0, 1, 64, 5, 58, 112, 97, 116, 104, 33, 47, 112, 111, 117, 116, 101, 103, 117, 105, 100, 101, 46, 82, 111, 117, 116, 101, 71, 117, 105, 100, 101, 47, 71, 101, 116, 70, 101, 97, 116, 117, 114, 101, 64, 10, 58, 97, 117, 116, 104, 111, 114, 105, 116, 121, 15, 108, 111, 99, 97, 108, 104, 111, 115, 116, 58, 53, 48, 48, 53, 49, 131, 134, 64, 12, 99, 111, 110, 116, 101, 110, 116, 45, 116, 121, 112, 101, 16, 97, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 47, 103, 114, 112, 99, 64, 2, 116, 101, 8, 116, 114, 97, 105, 108, 101, 114, 115, 64, 20, 103, 114, 112, 99, 45, 97, 99, 99, 101, 112, 116, 45, 101, 110, 99, 111, 100, 105, 110, 103, 23, 105, 100, 101, 110, 116, 105, 116, 121, 44, 32, 100, 101, 102, 108, 97, 116, 101, 44, 32, 103, 122, 105, 112, 64, 10, 117, 115, 101, 114, 45, 97, 103, 101, 110, 116, 48, 103, 114, 112, 99, 45, 112, 121, 116, 104, 111, 110, 47, 49, 46, 54, 57, 46, 48, 32, 103, 114, 112, 99, 45, 99, 47, 52, 52, 46, 50, 46, 48, 32, 40, 108, 105, 110, 117, 120, 59, 32, 99, 104, 116, 116, 112, 50, 41, 0, 0, 4, 8, 0, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 22, 0, 1, 0, 0, 0, 1, 0, 0, 0}
220+
221+
// We'll be able to decode this correctly, even with broken decoder, beause the values are sent as text
222+
info = makeBPFHTTP2InfoNewRequest(newPathInput, rinput, 1024)
223+
s, ignore, _ = http2FromBuffers(&info)
224+
assert.False(t, ignore)
225+
assert.Equal(t, "POST", s.Method)
226+
assert.Equal(t, "/pouteguide.RouteGuide/GetFeature", s.Path) // this value is the same I just changed the first character from r to p
227+
228+
// indexed version of newPathInput
229+
// if we cached a new pair nextIndex + 128 is the high bit encoded next index which should be in the dynamic table
230+
// however we mark the decoder as invalid and it shouldn't resolve to anything for :path
231+
indexedNewPath := []byte{0, 0, 8, 1, 4, 0, 0, 0, 3, 195, 194, 131, 134, 193, 192, 191, byte(nextIndex + 128), 0, 0, 4, 8, 0, 0, 0, 0, 3, 0, 0, 0, 5, 0, 0, 5, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 0, 84}
232+
233+
info = makeBPFHTTP2InfoNewRequest(indexedNewPath, rinput, 1024)
234+
s, ignore, _ = http2FromBuffers(&info)
235+
assert.False(t, ignore)
236+
assert.Equal(t, "POST", s.Method)
237+
assert.Equal(t, "*", s.Path) // this value is the same I just changed the first character from r to p
238+
}
239+
172240
func makeBPFHTTP2Info(buf, rbuf []byte, len int) BPFHTTP2Info {
173241
var info BPFHTTP2Info
174242
copy(info.Data[:], buf)
@@ -177,3 +245,12 @@ func makeBPFHTTP2Info(buf, rbuf []byte, len int) BPFHTTP2Info {
177245

178246
return info
179247
}
248+
249+
func makeBPFHTTP2InfoNewRequest(buf, rbuf []byte, len int) BPFHTTP2Info {
250+
info := makeBPFHTTP2Info(buf, rbuf, len)
251+
info.ConnInfo.D_port = 1
252+
info.ConnInfo.S_port = 1
253+
info.NewConn = 1
254+
255+
return info
256+
}

pkg/internal/ebpf/generictracer/bpf_arm64_bpfel.go

+4-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)