.. | .. |
---|
38 | 38 | #define FLOWI_FLAG_KNOWN_NH 0x02 |
---|
39 | 39 | #define FLOWI_FLAG_SKIP_NH_OIF 0x04 |
---|
40 | 40 | __u32 flowic_secid; |
---|
41 | | - struct flowi_tunnel flowic_tun_key; |
---|
42 | 41 | kuid_t flowic_uid; |
---|
| 42 | + struct flowi_tunnel flowic_tun_key; |
---|
| 43 | + __u32 flowic_multipath_hash; |
---|
43 | 44 | }; |
---|
44 | 45 | |
---|
45 | 46 | union flowi_uli { |
---|
.. | .. |
---|
78 | 79 | #define flowi4_secid __fl_common.flowic_secid |
---|
79 | 80 | #define flowi4_tun_key __fl_common.flowic_tun_key |
---|
80 | 81 | #define flowi4_uid __fl_common.flowic_uid |
---|
| 82 | +#define flowi4_multipath_hash __fl_common.flowic_multipath_hash |
---|
81 | 83 | |
---|
82 | 84 | /* (saddr,daddr) must be grouped, same order as in IP header */ |
---|
83 | 85 | __be32 saddr; |
---|
.. | .. |
---|
114 | 116 | fl4->saddr = saddr; |
---|
115 | 117 | fl4->fl4_dport = dport; |
---|
116 | 118 | fl4->fl4_sport = sport; |
---|
| 119 | + fl4->flowi4_multipath_hash = 0; |
---|
117 | 120 | } |
---|
118 | 121 | |
---|
119 | 122 | /* Reset some input parameters after previous lookup */ |
---|
.. | .. |
---|
192 | 195 | return container_of(fl4, struct flowi, u.ip4); |
---|
193 | 196 | } |
---|
194 | 197 | |
---|
| 198 | +static inline struct flowi_common *flowi4_to_flowi_common(struct flowi4 *fl4) |
---|
| 199 | +{ |
---|
| 200 | + return &(flowi4_to_flowi(fl4)->u.__fl_common); |
---|
| 201 | +} |
---|
| 202 | + |
---|
195 | 203 | static inline struct flowi *flowi6_to_flowi(struct flowi6 *fl6) |
---|
196 | 204 | { |
---|
197 | 205 | return container_of(fl6, struct flowi, u.ip6); |
---|
198 | 206 | } |
---|
199 | 207 | |
---|
| 208 | +static inline struct flowi_common *flowi6_to_flowi_common(struct flowi6 *fl6) |
---|
| 209 | +{ |
---|
| 210 | + return &(flowi6_to_flowi(fl6)->u.__fl_common); |
---|
| 211 | +} |
---|
| 212 | + |
---|
200 | 213 | static inline struct flowi *flowidn_to_flowi(struct flowidn *fldn) |
---|
201 | 214 | { |
---|
202 | 215 | return container_of(fldn, struct flowi, u.dn); |
---|
203 | | -} |
---|
204 | | - |
---|
205 | | -typedef unsigned long flow_compare_t; |
---|
206 | | - |
---|
207 | | -static inline unsigned int flow_key_size(u16 family) |
---|
208 | | -{ |
---|
209 | | - switch (family) { |
---|
210 | | - case AF_INET: |
---|
211 | | - BUILD_BUG_ON(sizeof(struct flowi4) % sizeof(flow_compare_t)); |
---|
212 | | - return sizeof(struct flowi4) / sizeof(flow_compare_t); |
---|
213 | | - case AF_INET6: |
---|
214 | | - BUILD_BUG_ON(sizeof(struct flowi6) % sizeof(flow_compare_t)); |
---|
215 | | - return sizeof(struct flowi6) / sizeof(flow_compare_t); |
---|
216 | | - case AF_DECnet: |
---|
217 | | - BUILD_BUG_ON(sizeof(struct flowidn) % sizeof(flow_compare_t)); |
---|
218 | | - return sizeof(struct flowidn) / sizeof(flow_compare_t); |
---|
219 | | - } |
---|
220 | | - return 0; |
---|
221 | 216 | } |
---|
222 | 217 | |
---|
223 | 218 | __u32 __get_hash_from_flowi6(const struct flowi6 *fl6, struct flow_keys *keys); |
---|