diff mbox series

[manpages,v2,2/2] udp.7: add UDP_GRO

Message ID 20230302154808.2139031-2-willemdebruijn.kernel@gmail.com (mailing list archive)
State Not Applicable
Headers show
Series [manpages,v2,1/2] udp.7: add UDP_SEGMENT | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Willem de Bruijn March 2, 2023, 3:48 p.m. UTC
From: Willem de Bruijn <willemb@google.com>

UDP_GRO was added in commit e20cf8d3f1f7
("udp: implement GRO for plain UDP sockets.")

    $ git describe --contains e20cf8d3f1f7
    linux/v5.0-rc1~129^2~379^2~8

Kernel source has example code in tools/testing/selftests/net/udpgro*

Per https://www.kernel.org/doc/man-pages/patches.html,
"Describe how you obtained the information in your patch":
I reviewed the relevant UDP_GRO patches.

Signed-off-by: Willem de Bruijn <willemb@google.com>

---

Changes v1->v2
  - semantic newlines: also break on comma
  - remove bold: section number following function name
---
 man7/udp.7 | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

Simon Horman March 6, 2023, 11:12 a.m. UTC | #1
On Thu, Mar 02, 2023 at 10:48:08AM -0500, Willem de Bruijn wrote:
> From: Willem de Bruijn <willemb@google.com>
> 
> UDP_GRO was added in commit e20cf8d3f1f7
> ("udp: implement GRO for plain UDP sockets.")
> 
>     $ git describe --contains e20cf8d3f1f7
>     linux/v5.0-rc1~129^2~379^2~8
> 
> Kernel source has example code in tools/testing/selftests/net/udpgro*
> 
> Per https://www.kernel.org/doc/man-pages/patches.html,
> "Describe how you obtained the information in your patch":
> I reviewed the relevant UDP_GRO patches.
> 
> Signed-off-by: Willem de Bruijn <willemb@google.com>

Reviewed-by: Simon Horman <simon.horman@corigine.com>
Alejandro Colomar March 6, 2023, 1:37 p.m. UTC | #2
Hi Willem, 

On 3/2/23 16:48, Willem de Bruijn wrote:
> From: Willem de Bruijn <willemb@google.com>
> 
> UDP_GRO was added in commit e20cf8d3f1f7
> ("udp: implement GRO for plain UDP sockets.")
> 
>     $ git describe --contains e20cf8d3f1f7
>     linux/v5.0-rc1~129^2~379^2~8
> 
> Kernel source has example code in tools/testing/selftests/net/udpgro*
> 
> Per https://www.kernel.org/doc/man-pages/patches.html,
> "Describe how you obtained the information in your patch":
> I reviewed the relevant UDP_GRO patches.
> 
> Signed-off-by: Willem de Bruijn <willemb@google.com>

Patch applied.  BTW, it was cmsg(3), not (7) :)

Cheers,

Alex

> 
> ---
> 
> Changes v1->v2
>   - semantic newlines: also break on comma
>   - remove bold: section number following function name
> ---
>  man7/udp.7 | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/man7/udp.7 b/man7/udp.7
> index 6646c1e96bb0..a350a40da340 100644
> --- a/man7/udp.7
> +++ b/man7/udp.7
> @@ -232,6 +232,20 @@ calls by passing it as a
>  .BR cmsg (7).
>  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 (7)
> +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).
diff mbox series

Patch

diff --git a/man7/udp.7 b/man7/udp.7
index 6646c1e96bb0..a350a40da340 100644
--- a/man7/udp.7
+++ b/man7/udp.7
@@ -232,6 +232,20 @@  calls by passing it as a
 .BR cmsg (7).
 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 (7)
+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).