diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/udp.h | 2 | ||||
-rw-r--r-- | include/net/sock.h | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/udp.h b/include/linux/udp.h index 832361e3e596..5b4b5274e683 100644 --- a/include/linux/udp.h +++ b/include/linux/udp.h | |||
@@ -55,6 +55,8 @@ static inline int udp_hashfn(struct net *net, unsigned num, unsigned mask) | |||
55 | struct udp_sock { | 55 | struct udp_sock { |
56 | /* inet_sock has to be the first member */ | 56 | /* inet_sock has to be the first member */ |
57 | struct inet_sock inet; | 57 | struct inet_sock inet; |
58 | #define udp_port_hash inet.sk.__sk_common.skc_u16hashes[0] | ||
59 | #define udp_portaddr_hash inet.sk.__sk_common.skc_u16hashes[1] | ||
58 | int pending; /* Any pending frames ? */ | 60 | int pending; /* Any pending frames ? */ |
59 | unsigned int corkflag; /* Cork is required */ | 61 | unsigned int corkflag; /* Cork is required */ |
60 | __u16 encap_type; /* Is this an Encapsulation socket? */ | 62 | __u16 encap_type; /* Is this an Encapsulation socket? */ |
diff --git a/include/net/sock.h b/include/net/sock.h index 55de3bd719a5..827366b62680 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -109,6 +109,7 @@ struct net; | |||
109 | * @skc_refcnt: reference count | 109 | * @skc_refcnt: reference count |
110 | * @skc_tx_queue_mapping: tx queue number for this connection | 110 | * @skc_tx_queue_mapping: tx queue number for this connection |
111 | * @skc_hash: hash value used with various protocol lookup tables | 111 | * @skc_hash: hash value used with various protocol lookup tables |
112 | * @skc_u16hashes: two u16 hash values used by UDP lookup tables | ||
112 | * @skc_family: network address family | 113 | * @skc_family: network address family |
113 | * @skc_state: Connection state | 114 | * @skc_state: Connection state |
114 | * @skc_reuse: %SO_REUSEADDR setting | 115 | * @skc_reuse: %SO_REUSEADDR setting |
@@ -131,7 +132,10 @@ struct sock_common { | |||
131 | atomic_t skc_refcnt; | 132 | atomic_t skc_refcnt; |
132 | int skc_tx_queue_mapping; | 133 | int skc_tx_queue_mapping; |
133 | 134 | ||
134 | unsigned int skc_hash; | 135 | union { |
136 | unsigned int skc_hash; | ||
137 | __u16 skc_u16hashes[2]; | ||
138 | }; | ||
135 | unsigned short skc_family; | 139 | unsigned short skc_family; |
136 | volatile unsigned char skc_state; | 140 | volatile unsigned char skc_state; |
137 | unsigned char skc_reuse; | 141 | unsigned char skc_reuse; |