diff options
| author | Vladimir Homutov <vl@nginx.com> | 2021-07-15 14:22:00 +0300 |
|---|---|---|
| committer | Vladimir Homutov <vl@nginx.com> | 2021-07-15 14:22:00 +0300 |
| commit | c0764bc3e91713806875904f9c46bc68815b7bba (patch) | |
| tree | 72801e702c24c4c6c475c9aec07adb6730ad424e /auto/os/linux | |
| parent | 105de9762f840bf97d939a931b47bba9a9bfe226 (diff) | |
| download | nginx-c0764bc3e91713806875904f9c46bc68815b7bba.tar.gz nginx-c0764bc3e91713806875904f9c46bc68815b7bba.tar.bz2 | |
QUIC: added support for segmentation offloading.
To improve output performance, UDP segmentation offloading is used
if available. If there is a significant amount of data in an output
queue and path is verified, QUIC packets are not sent one-by-one,
but instead are collected in a buffer, which is then passed to kernel
in a single sendmsg call, using UDP GSO. Such method greatly decreases
number of system calls and thus system load.
Diffstat (limited to '')
| -rw-r--r-- | auto/os/linux | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/auto/os/linux b/auto/os/linux index 3f1738c74..3b9c28419 100644 --- a/auto/os/linux +++ b/auto/os/linux @@ -281,6 +281,27 @@ if [ $ngx_found = yes ]; then fi +# UDP_SEGMENT socket option is used for segmentation offloading + +ngx_feature="UDP_SEGMENT" +ngx_feature_name="NGX_HAVE_UDP_SEGMENT" +ngx_feature_run=no +ngx_feature_incs="#include <sys/socket.h> + #include <stdint.h> + #include <netinet/udp.h>" +ngx_feature_path= +ngx_feature_libs= +ngx_feature_test="socklen_t optlen = sizeof(int); + int val; + getsockopt(0, SOL_UDP, UDP_SEGMENT, &val, &optlen)" +. auto/feature + +if [ $ngx_found = yes ]; then + UDP_SEGMENT_FOUND=YES + have=NGX_HAVE_UDP_SEGMENT . auto/have +fi + + # ngx_quic_bpf module uses sockhash to select socket from reuseport group, # support appeared in Linux-5.7: # |
