annotate src/event/quic/bpf/makefile @ 8946:56dec0d4e5b1 quic

QUIC: avoid excessive buffer allocations in stream output. Previously, when a few bytes were send to a QUIC stream by the application, a 4K buffer was allocated for these bytes. Then a STREAM frame was created and that entire buffer was used as data for that frame. The frame with the buffer were in use up until the frame was acked by client. Meanwhile, when more bytes were send to the stream, more buffers were allocated and assigned as data to newer STREAM frames. In this scenario most buffer memory is unused. Now the unused part of the stream output buffer is available for further stream output while earlier parts of the buffer are waiting to be acked. This is achieved by splitting the output buffer.
author Roman Arutyunyan <arut@nginx.com>
date Fri, 24 Dec 2021 18:13:51 +0300
parents 7df607cb2d11
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8676
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
1 CFLAGS=-O2 -Wall
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
2
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
3 LICENSE=BSD
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
4
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
5 PROGNAME=ngx_quic_reuseport_helper
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
6 RESULT=ngx_event_quic_bpf_code
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
7 DEST=../$(RESULT).c
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
8
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
9 all: $(RESULT)
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
10
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
11 $(RESULT): $(PROGNAME).o
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
12 LICENSE=$(LICENSE) PROGNAME=$(PROGNAME) bash ./bpfgen.sh $< > $@
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
13
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
14 DEFS=-DPROGNAME=\"$(PROGNAME)\" \
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
15 -DLICENSE_$(LICENSE) \
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
16 -DLICENSE=\"$(LICENSE)\" \
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
17
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
18 $(PROGNAME).o: $(PROGNAME).c
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
19 clang $(CFLAGS) $(DEFS) -target bpf -c $< -o $@
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
20
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
21 install: $(RESULT)
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
22 cp $(RESULT) $(DEST)
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
23
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
24 clean:
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
25 @rm -f $(RESULT) *.o
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
26
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
27 debug: $(PROGNAME).o
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
28 llvm-objdump -S -no-show-raw-insn $<
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
29
7df607cb2d11 QUIC: ngx_quic_bpf module.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
30 .DELETE_ON_ERROR: