Skip to content

Commit

Permalink
usm: http2: Move definition closer to usage (DataDog#32444)
Browse files Browse the repository at this point in the history
  • Loading branch information
guyarb authored Dec 23, 2024
1 parent 92bf31a commit 4ed32b9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/network/ebpf/c/protocols/http2/decoding.h
Original file line number Diff line number Diff line change
Expand Up @@ -620,13 +620,12 @@ static __always_inline void handle_first_frame(pktbuf_t pkt, __u32 *external_dat
return;
}

frame_header_remainder_t *frame_state = bpf_map_lookup_elem(&http2_remainder, tup);

http2_telemetry_t *http2_tel = get_telemetry(pkt);
if (http2_tel == NULL) {
return;
}

frame_header_remainder_t *frame_state = bpf_map_lookup_elem(&http2_remainder, tup);
bool has_valid_first_frame = pktbuf_get_first_frame(pkt, frame_state, &current_frame, http2_tel);
// If we have a state and we consumed it, then delete it.
if (frame_state != NULL && frame_state->remainder == 0) {
Expand Down

0 comments on commit 4ed32b9

Please sign in to comment.