Skip to content

Commit

Permalink
Core: added autotest for UDP segmentation offloading.
Browse files Browse the repository at this point in the history
--HG--
branch : nginx
  • Loading branch information
vlhomutov committed Jan 26, 2022
1 parent 6903cdd commit cdf01a3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
16 changes: 16 additions & 0 deletions auto/os/linux
Original file line number Diff line number Diff line change
Expand Up @@ -232,4 +232,20 @@ ngx_feature_test="struct crypt_data cd;
ngx_include="sys/vfs.h"; . auto/include


# UDP 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


CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64"
4 changes: 4 additions & 0 deletions src/os/unix/ngx_linux_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ typedef struct iocb ngx_aiocb_t;
#include <linux/capability.h>
#endif

#if (NGX_HAVE_UDP_SEGMENT)
#include <netinet/udp.h>
#endif


#define NGX_LISTEN_BACKLOG 511

Expand Down

0 comments on commit cdf01a3

Please sign in to comment.