Subject: Re: [PATCH v1 net-next 09/15] udp: Remove UDPLITE_SEND_CSCOV and UDPLITE_RECV_CSCOV.

From: Willem de Bruijn <[email-masked]>
Date: Wed, 04 Mar 2026 17:47:40 -0500

Kuniyuki Iwashima wrote:
> UDP-Lite supports variable-length checksum and has two socket
> options, UDPLITE_SEND_CSCOV and UDPLITE_RECV_CSCOV, to control
> the checksum coverage.
> 
> Let's remove the support.
> 
> setsockopt(UDPLITE_SEND_CSCOV / UDPLITE_RECV_CSCOV) was only
> available for UDP-Lite and returned -ENOPROTOOPT for UDP.
> 
> Now, the options are handled in ip_setsockopt() and
> ipv6_setsockopt(), which still return the same error.
> 
> getsockopt(UDPLITE_SEND_CSCOV / UDPLITE_RECV_CSCOV) was available
> for UDP and always returned 0, meaning full checksum, but now
> -ENOPROTOOPT is returned.
> 
> Given that getsockopt() is meaningless for UDP and even the options
> are not defined under include/uapi/, this should not be a problem.
> 
>   $ man 7 udplite
>   ...
>   BUGS
>        Where glibc support is missing, the following definitions
>        are needed:
> 
>            #define IPPROTO_UDPLITE     136
>            #define UDPLITE_SEND_CSCOV  10
>            #define UDPLITE_RECV_CSCOV  11
> 
> Signed-off-by: Kuniyuki Iwashima <[email-masked]>

> diff --git a/include/uapi/linux/udp.h b/include/uapi/linux/udp.h
> index edca3e430305..195041ffb7d8 100644
> --- a/include/uapi/linux/udp.h
> +++ b/include/uapi/linux/udp.h
> @@ -29,6 +29,7 @@ struct udphdr {
>  
>  /* UDP socket options */
>  #define UDP_CORK	1	/* Never send partially complete segments */
> +/* Don't use 10 and 11 */

Could use a bit more detail. Something like:

/* Deprecated, reserved for UDPLITE_SEND_CSCOV 10 */

>  #define UDP_ENCAP	100	/* Set the socket to accept encapsulated packets */
>  #define UDP_NO_CHECK6_TX 101	/* Disable sending checksum for UDP6X */
>  #define UDP_NO_CHECK6_RX 102	/* Disable accepting checksum for UDP6 */