mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
UPSTREAM: Revert "udp: Improve load balancing for SO_REUSEPORT."
This reverts commit df89c1ee03.
Change-Id: If65d5183f3e2a756e42106f7cde1fdabb8c2d2c1
This commit is contained in:
parent
75d0191fd1
commit
bf3692284b
2 changed files with 12 additions and 18 deletions
|
|
@ -162,7 +162,7 @@ static struct sock *udp6_lib_lookup2(struct net *net,
|
|||
int dif, int sdif, struct udp_hslot *hslot2,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
struct sock *sk, *result, *reuseport_result;
|
||||
struct sock *sk, *result;
|
||||
int score, badness;
|
||||
u32 hash = 0;
|
||||
|
||||
|
|
@ -172,20 +172,17 @@ static struct sock *udp6_lib_lookup2(struct net *net,
|
|||
score = compute_score(sk, net, saddr, sport,
|
||||
daddr, hnum, dif, sdif);
|
||||
if (score > badness) {
|
||||
reuseport_result = NULL;
|
||||
|
||||
if (sk->sk_reuseport &&
|
||||
sk->sk_state != TCP_ESTABLISHED) {
|
||||
hash = udp6_ehashfn(net, daddr, hnum,
|
||||
saddr, sport);
|
||||
|
||||
reuseport_result = reuseport_select_sock(sk, hash, skb,
|
||||
sizeof(struct udphdr));
|
||||
if (reuseport_result && !reuseport_has_conns(sk, false))
|
||||
return reuseport_result;
|
||||
result = reuseport_select_sock(sk, hash, skb,
|
||||
sizeof(struct udphdr));
|
||||
if (result && !reuseport_has_conns(sk, false))
|
||||
return result;
|
||||
}
|
||||
|
||||
result = reuseport_result ? : sk;
|
||||
result = sk;
|
||||
badness = score;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue