diff options
Diffstat (limited to 'man7/udp.7')
-rw-r--r-- | man7/udp.7 | 54 |
1 files changed, 46 insertions, 8 deletions
diff --git a/man7/udp.7 b/man7/udp.7 index b3963ee56..45c5cad1f 100644 --- a/man7/udp.7 +++ b/man7/udp.7 @@ -1,15 +1,10 @@ -.\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>. +.\" SPDX-License-Identifier: Linux-man-pages-1-para .\" -.\" %%%LICENSE_START(VERBATIM_ONE_PARA) -.\" Permission is granted to distribute possibly modified copies -.\" of this page provided the header is included verbatim, -.\" and in case of nontrivial modification author and date -.\" of the modification is added to the header. -.\" %%%LICENSE_END +.\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>. .\" .\" $Id: udp.7,v 1.7 2000/01/22 01:55:05 freitag Exp $ .\" -.TH udp 7 2022-12-04 "Linux man-pages 6.03" +.TH udp 7 2023-07-15 "Linux man-pages 6.05.01" .SH NAME udp \- User Datagram Protocol for IPv4 .SH SYNOPSIS @@ -204,6 +199,49 @@ portable. .\" UDP_ENCAP_ESPINUDP draft-ietf-ipsec-udp-encaps-06 .\" UDP_ENCAP_L2TPINUDP rfc2661 .\" FIXME Document UDP_NO_CHECK6_TX and UDP_NO_CHECK6_RX, added in Linux 3.16 +.TP +.BR UDP_SEGMENT " (since Linux 4.18)" +Enables UDP segmentation offload. +Segmentation offload reduces +.BR send (2) +cost by transferring multiple datagrams worth of data +as a single large packet through the kernel transmit path, +even when that exceeds MTU. +As late as possible, +the large packet is split by segment size into a series of datagrams. +This segmentation offload step is deferred to hardware if supported, +else performed in software. +This option takes a value in the range +.RB [ 0 ,\~ USHRT_MAX ] +that sets the segment size: +the size of datagram payload, +excluding the UDP header. +The segment size must be chosen such that +at most 64 datagrams are sent in a single call +and that the datagrams after segmentation meet +the same MTU rules that apply to datagrams sent without this option. +Segmentation offload depends on checksum offload, +as datagram checksums are computed after segmentation. +The option may also be set for individual +.BR sendmsg (2) +calls by passing it as a +.BR cmsg (3). +A value of zero disables the feature. +This option should not be used in code intended to be portable. +.TP +.BR UDP_GRO " (since Linux 5.0)" +Enables UDP receive offload. +If enabled, +the socket may receive multiple datagrams worth of data +as a single large buffer, +together with a +.BR cmsg (3) +that holds the segment size. +This option is the inverse of segmentation offload. +It reduces receive cost by handling multiple datagrams worth of data +as a single large packet in the kernel receive path, +even when that exceeds MTU. +This option should not be used in code intended to be portable. .SS Ioctls These ioctls can be accessed using .BR ioctl (2). |