[PATCH] Updates struct tcp_zerocopy_receive from 5.11 to netinet/tcp.h.

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Tue Oct 28 12:44:42 GMT 2025



On 24/10/25 06:24, Jiayuan Chen wrote:
> This patch updates struct tcp_zerocopy_receive to contain filed including
> copybuf_address, copybuf_len, and others.
> 
> Signed-off-by: Jiayuan Chen <jiayuan.chen@linux.dev>

LGTM, thanks.

There are still some missing struct and updates:

  * tcpi_delivery_rate_app_limited/tcpi_delivery_rate_app_limited and a lot
    of metrics for tcp_info

  * netlink attributes types for SCM_TIMESTAMPING_OPT_STATS

  * INET_DIAG_MD5SIG

  * setsockopt(TCP_AO_ADD_KEY) definitions.

Do you plan to add these as well?

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

> ---
>  sysdeps/gnu/netinet/tcp.h | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/sysdeps/gnu/netinet/tcp.h b/sysdeps/gnu/netinet/tcp.h
> index 7a3500b74c..a4e7674de1 100644
> --- a/sysdeps/gnu/netinet/tcp.h
> +++ b/sysdeps/gnu/netinet/tcp.h
> @@ -346,6 +346,15 @@ struct tcp_zerocopy_receive
>    uint64_t address; /* In: address of mapping.  */
>    uint32_t length; /* In/out: number of bytes to map/mapped.  */
>    uint32_t recv_skip_hint; /* Out: amount of bytes to skip.  */
> +  uint32_t inq; /* Out: amount of bytes in read queue.  */
> +  int32_t err; /* Out: socket error.  */
> +  uint64_t copybuf_address; /* On: copybuf address (small reads).  */
> +  int32_t copybuf_len; /* In/Out: copybuf bytes avail/used or error.  */
> +  uint32_t flags; /* In: flags.  */
> +  uint64_t msg_control; /* Ancillary data.  */
> +  uint64_t msg_controllen;
> +  uint32_t msg_flags;
> +  uint32_t reserved; /* Set to 0 for now.  */
>  };
>  
>  #endif /* Misc.  */



More information about the Libc-alpha mailing list