mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 07:45:06 +07:00
ea3ebc73b4
Include <linux/in6.h> in uapi/linux/seg6.h to fix the following
linux/seg6.h userspace compilation error:
/usr/include/linux/seg6.h:31:18: error: array type has incomplete element type 'struct in6_addr'
struct in6_addr segments[0];
Include <linux/seg6.h> in uapi/linux/seg6_iptunnel.h to fix
the following linux/seg6_iptunnel.h userspace compilation error:
/usr/include/linux/seg6_iptunnel.h:26:21: error: array type has incomplete element type 'struct ipv6_sr_hdr'
struct ipv6_sr_hdr srh[0];
Fixes: a50a05f497
("ipv6: sr: add missing Kbuild export for header files")
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
51 lines
1.1 KiB
C
51 lines
1.1 KiB
C
/*
|
|
* SR-IPv6 implementation
|
|
*
|
|
* Author:
|
|
* David Lebrun <david.lebrun@uclouvain.be>
|
|
*
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version
|
|
* 2 of the License, or (at your option) any later version.
|
|
*/
|
|
|
|
#ifndef _UAPI_LINUX_SEG6_IPTUNNEL_H
|
|
#define _UAPI_LINUX_SEG6_IPTUNNEL_H
|
|
|
|
#include <linux/seg6.h> /* For struct ipv6_sr_hdr. */
|
|
|
|
enum {
|
|
SEG6_IPTUNNEL_UNSPEC,
|
|
SEG6_IPTUNNEL_SRH,
|
|
__SEG6_IPTUNNEL_MAX,
|
|
};
|
|
#define SEG6_IPTUNNEL_MAX (__SEG6_IPTUNNEL_MAX - 1)
|
|
|
|
struct seg6_iptunnel_encap {
|
|
int mode;
|
|
struct ipv6_sr_hdr srh[0];
|
|
};
|
|
|
|
#define SEG6_IPTUN_ENCAP_SIZE(x) ((sizeof(*x)) + (((x)->srh->hdrlen + 1) << 3))
|
|
|
|
enum {
|
|
SEG6_IPTUN_MODE_INLINE,
|
|
SEG6_IPTUN_MODE_ENCAP,
|
|
};
|
|
|
|
#ifdef __KERNEL__
|
|
|
|
static inline size_t seg6_lwt_headroom(struct seg6_iptunnel_encap *tuninfo)
|
|
{
|
|
int encap = (tuninfo->mode == SEG6_IPTUN_MODE_ENCAP);
|
|
|
|
return ((tuninfo->srh->hdrlen + 1) << 3) +
|
|
(encap * sizeof(struct ipv6hdr));
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|