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 /arch | |
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 'arch')
-rw-r--r-- | arch/arm/net/bpf_jit_32.c | 4 | ||||
-rw-r--r-- | arch/powerpc/net/bpf_jit_comp.c | 4 | ||||
-rw-r--r-- | arch/s390/net/bpf_jit_comp.c | 8 | ||||
-rw-r--r-- | arch/sparc/net/bpf_jit_comp.c | 2 | ||||
-rw-r--r-- | arch/x86/net/bpf_jit_comp.c | 8 |
5 files changed, 13 insertions, 13 deletions
diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index 271b5e971568..7ddb9c83cdfc 100644 --- a/arch/arm/net/bpf_jit_32.c +++ b/arch/arm/net/bpf_jit_32.c | |||
@@ -825,8 +825,8 @@ b_epilogue: | |||
825 | break; | 825 | break; |
826 | case BPF_S_ANC_RXHASH: | 826 | case BPF_S_ANC_RXHASH: |
827 | ctx->seen |= SEEN_SKB; | 827 | ctx->seen |= SEEN_SKB; |
828 | BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, rxhash) != 4); | 828 | BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, hash) != 4); |
829 | off = offsetof(struct sk_buff, rxhash); | 829 | off = offsetof(struct sk_buff, hash); |
830 | emit(ARM_LDR_I(r_A, r_skb, off), ctx); | 830 | emit(ARM_LDR_I(r_A, r_skb, off), ctx); |
831 | break; | 831 | break; |
832 | case BPF_S_ANC_VLAN_TAG: | 832 | case BPF_S_ANC_VLAN_TAG: |
diff --git a/arch/powerpc/net/bpf_jit_comp.c b/arch/powerpc/net/bpf_jit_comp.c index 555034f8505e..4afad6c17d50 100644 --- a/arch/powerpc/net/bpf_jit_comp.c +++ b/arch/powerpc/net/bpf_jit_comp.c | |||
@@ -390,9 +390,9 @@ static int bpf_jit_build_body(struct sk_filter *fp, u32 *image, | |||
390 | mark)); | 390 | mark)); |
391 | break; | 391 | break; |
392 | case BPF_S_ANC_RXHASH: | 392 | case BPF_S_ANC_RXHASH: |
393 | BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, rxhash) != 4); | 393 | BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, hash) != 4); |
394 | PPC_LWZ_OFFS(r_A, r_skb, offsetof(struct sk_buff, | 394 | PPC_LWZ_OFFS(r_A, r_skb, offsetof(struct sk_buff, |
395 | rxhash)); | 395 | hash)); |
396 | break; | 396 | break; |
397 | case BPF_S_ANC_VLAN_TAG: | 397 | case BPF_S_ANC_VLAN_TAG: |
398 | case BPF_S_ANC_VLAN_TAG_PRESENT: | 398 | case BPF_S_ANC_VLAN_TAG_PRESENT: |
diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c index 708d60e40066..153f8f2cfd56 100644 --- a/arch/s390/net/bpf_jit_comp.c +++ b/arch/s390/net/bpf_jit_comp.c | |||
@@ -737,10 +737,10 @@ call_fn: /* lg %r1,<d(function)>(%r13) */ | |||
737 | /* icm %r5,3,<d(type)>(%r1) */ | 737 | /* icm %r5,3,<d(type)>(%r1) */ |
738 | EMIT4_DISP(0xbf531000, offsetof(struct net_device, type)); | 738 | EMIT4_DISP(0xbf531000, offsetof(struct net_device, type)); |
739 | break; | 739 | break; |
740 | case BPF_S_ANC_RXHASH: /* A = skb->rxhash */ | 740 | case BPF_S_ANC_RXHASH: /* A = skb->hash */ |
741 | BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, rxhash) != 4); | 741 | BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, hash) != 4); |
742 | /* l %r5,<d(rxhash)>(%r2) */ | 742 | /* l %r5,<d(hash)>(%r2) */ |
743 | EMIT4_DISP(0x58502000, offsetof(struct sk_buff, rxhash)); | 743 | EMIT4_DISP(0x58502000, offsetof(struct sk_buff, hash)); |
744 | break; | 744 | break; |
745 | case BPF_S_ANC_VLAN_TAG: | 745 | case BPF_S_ANC_VLAN_TAG: |
746 | case BPF_S_ANC_VLAN_TAG_PRESENT: | 746 | case BPF_S_ANC_VLAN_TAG_PRESENT: |
diff --git a/arch/sparc/net/bpf_jit_comp.c b/arch/sparc/net/bpf_jit_comp.c index 01fe9946d388..d96d2a7c78ee 100644 --- a/arch/sparc/net/bpf_jit_comp.c +++ b/arch/sparc/net/bpf_jit_comp.c | |||
@@ -618,7 +618,7 @@ void bpf_jit_compile(struct sk_filter *fp) | |||
618 | emit_load16(r_A, struct net_device, type, r_A); | 618 | emit_load16(r_A, struct net_device, type, r_A); |
619 | break; | 619 | break; |
620 | case BPF_S_ANC_RXHASH: | 620 | case BPF_S_ANC_RXHASH: |
621 | emit_skb_load32(rxhash, r_A); | 621 | emit_skb_load32(hash, r_A); |
622 | break; | 622 | break; |
623 | case BPF_S_ANC_VLAN_TAG: | 623 | case BPF_S_ANC_VLAN_TAG: |
624 | case BPF_S_ANC_VLAN_TAG_PRESENT: | 624 | case BPF_S_ANC_VLAN_TAG_PRESENT: |
diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c index 4ed75dd81d05..293c57b74edc 100644 --- a/arch/x86/net/bpf_jit_comp.c +++ b/arch/x86/net/bpf_jit_comp.c | |||
@@ -553,13 +553,13 @@ void bpf_jit_compile(struct sk_filter *fp) | |||
553 | } | 553 | } |
554 | break; | 554 | break; |
555 | case BPF_S_ANC_RXHASH: | 555 | case BPF_S_ANC_RXHASH: |
556 | BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, rxhash) != 4); | 556 | BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, hash) != 4); |
557 | if (is_imm8(offsetof(struct sk_buff, rxhash))) { | 557 | if (is_imm8(offsetof(struct sk_buff, hash))) { |
558 | /* mov off8(%rdi),%eax */ | 558 | /* mov off8(%rdi),%eax */ |
559 | EMIT3(0x8b, 0x47, offsetof(struct sk_buff, rxhash)); | 559 | EMIT3(0x8b, 0x47, offsetof(struct sk_buff, hash)); |
560 | } else { | 560 | } else { |
561 | EMIT2(0x8b, 0x87); | 561 | EMIT2(0x8b, 0x87); |
562 | EMIT(offsetof(struct sk_buff, rxhash), 4); | 562 | EMIT(offsetof(struct sk_buff, hash), 4); |
563 | } | 563 | } |
564 | break; | 564 | break; |
565 | case BPF_S_ANC_QUEUE: | 565 | case BPF_S_ANC_QUEUE: |