diff options
author | Ioana-Ruxandra Stăncioi <stancioi@google.com> | 2020-08-03 10:33:33 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-08-04 03:57:40 +0300 |
commit | 88fab21c691bb1ff164e540735237a385e3afeaf (patch) | |
tree | 99119721f18bc9b817222c48b31e3a6dba356603 /include/uapi/linux/seg6_iptunnel.h | |
parent | 730e700e2c19d87e578ff0e7d8cb1d4a02b036d2 (diff) | |
download | linux-88fab21c691bb1ff164e540735237a385e3afeaf.tar.xz |
seg6_iptunnel: Refactor seg6_lwt_headroom out of uapi header
Refactor the function seg6_lwt_headroom out of the seg6_iptunnel.h uapi
header, because it is only used in seg6_iptunnel.c. Moreover, it is only
used in the kernel code, as indicated by the "#ifdef __KERNEL__".
Suggested-by: David Miller <davem@davemloft.net>
Signed-off-by: Ioana-Ruxandra Stăncioi <stancioi@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/seg6_iptunnel.h')
-rw-r--r-- | include/uapi/linux/seg6_iptunnel.h | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/include/uapi/linux/seg6_iptunnel.h b/include/uapi/linux/seg6_iptunnel.h index 09fb608a35ec..eb815e0d0ac3 100644 --- a/include/uapi/linux/seg6_iptunnel.h +++ b/include/uapi/linux/seg6_iptunnel.h @@ -37,25 +37,4 @@ enum { SEG6_IPTUN_MODE_L2ENCAP, }; -#ifdef __KERNEL__ - -static inline size_t seg6_lwt_headroom(struct seg6_iptunnel_encap *tuninfo) -{ - int head = 0; - - switch (tuninfo->mode) { - case SEG6_IPTUN_MODE_INLINE: - break; - case SEG6_IPTUN_MODE_ENCAP: - head = sizeof(struct ipv6hdr); - break; - case SEG6_IPTUN_MODE_L2ENCAP: - return 0; - } - - return ((tuninfo->srh->hdrlen + 1) << 3) + head; -} - -#endif - #endif |