diff mbox series

[04/12] udp_encaps: Add new UDP_ENCAP constants

Message ID 20240731172332.683815-5-tom@herbertland.com (mailing list archive)
State Changes Requested
Headers show
Series flow_dissector: Dissect UDP encapsulation protocols | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Guessed tree name to be net-next, async
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 58 this patch: 58
netdev/build_tools success Errors and warnings before: 10 this patch: 10
netdev/cc_maintainers fail 2 maintainers not CCed: steffen.klassert@secunet.com antony.antony@secunet.com
netdev/build_clang success Errors and warnings before: 76 this patch: 76
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 2110 this patch: 2110
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 24 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Tom Herbert July 31, 2024, 5:23 p.m. UTC
Add constants for various UDP encapsulations that are supported

Signed-off-by: Tom Herbert <tom@herbertland.com>
---
 include/uapi/linux/udp.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Willem de Bruijn Aug. 1, 2024, 1:22 p.m. UTC | #1
Tom Herbert wrote:
> Add constants for various UDP encapsulations that are supported
> 
> Signed-off-by: Tom Herbert <tom@herbertland.com>
> ---
>  include/uapi/linux/udp.h | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/include/uapi/linux/udp.h b/include/uapi/linux/udp.h
> index 1a0fe8b151fb..0432a9a6536d 100644
> --- a/include/uapi/linux/udp.h
> +++ b/include/uapi/linux/udp.h
> @@ -36,6 +36,7 @@ struct udphdr {
>  #define UDP_GRO		104	/* This socket can receive UDP GRO packets */
>  
>  /* UDP encapsulation types */
> +#define UDP_ENCAP_NONE		0
>  #define UDP_ENCAP_ESPINUDP_NON_IKE	1 /* unused  draft-ietf-ipsec-nat-t-ike-00/01 */
>  #define UDP_ENCAP_ESPINUDP	2 /* draft-ietf-ipsec-udp-encaps-06 */
>  #define UDP_ENCAP_L2TPINUDP	3 /* rfc2661 */
> @@ -43,5 +44,17 @@ struct udphdr {
>  #define UDP_ENCAP_GTP1U		5 /* 3GPP TS 29.060 */
>  #define UDP_ENCAP_RXRPC		6
>  #define TCP_ENCAP_ESPINTCP	7 /* Yikes, this is really xfrm encap types. */
> +#define UDP_ENCAP_TIPC		8
> +#define UDP_ENCAP_FOU		9
> +#define UDP_ENCAP_GUE		10
> +#define UDP_ENCAP_SCTP		11
> +#define UDP_ENCAP_RXE		12
> +#define UDP_ENCAP_PFCP		13
> +#define UDP_ENCAP_WIREGUARD	14
> +#define UDP_ENCAP_BAREUDP	15
> +#define UDP_ENCAP_VXLAN		16
> +#define UDP_ENCAP_VXLAN_GPE	17
> +#define UDP_ENCAP_GENEVE	18
> +#define UDP_ENCAP_AMT		19

Should these existing constants never have been UAPI to begin with?
Tom Herbert Aug. 15, 2024, 6:52 p.m. UTC | #2
On Thu, Aug 1, 2024 at 6:22 AM Willem de Bruijn
<willemdebruijn.kernel@gmail.com> wrote:
>
> Tom Herbert wrote:
> > Add constants for various UDP encapsulations that are supported
> >
> > Signed-off-by: Tom Herbert <tom@herbertland.com>
> > ---
> >  include/uapi/linux/udp.h | 13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> >
> > diff --git a/include/uapi/linux/udp.h b/include/uapi/linux/udp.h
> > index 1a0fe8b151fb..0432a9a6536d 100644
> > --- a/include/uapi/linux/udp.h
> > +++ b/include/uapi/linux/udp.h
> > @@ -36,6 +36,7 @@ struct udphdr {
> >  #define UDP_GRO              104     /* This socket can receive UDP GRO packets */
> >
> >  /* UDP encapsulation types */
> > +#define UDP_ENCAP_NONE               0
> >  #define UDP_ENCAP_ESPINUDP_NON_IKE   1 /* unused  draft-ietf-ipsec-nat-t-ike-00/01 */
> >  #define UDP_ENCAP_ESPINUDP   2 /* draft-ietf-ipsec-udp-encaps-06 */
> >  #define UDP_ENCAP_L2TPINUDP  3 /* rfc2661 */
> > @@ -43,5 +44,17 @@ struct udphdr {
> >  #define UDP_ENCAP_GTP1U              5 /* 3GPP TS 29.060 */
> >  #define UDP_ENCAP_RXRPC              6
> >  #define TCP_ENCAP_ESPINTCP   7 /* Yikes, this is really xfrm encap types. */
> > +#define UDP_ENCAP_TIPC               8
> > +#define UDP_ENCAP_FOU                9
> > +#define UDP_ENCAP_GUE                10
> > +#define UDP_ENCAP_SCTP               11
> > +#define UDP_ENCAP_RXE                12
> > +#define UDP_ENCAP_PFCP               13
> > +#define UDP_ENCAP_WIREGUARD  14
> > +#define UDP_ENCAP_BAREUDP    15
> > +#define UDP_ENCAP_VXLAN              16
> > +#define UDP_ENCAP_VXLAN_GPE  17
> > +#define UDP_ENCAP_GENEVE     18
> > +#define UDP_ENCAP_AMT                19
>
> Should these existing constants never have been UAPI to begin with?

Hi Willem,

I'm inclined to think they probably should be, especially if we need
these in eBPF.

Tom

>
diff mbox series

Patch

diff --git a/include/uapi/linux/udp.h b/include/uapi/linux/udp.h
index 1a0fe8b151fb..0432a9a6536d 100644
--- a/include/uapi/linux/udp.h
+++ b/include/uapi/linux/udp.h
@@ -36,6 +36,7 @@  struct udphdr {
 #define UDP_GRO		104	/* This socket can receive UDP GRO packets */
 
 /* UDP encapsulation types */
+#define UDP_ENCAP_NONE		0
 #define UDP_ENCAP_ESPINUDP_NON_IKE	1 /* unused  draft-ietf-ipsec-nat-t-ike-00/01 */
 #define UDP_ENCAP_ESPINUDP	2 /* draft-ietf-ipsec-udp-encaps-06 */
 #define UDP_ENCAP_L2TPINUDP	3 /* rfc2661 */
@@ -43,5 +44,17 @@  struct udphdr {
 #define UDP_ENCAP_GTP1U		5 /* 3GPP TS 29.060 */
 #define UDP_ENCAP_RXRPC		6
 #define TCP_ENCAP_ESPINTCP	7 /* Yikes, this is really xfrm encap types. */
+#define UDP_ENCAP_TIPC		8
+#define UDP_ENCAP_FOU		9
+#define UDP_ENCAP_GUE		10
+#define UDP_ENCAP_SCTP		11
+#define UDP_ENCAP_RXE		12
+#define UDP_ENCAP_PFCP		13
+#define UDP_ENCAP_WIREGUARD	14
+#define UDP_ENCAP_BAREUDP	15
+#define UDP_ENCAP_VXLAN		16
+#define UDP_ENCAP_VXLAN_GPE	17
+#define UDP_ENCAP_GENEVE	18
+#define UDP_ENCAP_AMT		19
 
 #endif /* _UAPI_LINUX_UDP_H */