nghttpx: Rename eBPF options
This commit is contained in:
parent
4292bd7ad9
commit
7d13891066
|
@ -177,8 +177,8 @@ OPTIONS = [
|
||||||
"tls13-ciphers",
|
"tls13-ciphers",
|
||||||
"tls13-client-ciphers",
|
"tls13-client-ciphers",
|
||||||
"no-strip-incoming-early-data",
|
"no-strip-incoming-early-data",
|
||||||
"bpf-program-file",
|
"quic-bpf-program-file",
|
||||||
"no-bpf",
|
"no-quic-bpf",
|
||||||
"http2-altsvc",
|
"http2-altsvc",
|
||||||
"frontend-http3-read-timeout",
|
"frontend-http3-read-timeout",
|
||||||
"frontend-quic-idle-timeout",
|
"frontend-quic-idle-timeout",
|
||||||
|
|
19
src/shrpx.cc
19
src/shrpx.cc
|
@ -2905,13 +2905,14 @@ QUIC:
|
||||||
<< util::duration_str(config->quic.upstream.timeout.idle) << R"(
|
<< util::duration_str(config->quic.upstream.timeout.idle) << R"(
|
||||||
--frontend-quic-debug-log
|
--frontend-quic-debug-log
|
||||||
Output QUIC debug log to /dev/stderr.
|
Output QUIC debug log to /dev/stderr.
|
||||||
--bpf-program-file=<PATH>
|
--quic-bpf-program-file=<PATH>
|
||||||
Specify a path to eBPF program file reuseport_kern.o to
|
Specify a path to eBPF program file reuseport_kern.o to
|
||||||
direct an incoming QUIC UDP datagram to a correct
|
direct an incoming QUIC UDP datagram to a correct
|
||||||
socket.
|
socket.
|
||||||
Default: )"
|
Default: )"
|
||||||
<< config->quic.bpf.prog_file << R"(
|
<< config->quic.bpf.prog_file << R"(
|
||||||
--no-bpf Disable eBPF.
|
--no-quic-bpf
|
||||||
|
Disable eBPF.
|
||||||
--frontend-http3-window-size=<SIZE>
|
--frontend-http3-window-size=<SIZE>
|
||||||
Sets the per-stream initial window size of HTTP/3
|
Sets the per-stream initial window size of HTTP/3
|
||||||
frontend connection.
|
frontend connection.
|
||||||
|
@ -3648,8 +3649,9 @@ int main(int argc, char **argv) {
|
||||||
{SHRPX_OPT_NO_HTTP2_CIPHER_BLOCK_LIST.c_str(), no_argument, &flag, 167},
|
{SHRPX_OPT_NO_HTTP2_CIPHER_BLOCK_LIST.c_str(), no_argument, &flag, 167},
|
||||||
{SHRPX_OPT_CLIENT_NO_HTTP2_CIPHER_BLOCK_LIST.c_str(), no_argument,
|
{SHRPX_OPT_CLIENT_NO_HTTP2_CIPHER_BLOCK_LIST.c_str(), no_argument,
|
||||||
&flag, 168},
|
&flag, 168},
|
||||||
{SHRPX_OPT_BPF_PROGRAM_FILE.c_str(), required_argument, &flag, 169},
|
{SHRPX_OPT_QUIC_BPF_PROGRAM_FILE.c_str(), required_argument, &flag,
|
||||||
{SHRPX_OPT_NO_BPF.c_str(), no_argument, &flag, 170},
|
169},
|
||||||
|
{SHRPX_OPT_NO_QUIC_BPF.c_str(), no_argument, &flag, 170},
|
||||||
{SHRPX_OPT_HTTP2_ALTSVC.c_str(), required_argument, &flag, 171},
|
{SHRPX_OPT_HTTP2_ALTSVC.c_str(), required_argument, &flag, 171},
|
||||||
{SHRPX_OPT_FRONTEND_HTTP3_READ_TIMEOUT.c_str(), required_argument,
|
{SHRPX_OPT_FRONTEND_HTTP3_READ_TIMEOUT.c_str(), required_argument,
|
||||||
&flag, 172},
|
&flag, 172},
|
||||||
|
@ -4470,12 +4472,13 @@ int main(int argc, char **argv) {
|
||||||
StringRef::from_lit("yes"));
|
StringRef::from_lit("yes"));
|
||||||
break;
|
break;
|
||||||
case 169:
|
case 169:
|
||||||
// --bpf-program-file
|
// --quic-bpf-program-file
|
||||||
cmdcfgs.emplace_back(SHRPX_OPT_BPF_PROGRAM_FILE, StringRef{optarg});
|
cmdcfgs.emplace_back(SHRPX_OPT_QUIC_BPF_PROGRAM_FILE,
|
||||||
|
StringRef{optarg});
|
||||||
break;
|
break;
|
||||||
case 170:
|
case 170:
|
||||||
// --no-bpf
|
// --no-quic-bpf
|
||||||
cmdcfgs.emplace_back(SHRPX_OPT_NO_BPF, StringRef::from_lit("yes"));
|
cmdcfgs.emplace_back(SHRPX_OPT_NO_QUIC_BPF, StringRef::from_lit("yes"));
|
||||||
break;
|
break;
|
||||||
case 171:
|
case 171:
|
||||||
// --http2-altsvc
|
// --http2-altsvc
|
||||||
|
|
|
@ -1740,11 +1740,6 @@ int option_lookup_token(const char *name, size_t namelen) {
|
||||||
return SHRPX_OPTID_ALTSVC;
|
return SHRPX_OPTID_ALTSVC;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'f':
|
|
||||||
if (util::strieq_l("no-bp", name, 5)) {
|
|
||||||
return SHRPX_OPTID_NO_BPF;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'n':
|
case 'n':
|
||||||
if (util::strieq_l("daemo", name, 5)) {
|
if (util::strieq_l("daemo", name, 5)) {
|
||||||
return SHRPX_OPTID_DAEMON;
|
return SHRPX_OPTID_DAEMON;
|
||||||
|
@ -1871,6 +1866,11 @@ int option_lookup_token(const char *name, size_t namelen) {
|
||||||
return SHRPX_OPTID_SERVER_NAME;
|
return SHRPX_OPTID_SERVER_NAME;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'f':
|
||||||
|
if (util::strieq_l("no-quic-bp", name, 10)) {
|
||||||
|
return SHRPX_OPTID_NO_QUIC_BPF;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
if (util::strieq_l("tls-sct-di", name, 10)) {
|
if (util::strieq_l("tls-sct-di", name, 10)) {
|
||||||
return SHRPX_OPTID_TLS_SCT_DIR;
|
return SHRPX_OPTID_TLS_SCT_DIR;
|
||||||
|
@ -2042,9 +2042,6 @@ int option_lookup_token(const char *name, size_t namelen) {
|
||||||
case 16:
|
case 16:
|
||||||
switch (name[15]) {
|
switch (name[15]) {
|
||||||
case 'e':
|
case 'e':
|
||||||
if (util::strieq_l("bpf-program-fil", name, 15)) {
|
|
||||||
return SHRPX_OPTID_BPF_PROGRAM_FILE;
|
|
||||||
}
|
|
||||||
if (util::strieq_l("certificate-fil", name, 15)) {
|
if (util::strieq_l("certificate-fil", name, 15)) {
|
||||||
return SHRPX_OPTID_CERTIFICATE_FILE;
|
return SHRPX_OPTID_CERTIFICATE_FILE;
|
||||||
}
|
}
|
||||||
|
@ -2203,6 +2200,11 @@ int option_lookup_token(const char *name, size_t namelen) {
|
||||||
return SHRPX_OPTID_BACKEND_TLS_SNI_FIELD;
|
return SHRPX_OPTID_BACKEND_TLS_SNI_FIELD;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'e':
|
||||||
|
if (util::strieq_l("quic-bpf-program-fil", name, 20)) {
|
||||||
|
return SHRPX_OPTID_QUIC_BPF_PROGRAM_FILE;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'l':
|
case 'l':
|
||||||
if (util::strieq_l("accept-proxy-protoco", name, 20)) {
|
if (util::strieq_l("accept-proxy-protoco", name, 20)) {
|
||||||
return SHRPX_OPTID_ACCEPT_PROXY_PROTOCOL;
|
return SHRPX_OPTID_ACCEPT_PROXY_PROTOCOL;
|
||||||
|
@ -3879,13 +3881,13 @@ int parse_config(Config *config, int optid, const StringRef &opt,
|
||||||
config->http.early_data.strip_incoming = !util::strieq_l("yes", optarg);
|
config->http.early_data.strip_incoming = !util::strieq_l("yes", optarg);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
case SHRPX_OPTID_BPF_PROGRAM_FILE:
|
case SHRPX_OPTID_QUIC_BPF_PROGRAM_FILE:
|
||||||
#ifdef ENABLE_HTTP3
|
#ifdef ENABLE_HTTP3
|
||||||
config->quic.bpf.prog_file = make_string_ref(config->balloc, optarg);
|
config->quic.bpf.prog_file = make_string_ref(config->balloc, optarg);
|
||||||
#endif // ENABLE_HTTP3
|
#endif // ENABLE_HTTP3
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
case SHRPX_OPTID_NO_BPF:
|
case SHRPX_OPTID_NO_QUIC_BPF:
|
||||||
#ifdef ENABLE_HTTP3
|
#ifdef ENABLE_HTTP3
|
||||||
config->quic.bpf.disabled = util::strieq_l("yes", optarg);
|
config->quic.bpf.disabled = util::strieq_l("yes", optarg);
|
||||||
#endif // ENABLE_HTTP3
|
#endif // ENABLE_HTTP3
|
||||||
|
|
|
@ -363,9 +363,9 @@ constexpr auto SHRPX_OPT_TLS13_CLIENT_CIPHERS =
|
||||||
StringRef::from_lit("tls13-client-ciphers");
|
StringRef::from_lit("tls13-client-ciphers");
|
||||||
constexpr auto SHRPX_OPT_NO_STRIP_INCOMING_EARLY_DATA =
|
constexpr auto SHRPX_OPT_NO_STRIP_INCOMING_EARLY_DATA =
|
||||||
StringRef::from_lit("no-strip-incoming-early-data");
|
StringRef::from_lit("no-strip-incoming-early-data");
|
||||||
constexpr auto SHRPX_OPT_BPF_PROGRAM_FILE =
|
constexpr auto SHRPX_OPT_QUIC_BPF_PROGRAM_FILE =
|
||||||
StringRef::from_lit("bpf-program-file");
|
StringRef::from_lit("quic-bpf-program-file");
|
||||||
constexpr auto SHRPX_OPT_NO_BPF = StringRef::from_lit("no-bpf");
|
constexpr auto SHRPX_OPT_NO_QUIC_BPF = StringRef::from_lit("no-quic-bpf");
|
||||||
constexpr auto SHRPX_OPT_HTTP2_ALTSVC = StringRef::from_lit("http2-altsvc");
|
constexpr auto SHRPX_OPT_HTTP2_ALTSVC = StringRef::from_lit("http2-altsvc");
|
||||||
constexpr auto SHRPX_OPT_FRONTEND_HTTP3_READ_TIMEOUT =
|
constexpr auto SHRPX_OPT_FRONTEND_HTTP3_READ_TIMEOUT =
|
||||||
StringRef::from_lit("frontend-http3-read-timeout");
|
StringRef::from_lit("frontend-http3-read-timeout");
|
||||||
|
@ -1149,7 +1149,6 @@ enum {
|
||||||
SHRPX_OPTID_BACKEND_TLS_SNI_FIELD,
|
SHRPX_OPTID_BACKEND_TLS_SNI_FIELD,
|
||||||
SHRPX_OPTID_BACKEND_WRITE_TIMEOUT,
|
SHRPX_OPTID_BACKEND_WRITE_TIMEOUT,
|
||||||
SHRPX_OPTID_BACKLOG,
|
SHRPX_OPTID_BACKLOG,
|
||||||
SHRPX_OPTID_BPF_PROGRAM_FILE,
|
|
||||||
SHRPX_OPTID_CACERT,
|
SHRPX_OPTID_CACERT,
|
||||||
SHRPX_OPTID_CERTIFICATE_FILE,
|
SHRPX_OPTID_CERTIFICATE_FILE,
|
||||||
SHRPX_OPTID_CIPHERS,
|
SHRPX_OPTID_CIPHERS,
|
||||||
|
@ -1220,13 +1219,13 @@ enum {
|
||||||
SHRPX_OPTID_MAX_RESPONSE_HEADER_FIELDS,
|
SHRPX_OPTID_MAX_RESPONSE_HEADER_FIELDS,
|
||||||
SHRPX_OPTID_MRUBY_FILE,
|
SHRPX_OPTID_MRUBY_FILE,
|
||||||
SHRPX_OPTID_NO_ADD_X_FORWARDED_PROTO,
|
SHRPX_OPTID_NO_ADD_X_FORWARDED_PROTO,
|
||||||
SHRPX_OPTID_NO_BPF,
|
|
||||||
SHRPX_OPTID_NO_HOST_REWRITE,
|
SHRPX_OPTID_NO_HOST_REWRITE,
|
||||||
SHRPX_OPTID_NO_HTTP2_CIPHER_BLACK_LIST,
|
SHRPX_OPTID_NO_HTTP2_CIPHER_BLACK_LIST,
|
||||||
SHRPX_OPTID_NO_HTTP2_CIPHER_BLOCK_LIST,
|
SHRPX_OPTID_NO_HTTP2_CIPHER_BLOCK_LIST,
|
||||||
SHRPX_OPTID_NO_KQUEUE,
|
SHRPX_OPTID_NO_KQUEUE,
|
||||||
SHRPX_OPTID_NO_LOCATION_REWRITE,
|
SHRPX_OPTID_NO_LOCATION_REWRITE,
|
||||||
SHRPX_OPTID_NO_OCSP,
|
SHRPX_OPTID_NO_OCSP,
|
||||||
|
SHRPX_OPTID_NO_QUIC_BPF,
|
||||||
SHRPX_OPTID_NO_SERVER_PUSH,
|
SHRPX_OPTID_NO_SERVER_PUSH,
|
||||||
SHRPX_OPTID_NO_SERVER_REWRITE,
|
SHRPX_OPTID_NO_SERVER_REWRITE,
|
||||||
SHRPX_OPTID_NO_STRIP_INCOMING_EARLY_DATA,
|
SHRPX_OPTID_NO_STRIP_INCOMING_EARLY_DATA,
|
||||||
|
@ -1241,6 +1240,7 @@ enum {
|
||||||
SHRPX_OPTID_PRIVATE_KEY_FILE,
|
SHRPX_OPTID_PRIVATE_KEY_FILE,
|
||||||
SHRPX_OPTID_PRIVATE_KEY_PASSWD_FILE,
|
SHRPX_OPTID_PRIVATE_KEY_PASSWD_FILE,
|
||||||
SHRPX_OPTID_PSK_SECRETS,
|
SHRPX_OPTID_PSK_SECRETS,
|
||||||
|
SHRPX_OPTID_QUIC_BPF_PROGRAM_FILE,
|
||||||
SHRPX_OPTID_READ_BURST,
|
SHRPX_OPTID_READ_BURST,
|
||||||
SHRPX_OPTID_READ_RATE,
|
SHRPX_OPTID_READ_RATE,
|
||||||
SHRPX_OPTID_REDIRECT_HTTPS_PORT,
|
SHRPX_OPTID_REDIRECT_HTTPS_PORT,
|
||||||
|
|
Loading…
Reference in New Issue