annotate src/core/ngx_bpf.h @ 8794:ba5977b38b2e quic

HTTP/3: reordered H3_MISSING_SETTINGS and H3_FRAME_UNEXPECTED. The quic-http-34 is ambiguous as to what error should be generated for the first frame in control stream: Each side MUST initiate a single control stream at the beginning of the connection and send its SETTINGS frame as the first frame on this stream. If the first frame of the control stream is any other frame type, this MUST be treated as a connection error of type H3_MISSING_SETTINGS. If a DATA frame is received on a control stream, the recipient MUST respond with a connection error of type H3_FRAME_UNEXPECTED. If a HEADERS frame is received on a control stream, the recipient MUST respond with a connection error of type H3_FRAME_UNEXPECTED. Previously, H3_FRAME_UNEXPECTED had priority, but now H3_MISSING_SETTINGS has. The arguments in the spec sound more compelling for H3_MISSING_SETTINGS.
author Roman Arutyunyan <arut@nginx.com>
date Fri, 11 Jun 2021 10:56:51 +0300
parents d3747ba486e7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8675
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
1
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
2 /*
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
3 * Copyright (C) Nginx, Inc.
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
4 */
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
5
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
6
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
7 #ifndef _NGX_BPF_H_INCLUDED_
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
8 #define _NGX_BPF_H_INCLUDED_
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
9
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
10
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
11 #include <ngx_config.h>
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
12 #include <ngx_core.h>
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
13
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
14 #include <linux/bpf.h>
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
15
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
16
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
17 typedef struct {
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
18 char *name;
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
19 int offset;
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
20 } ngx_bpf_reloc_t;
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
21
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
22 typedef struct {
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
23 char *license;
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
24 enum bpf_prog_type type;
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
25 struct bpf_insn *ins;
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
26 size_t nins;
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
27 ngx_bpf_reloc_t *relocs;
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
28 size_t nrelocs;
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
29 } ngx_bpf_program_t;
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
30
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
31
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
32 void ngx_bpf_program_link(ngx_bpf_program_t *program, const char *symbol,
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
33 int fd);
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
34 int ngx_bpf_load_program(ngx_log_t *log, ngx_bpf_program_t *program);
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
35
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
36 int ngx_bpf_map_create(ngx_log_t *log, enum bpf_map_type type, int key_size,
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
37 int value_size, int max_entries, uint32_t map_flags);
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
38 int ngx_bpf_map_update(int fd, const void *key, const void *value,
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
39 uint64_t flags);
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
40 int ngx_bpf_map_delete(int fd, const void *key);
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
41 int ngx_bpf_map_lookup(int fd, const void *key, void *value);
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
42
d3747ba486e7 Core: added interface to linux bpf() system call.
Vladimir Homutov <vl@nginx.com>
parents:
diff changeset
43 #endif /* _NGX_BPF_H_INCLUDED_ */