mirror of
https://github.com/nginx/nginx.git
synced 2025-07-20 11:16:38 +08:00
Merge dda2caafad
into c52c5698cd
This commit is contained in:
commit
7f155dec0e
@ -67,7 +67,7 @@ char _license[] SEC("license") = LICENSE;
|
|||||||
* actual map object is created by the "bpf" system call,
|
* actual map object is created by the "bpf" system call,
|
||||||
* all pointers to this variable are replaced by the bpf loader
|
* all pointers to this variable are replaced by the bpf loader
|
||||||
*/
|
*/
|
||||||
struct bpf_map_def SEC("maps") ngx_quic_sockmap;
|
extern int ngx_quic_sockmap;
|
||||||
|
|
||||||
|
|
||||||
SEC(PROGNAME)
|
SEC(PROGNAME)
|
||||||
|
@ -7,38 +7,42 @@
|
|||||||
|
|
||||||
|
|
||||||
static ngx_bpf_reloc_t bpf_reloc_prog_ngx_quic_reuseport_helper[] = {
|
static ngx_bpf_reloc_t bpf_reloc_prog_ngx_quic_reuseport_helper[] = {
|
||||||
{ "ngx_quic_sockmap", 55 },
|
{ "ngx_quic_sockmap", 59 },
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct bpf_insn bpf_insn_prog_ngx_quic_reuseport_helper[] = {
|
static struct bpf_insn bpf_insn_prog_ngx_quic_reuseport_helper[] = {
|
||||||
/* opcode dst src offset imm */
|
/* opcode dst src offset imm */
|
||||||
{ 0x79, BPF_REG_4, BPF_REG_1, (int16_t) 0, 0x0 },
|
{ 0x79, BPF_REG_2, BPF_REG_1, (int16_t) 0, 0x0 },
|
||||||
{ 0x79, BPF_REG_3, BPF_REG_1, (int16_t) 8, 0x0 },
|
{ 0x79, BPF_REG_3, BPF_REG_1, (int16_t) 8, 0x0 },
|
||||||
{ 0xbf, BPF_REG_2, BPF_REG_4, (int16_t) 0, 0x0 },
|
{ 0xbf, BPF_REG_6, BPF_REG_2, (int16_t) 0, 0x0 },
|
||||||
{ 0x7, BPF_REG_2, BPF_REG_0, (int16_t) 0, 0x8 },
|
{ 0x7, BPF_REG_6, BPF_REG_0, (int16_t) 0, 0x8 },
|
||||||
{ 0x2d, BPF_REG_2, BPF_REG_3, (int16_t) 54, 0x0 },
|
{ 0x2d, BPF_REG_6, BPF_REG_3, (int16_t) 58, 0x0 },
|
||||||
{ 0xbf, BPF_REG_5, BPF_REG_4, (int16_t) 0, 0x0 },
|
{ 0xbf, BPF_REG_4, BPF_REG_2, (int16_t) 0, 0x0 },
|
||||||
{ 0x7, BPF_REG_5, BPF_REG_0, (int16_t) 0, 0x9 },
|
{ 0x7, BPF_REG_4, BPF_REG_0, (int16_t) 0, 0x9 },
|
||||||
{ 0x2d, BPF_REG_5, BPF_REG_3, (int16_t) 51, 0x0 },
|
{ 0x2d, BPF_REG_4, BPF_REG_3, (int16_t) 55, 0x0 },
|
||||||
|
{ 0xb7, BPF_REG_4, BPF_REG_0, (int16_t) 0, 0x8 },
|
||||||
{ 0xb7, BPF_REG_5, BPF_REG_0, (int16_t) 0, 0x14 },
|
{ 0xb7, BPF_REG_5, BPF_REG_0, (int16_t) 0, 0x14 },
|
||||||
{ 0xb7, BPF_REG_0, BPF_REG_0, (int16_t) 0, 0x9 },
|
{ 0xb7, BPF_REG_0, BPF_REG_0, (int16_t) 0, 0x9 },
|
||||||
{ 0x71, BPF_REG_6, BPF_REG_2, (int16_t) 0, 0x0 },
|
{ 0x71, BPF_REG_6, BPF_REG_6, (int16_t) 0, 0x0 },
|
||||||
{ 0x67, BPF_REG_6, BPF_REG_0, (int16_t) 0, 0x38 },
|
{ 0x67, BPF_REG_6, BPF_REG_0, (int16_t) 0, 0x38 },
|
||||||
{ 0xc7, BPF_REG_6, BPF_REG_0, (int16_t) 0, 0x38 },
|
{ 0xc7, BPF_REG_6, BPF_REG_0, (int16_t) 0, 0x38 },
|
||||||
{ 0x65, BPF_REG_6, BPF_REG_0, (int16_t) 10, 0xffffffff },
|
{ 0x65, BPF_REG_6, BPF_REG_0, (int16_t) 11, 0xffffffff },
|
||||||
{ 0xbf, BPF_REG_2, BPF_REG_4, (int16_t) 0, 0x0 },
|
{ 0xbf, BPF_REG_5, BPF_REG_2, (int16_t) 0, 0x0 },
|
||||||
{ 0x7, BPF_REG_2, BPF_REG_0, (int16_t) 0, 0xd },
|
{ 0x7, BPF_REG_5, BPF_REG_0, (int16_t) 0, 0xd },
|
||||||
{ 0x2d, BPF_REG_2, BPF_REG_3, (int16_t) 42, 0x0 },
|
{ 0x2d, BPF_REG_5, BPF_REG_3, (int16_t) 45, 0x0 },
|
||||||
{ 0xbf, BPF_REG_5, BPF_REG_4, (int16_t) 0, 0x0 },
|
{ 0xbf, BPF_REG_4, BPF_REG_2, (int16_t) 0, 0x0 },
|
||||||
{ 0x7, BPF_REG_5, BPF_REG_0, (int16_t) 0, 0xe },
|
{ 0x7, BPF_REG_4, BPF_REG_0, (int16_t) 0, 0xe },
|
||||||
{ 0x2d, BPF_REG_5, BPF_REG_3, (int16_t) 39, 0x0 },
|
{ 0x2d, BPF_REG_4, BPF_REG_3, (int16_t) 42, 0x0 },
|
||||||
|
{ 0xb7, BPF_REG_4, BPF_REG_0, (int16_t) 0, 0xd },
|
||||||
{ 0xb7, BPF_REG_0, BPF_REG_0, (int16_t) 0, 0xe },
|
{ 0xb7, BPF_REG_0, BPF_REG_0, (int16_t) 0, 0xe },
|
||||||
{ 0x71, BPF_REG_5, BPF_REG_2, (int16_t) 0, 0x0 },
|
{ 0x71, BPF_REG_5, BPF_REG_5, (int16_t) 0, 0x0 },
|
||||||
{ 0xb7, BPF_REG_6, BPF_REG_0, (int16_t) 0, 0x8 },
|
{ 0xb7, BPF_REG_6, BPF_REG_0, (int16_t) 0, 0x8 },
|
||||||
{ 0x2d, BPF_REG_6, BPF_REG_5, (int16_t) 35, 0x0 },
|
{ 0x2d, BPF_REG_6, BPF_REG_5, (int16_t) 37, 0x0 },
|
||||||
{ 0xf, BPF_REG_5, BPF_REG_0, (int16_t) 0, 0x0 },
|
{ 0xbf, BPF_REG_6, BPF_REG_2, (int16_t) 0, 0x0 },
|
||||||
{ 0xf, BPF_REG_4, BPF_REG_5, (int16_t) 0, 0x0 },
|
{ 0xf, BPF_REG_6, BPF_REG_0, (int16_t) 0, 0x0 },
|
||||||
{ 0x2d, BPF_REG_4, BPF_REG_3, (int16_t) 32, 0x0 },
|
{ 0xf, BPF_REG_6, BPF_REG_5, (int16_t) 0, 0x0 },
|
||||||
|
{ 0x2d, BPF_REG_6, BPF_REG_3, (int16_t) 33, 0x0 },
|
||||||
|
{ 0xf, BPF_REG_2, BPF_REG_4, (int16_t) 0, 0x0 },
|
||||||
{ 0xbf, BPF_REG_4, BPF_REG_2, (int16_t) 0, 0x0 },
|
{ 0xbf, BPF_REG_4, BPF_REG_2, (int16_t) 0, 0x0 },
|
||||||
{ 0x7, BPF_REG_4, BPF_REG_0, (int16_t) 0, 0x9 },
|
{ 0x7, BPF_REG_4, BPF_REG_0, (int16_t) 0, 0x9 },
|
||||||
{ 0x2d, BPF_REG_4, BPF_REG_3, (int16_t) 29, 0x0 },
|
{ 0x2d, BPF_REG_4, BPF_REG_3, (int16_t) 29, 0x0 },
|
||||||
@ -86,3 +90,4 @@ ngx_bpf_program_t ngx_quic_reuseport_helper = {
|
|||||||
.license = "BSD",
|
.license = "BSD",
|
||||||
.type = BPF_PROG_TYPE_SK_REUSEPORT,
|
.type = BPF_PROG_TYPE_SK_REUSEPORT,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user