diff options
author | Tom Herbert <therbert@google.com> | 2014-03-24 18:34:47 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-26 15:58:20 -0400 |
commit | 61b905da33ae25edb6b9d2a5de21e34c3a77efe3 (patch) | |
tree | 74990d790d603e989210b0221703910d9beef4f1 /include/linux/skbuff.h | |
parent | 4e2e865d959e095ab8f1a112e7952c9baa173d0a (diff) |
net: Rename skb->rxhash to skb->hash
The packet hash can be considered a property of the packet, not just
on RX path.
This patch changes name of rxhash and l4_rxhash skbuff fields to be
hash and l4_hash respectively. This includes changing uses of the
field in the code which don't call the access functions.
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r-- | include/linux/skbuff.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 03db95ab8a8c..aa2c22cb8158 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -444,11 +444,11 @@ static inline u32 skb_mstamp_us_delta(const struct skb_mstamp *t1, | |||
444 | * @skb_iif: ifindex of device we arrived on | 444 | * @skb_iif: ifindex of device we arrived on |
445 | * @tc_index: Traffic control index | 445 | * @tc_index: Traffic control index |
446 | * @tc_verd: traffic control verdict | 446 | * @tc_verd: traffic control verdict |
447 | * @rxhash: the packet hash computed on receive | 447 | * @hash: the packet hash |
448 | * @queue_mapping: Queue mapping for multiqueue devices | 448 | * @queue_mapping: Queue mapping for multiqueue devices |
449 | * @ndisc_nodetype: router type (from link layer) | 449 | * @ndisc_nodetype: router type (from link layer) |
450 | * @ooo_okay: allow the mapping of a socket to a queue to be changed | 450 | * @ooo_okay: allow the mapping of a socket to a queue to be changed |
451 | * @l4_rxhash: indicate rxhash is a canonical 4-tuple hash over transport | 451 | * @l4_hash: indicate hash is a canonical 4-tuple hash over transport |
452 | * ports. | 452 | * ports. |
453 | * @wifi_acked_valid: wifi_acked was set | 453 | * @wifi_acked_valid: wifi_acked was set |
454 | * @wifi_acked: whether frame was acked on wifi or not | 454 | * @wifi_acked: whether frame was acked on wifi or not |
@@ -537,7 +537,7 @@ struct sk_buff { | |||
537 | 537 | ||
538 | int skb_iif; | 538 | int skb_iif; |
539 | 539 | ||
540 | __u32 rxhash; | 540 | __u32 hash; |
541 | 541 | ||
542 | __be16 vlan_proto; | 542 | __be16 vlan_proto; |
543 | __u16 vlan_tci; | 543 | __u16 vlan_tci; |
@@ -556,7 +556,7 @@ struct sk_buff { | |||
556 | #endif | 556 | #endif |
557 | __u8 pfmemalloc:1; | 557 | __u8 pfmemalloc:1; |
558 | __u8 ooo_okay:1; | 558 | __u8 ooo_okay:1; |
559 | __u8 l4_rxhash:1; | 559 | __u8 l4_hash:1; |
560 | __u8 wifi_acked_valid:1; | 560 | __u8 wifi_acked_valid:1; |
561 | __u8 wifi_acked:1; | 561 | __u8 wifi_acked:1; |
562 | __u8 no_fcs:1; | 562 | __u8 no_fcs:1; |
@@ -815,40 +815,40 @@ enum pkt_hash_types { | |||
815 | static inline void | 815 | static inline void |
816 | skb_set_hash(struct sk_buff *skb, __u32 hash, enum pkt_hash_types type) | 816 | skb_set_hash(struct sk_buff *skb, __u32 hash, enum pkt_hash_types type) |
817 | { | 817 | { |
818 | skb->l4_rxhash = (type == PKT_HASH_TYPE_L4); | 818 | skb->l4_hash = (type == PKT_HASH_TYPE_L4); |
819 | skb->rxhash = hash; | 819 | skb->hash = hash; |
820 | } | 820 | } |
821 | 821 | ||
822 | void __skb_get_hash(struct sk_buff *skb); | 822 | void __skb_get_hash(struct sk_buff *skb); |
823 | static inline __u32 skb_get_hash(struct sk_buff *skb) | 823 | static inline __u32 skb_get_hash(struct sk_buff *skb) |
824 | { | 824 | { |
825 | if (!skb->l4_rxhash) | 825 | if (!skb->l4_hash) |
826 | __skb_get_hash(skb); | 826 | __skb_get_hash(skb); |
827 | 827 | ||
828 | return skb->rxhash; | 828 | return skb->hash; |
829 | } | 829 | } |
830 | 830 | ||
831 | static inline __u32 skb_get_hash_raw(const struct sk_buff *skb) | 831 | static inline __u32 skb_get_hash_raw(const struct sk_buff *skb) |
832 | { | 832 | { |
833 | return skb->rxhash; | 833 | return skb->hash; |
834 | } | 834 | } |
835 | 835 | ||
836 | static inline void skb_clear_hash(struct sk_buff *skb) | 836 | static inline void skb_clear_hash(struct sk_buff *skb) |
837 | { | 837 | { |
838 | skb->rxhash = 0; | 838 | skb->hash = 0; |
839 | skb->l4_rxhash = 0; | 839 | skb->l4_hash = 0; |
840 | } | 840 | } |
841 | 841 | ||
842 | static inline void skb_clear_hash_if_not_l4(struct sk_buff *skb) | 842 | static inline void skb_clear_hash_if_not_l4(struct sk_buff *skb) |
843 | { | 843 | { |
844 | if (!skb->l4_rxhash) | 844 | if (!skb->l4_hash) |
845 | skb_clear_hash(skb); | 845 | skb_clear_hash(skb); |
846 | } | 846 | } |
847 | 847 | ||
848 | static inline void skb_copy_hash(struct sk_buff *to, const struct sk_buff *from) | 848 | static inline void skb_copy_hash(struct sk_buff *to, const struct sk_buff *from) |
849 | { | 849 | { |
850 | to->rxhash = from->rxhash; | 850 | to->hash = from->hash; |
851 | to->l4_rxhash = from->l4_rxhash; | 851 | to->l4_hash = from->l4_hash; |
852 | }; | 852 | }; |
853 | 853 | ||
854 | #ifdef NET_SKBUFF_DATA_USES_OFFSET | 854 | #ifdef NET_SKBUFF_DATA_USES_OFFSET |