diff options
author | Tom Herbert <therbert@google.com> | 2011-08-14 15:45:55 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-08-17 23:06:03 -0400 |
commit | bdeab991918663aed38757904219e8398214334c (patch) | |
tree | bc6c02da7ed88e3e568677b4a35fb4e55de363de /net/ipv6 | |
parent | 792df22cd0499b4e662d4618b0008fdcfef8b04e (diff) |
rps: Add flag to skb to indicate rxhash is based on L4 tuple
The l4_rxhash flag was added to the skb structure to indicate
that the rxhash value was computed over the 4 tuple for the
packet which includes the port information in the encapsulated
transport packet. This is used by the stack to preserve the
rxhash value in __skb_rx_tunnel.
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 6 | ||||
-rw-r--r-- | net/ipv6/udp.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index d1fb63f4aeb7..44a5859535b5 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -1628,7 +1628,7 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb) | |||
1628 | opt_skb = skb_clone(skb, GFP_ATOMIC); | 1628 | opt_skb = skb_clone(skb, GFP_ATOMIC); |
1629 | 1629 | ||
1630 | if (sk->sk_state == TCP_ESTABLISHED) { /* Fast path */ | 1630 | if (sk->sk_state == TCP_ESTABLISHED) { /* Fast path */ |
1631 | sock_rps_save_rxhash(sk, skb->rxhash); | 1631 | sock_rps_save_rxhash(sk, skb); |
1632 | if (tcp_rcv_established(sk, skb, tcp_hdr(skb), skb->len)) | 1632 | if (tcp_rcv_established(sk, skb, tcp_hdr(skb), skb->len)) |
1633 | goto reset; | 1633 | goto reset; |
1634 | if (opt_skb) | 1634 | if (opt_skb) |
@@ -1650,7 +1650,7 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb) | |||
1650 | * the new socket.. | 1650 | * the new socket.. |
1651 | */ | 1651 | */ |
1652 | if(nsk != sk) { | 1652 | if(nsk != sk) { |
1653 | sock_rps_save_rxhash(nsk, skb->rxhash); | 1653 | sock_rps_save_rxhash(nsk, skb); |
1654 | if (tcp_child_process(sk, nsk, skb)) | 1654 | if (tcp_child_process(sk, nsk, skb)) |
1655 | goto reset; | 1655 | goto reset; |
1656 | if (opt_skb) | 1656 | if (opt_skb) |
@@ -1658,7 +1658,7 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb) | |||
1658 | return 0; | 1658 | return 0; |
1659 | } | 1659 | } |
1660 | } else | 1660 | } else |
1661 | sock_rps_save_rxhash(sk, skb->rxhash); | 1661 | sock_rps_save_rxhash(sk, skb); |
1662 | 1662 | ||
1663 | if (tcp_rcv_state_process(sk, skb, tcp_hdr(skb), skb->len)) | 1663 | if (tcp_rcv_state_process(sk, skb, tcp_hdr(skb), skb->len)) |
1664 | goto reset; | 1664 | goto reset; |
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 97e47f06e8b7..35bbdc42241e 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c | |||
@@ -509,7 +509,7 @@ int udpv6_queue_rcv_skb(struct sock * sk, struct sk_buff *skb) | |||
509 | int is_udplite = IS_UDPLITE(sk); | 509 | int is_udplite = IS_UDPLITE(sk); |
510 | 510 | ||
511 | if (!ipv6_addr_any(&inet6_sk(sk)->daddr)) | 511 | if (!ipv6_addr_any(&inet6_sk(sk)->daddr)) |
512 | sock_rps_save_rxhash(sk, skb->rxhash); | 512 | sock_rps_save_rxhash(sk, skb); |
513 | 513 | ||
514 | if (!xfrm6_policy_check(sk, XFRM_POLICY_IN, skb)) | 514 | if (!xfrm6_policy_check(sk, XFRM_POLICY_IN, skb)) |
515 | goto drop; | 515 | goto drop; |