tcp: Avoid conditionally defined fields in union lro_address
The layout of the structure ends up depending on whether the including file includes opt_inet.h and opt_inet6.h, so different compilation units can end up seeing different versions of the structure. Fix this by unconditionally defining the address fields. As a side effect, this eliminates some duplication in the kernel's CTF type graph. Reviewed by: rscheff, tuexen MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34242
This commit is contained in:
parent
f0fd4a32c4
commit
b4f60fab5d
@ -34,6 +34,7 @@
|
||||
#define _TCP_LRO_H_
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
#ifndef TCP_LRO_ENTRIES
|
||||
/* Define default number of LRO entries per RX queue */
|
||||
@ -80,20 +81,12 @@ union lro_address {
|
||||
uint16_t d_port; /* destination TCP/UDP port */
|
||||
uint32_t vxlan_vni; /* VXLAN virtual network identifier */
|
||||
union {
|
||||
#ifdef INET
|
||||
struct in_addr v4;
|
||||
#endif
|
||||
#ifdef INET6
|
||||
struct in6_addr v6;
|
||||
#endif
|
||||
} s_addr; /* source IPv4/IPv6 address */
|
||||
union {
|
||||
#ifdef INET
|
||||
struct in_addr v4;
|
||||
#endif
|
||||
#ifdef INET6
|
||||
struct in6_addr v6;
|
||||
#endif
|
||||
} d_addr; /* destination IPv4/IPv6 address */
|
||||
};
|
||||
} __aligned(sizeof(u_long));
|
||||
|
Loading…
Reference in New Issue
Block a user