Commit 3958afa1b272eb07109fd31549e69193b4d7c364
Committed by
David S. Miller
1 parent
1aee6cc2a5
Exists in
master
and in
16 other branches
net: Change skb_get_rxhash to skb_get_hash
Changing name of function as part of making the hash in skbuff to be generic property, not just for receive path. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 10 changed files with 17 additions and 17 deletions Side-by-side Diff
drivers/net/macvtap.c
drivers/net/tun.c
... | ... | @@ -358,7 +358,7 @@ |
358 | 358 | rcu_read_lock(); |
359 | 359 | numqueues = ACCESS_ONCE(tun->numqueues); |
360 | 360 | |
361 | - txq = skb_get_rxhash(skb); | |
361 | + txq = skb_get_hash(skb); | |
362 | 362 | if (txq) { |
363 | 363 | e = tun_flow_find(&tun->flows[tun_hashfn(txq)], txq); |
364 | 364 | if (e) |
... | ... | @@ -1146,7 +1146,7 @@ |
1146 | 1146 | skb_reset_network_header(skb); |
1147 | 1147 | skb_probe_transport_header(skb, 0); |
1148 | 1148 | |
1149 | - rxhash = skb_get_rxhash(skb); | |
1149 | + rxhash = skb_get_hash(skb); | |
1150 | 1150 | netif_rx_ni(skb); |
1151 | 1151 | |
1152 | 1152 | tun->dev->stats.rx_packets++; |
drivers/net/vxlan.c
include/linux/skbuff.h
... | ... | @@ -703,11 +703,11 @@ |
703 | 703 | unsigned int to, struct ts_config *config, |
704 | 704 | struct ts_state *state); |
705 | 705 | |
706 | -void __skb_get_rxhash(struct sk_buff *skb); | |
707 | -static inline __u32 skb_get_rxhash(struct sk_buff *skb) | |
706 | +void __skb_get_hash(struct sk_buff *skb); | |
707 | +static inline __u32 skb_get_hash(struct sk_buff *skb) | |
708 | 708 | { |
709 | 709 | if (!skb->l4_rxhash) |
710 | - __skb_get_rxhash(skb); | |
710 | + __skb_get_hash(skb); | |
711 | 711 | |
712 | 712 | return skb->rxhash; |
713 | 713 | } |
net/core/dev.c
... | ... | @@ -3006,7 +3006,7 @@ |
3006 | 3006 | } |
3007 | 3007 | |
3008 | 3008 | skb_reset_network_header(skb); |
3009 | - if (!skb_get_rxhash(skb)) | |
3009 | + if (!skb_get_hash(skb)) | |
3010 | 3010 | goto done; |
3011 | 3011 | |
3012 | 3012 | flow_table = rcu_dereference(rxqueue->rps_flow_table); |
... | ... | @@ -3151,7 +3151,7 @@ |
3151 | 3151 | rcu_read_lock(); |
3152 | 3152 | fl = rcu_dereference(sd->flow_limit); |
3153 | 3153 | if (fl) { |
3154 | - new_flow = skb_get_rxhash(skb) & (fl->num_buckets - 1); | |
3154 | + new_flow = skb_get_hash(skb) & (fl->num_buckets - 1); | |
3155 | 3155 | old_flow = fl->history[fl->history_head]; |
3156 | 3156 | fl->history[fl->history_head] = new_flow; |
3157 | 3157 |
net/core/flow_dissector.c
... | ... | @@ -202,12 +202,12 @@ |
202 | 202 | } |
203 | 203 | |
204 | 204 | /* |
205 | - * __skb_get_rxhash: calculate a flow hash based on src/dst addresses | |
205 | + * __skb_get_hash: calculate a flow hash based on src/dst addresses | |
206 | 206 | * and src/dst port numbers. Sets rxhash in skb to non-zero hash value |
207 | 207 | * on success, zero indicates no valid hash. Also, sets l4_rxhash in skb |
208 | 208 | * if hash is a canonical 4-tuple hash over transport ports. |
209 | 209 | */ |
210 | -void __skb_get_rxhash(struct sk_buff *skb) | |
210 | +void __skb_get_hash(struct sk_buff *skb) | |
211 | 211 | { |
212 | 212 | struct flow_keys keys; |
213 | 213 | u32 hash; |
... | ... | @@ -234,7 +234,7 @@ |
234 | 234 | |
235 | 235 | skb->rxhash = hash; |
236 | 236 | } |
237 | -EXPORT_SYMBOL(__skb_get_rxhash); | |
237 | +EXPORT_SYMBOL(__skb_get_hash); | |
238 | 238 | |
239 | 239 | /* |
240 | 240 | * Returns a Tx hash based on the given packet descriptor a Tx queues' number |
net/packet/af_packet.c
... | ... | @@ -963,7 +963,7 @@ |
963 | 963 | static void prb_fill_rxhash(struct tpacket_kbdq_core *pkc, |
964 | 964 | struct tpacket3_hdr *ppd) |
965 | 965 | { |
966 | - ppd->hv1.tp_rxhash = skb_get_rxhash(pkc->skb); | |
966 | + ppd->hv1.tp_rxhash = skb_get_hash(pkc->skb); | |
967 | 967 | } |
968 | 968 | |
969 | 969 | static void prb_clear_rxhash(struct tpacket_kbdq_core *pkc, |
... | ... | @@ -1295,7 +1295,7 @@ |
1295 | 1295 | if (!skb) |
1296 | 1296 | return 0; |
1297 | 1297 | } |
1298 | - skb_get_rxhash(skb); | |
1298 | + skb_get_hash(skb); | |
1299 | 1299 | idx = fanout_demux_hash(f, skb, num); |
1300 | 1300 | break; |
1301 | 1301 | case PACKET_FANOUT_LB: |
net/sched/cls_flow.c
net/sched/em_meta.c
net/sched/sch_fq.c
... | ... | @@ -226,7 +226,7 @@ |
226 | 226 | /* By forcing low order bit to 1, we make sure to not |
227 | 227 | * collide with a local flow (socket pointers are word aligned) |
228 | 228 | */ |
229 | - sk = (struct sock *)(skb_get_rxhash(skb) | 1L); | |
229 | + sk = (struct sock *)(skb_get_hash(skb) | 1L); | |
230 | 230 | } |
231 | 231 | |
232 | 232 | root = &q->fq_root[hash_32((u32)(long)sk, q->fq_trees_log)]; |