Commit 73545373 authored by Tim Beale's avatar Tim Beale Committed by David S. Miller

udp: Remove unused parameter (exact_dif)

Originally this was used by the VRF logic in compute_score(), but that
was later replaced by udp_sk_bound_dev_eq() and the parameter became
unused.

Note this change adds an 'unused variable' compiler warning that will be
removed in the next patch (I've split the removal in two to make review
slightly easier).
Signed-off-by: default avatarTim Beale <timbeale@catalyst.net.nz>
Reviewed-by: default avatarDavid Ahern <dsahern@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d6fb396c
...@@ -364,7 +364,7 @@ int udp_v4_get_port(struct sock *sk, unsigned short snum) ...@@ -364,7 +364,7 @@ int udp_v4_get_port(struct sock *sk, unsigned short snum)
static int compute_score(struct sock *sk, struct net *net, static int compute_score(struct sock *sk, struct net *net,
__be32 saddr, __be16 sport, __be32 saddr, __be16 sport,
__be32 daddr, unsigned short hnum, __be32 daddr, unsigned short hnum,
int dif, int sdif, bool exact_dif) int dif, int sdif)
{ {
int score; int score;
struct inet_sock *inet; struct inet_sock *inet;
...@@ -420,7 +420,7 @@ static u32 udp_ehashfn(const struct net *net, const __be32 laddr, ...@@ -420,7 +420,7 @@ static u32 udp_ehashfn(const struct net *net, const __be32 laddr,
static struct sock *udp4_lib_lookup2(struct net *net, static struct sock *udp4_lib_lookup2(struct net *net,
__be32 saddr, __be16 sport, __be32 saddr, __be16 sport,
__be32 daddr, unsigned int hnum, __be32 daddr, unsigned int hnum,
int dif, int sdif, bool exact_dif, int dif, int sdif,
struct udp_hslot *hslot2, struct udp_hslot *hslot2,
struct sk_buff *skb) struct sk_buff *skb)
{ {
...@@ -432,7 +432,7 @@ static struct sock *udp4_lib_lookup2(struct net *net, ...@@ -432,7 +432,7 @@ static struct sock *udp4_lib_lookup2(struct net *net,
badness = 0; badness = 0;
udp_portaddr_for_each_entry_rcu(sk, &hslot2->head) { udp_portaddr_for_each_entry_rcu(sk, &hslot2->head) {
score = compute_score(sk, net, saddr, sport, score = compute_score(sk, net, saddr, sport,
daddr, hnum, dif, sdif, exact_dif); daddr, hnum, dif, sdif);
if (score > badness) { if (score > badness) {
if (sk->sk_reuseport) { if (sk->sk_reuseport) {
hash = udp_ehashfn(net, daddr, hnum, hash = udp_ehashfn(net, daddr, hnum,
...@@ -468,7 +468,7 @@ struct sock *__udp4_lib_lookup(struct net *net, __be32 saddr, ...@@ -468,7 +468,7 @@ struct sock *__udp4_lib_lookup(struct net *net, __be32 saddr,
result = udp4_lib_lookup2(net, saddr, sport, result = udp4_lib_lookup2(net, saddr, sport,
daddr, hnum, dif, sdif, daddr, hnum, dif, sdif,
exact_dif, hslot2, skb); hslot2, skb);
if (!result) { if (!result) {
hash2 = ipv4_portaddr_hash(net, htonl(INADDR_ANY), hnum); hash2 = ipv4_portaddr_hash(net, htonl(INADDR_ANY), hnum);
slot2 = hash2 & udptable->mask; slot2 = hash2 & udptable->mask;
...@@ -476,7 +476,7 @@ struct sock *__udp4_lib_lookup(struct net *net, __be32 saddr, ...@@ -476,7 +476,7 @@ struct sock *__udp4_lib_lookup(struct net *net, __be32 saddr,
result = udp4_lib_lookup2(net, saddr, sport, result = udp4_lib_lookup2(net, saddr, sport,
htonl(INADDR_ANY), hnum, dif, sdif, htonl(INADDR_ANY), hnum, dif, sdif,
exact_dif, hslot2, skb); hslot2, skb);
} }
if (IS_ERR(result)) if (IS_ERR(result))
return NULL; return NULL;
......
...@@ -111,7 +111,7 @@ void udp_v6_rehash(struct sock *sk) ...@@ -111,7 +111,7 @@ void udp_v6_rehash(struct sock *sk)
static int compute_score(struct sock *sk, struct net *net, static int compute_score(struct sock *sk, struct net *net,
const struct in6_addr *saddr, __be16 sport, const struct in6_addr *saddr, __be16 sport,
const struct in6_addr *daddr, unsigned short hnum, const struct in6_addr *daddr, unsigned short hnum,
int dif, int sdif, bool exact_dif) int dif, int sdif)
{ {
int score; int score;
struct inet_sock *inet; struct inet_sock *inet;
...@@ -155,8 +155,8 @@ static int compute_score(struct sock *sk, struct net *net, ...@@ -155,8 +155,8 @@ static int compute_score(struct sock *sk, struct net *net,
static struct sock *udp6_lib_lookup2(struct net *net, static struct sock *udp6_lib_lookup2(struct net *net,
const struct in6_addr *saddr, __be16 sport, const struct in6_addr *saddr, __be16 sport,
const struct in6_addr *daddr, unsigned int hnum, const struct in6_addr *daddr, unsigned int hnum,
int dif, int sdif, bool exact_dif, int dif, int sdif, struct udp_hslot *hslot2,
struct udp_hslot *hslot2, struct sk_buff *skb) struct sk_buff *skb)
{ {
struct sock *sk, *result; struct sock *sk, *result;
int score, badness; int score, badness;
...@@ -166,7 +166,7 @@ static struct sock *udp6_lib_lookup2(struct net *net, ...@@ -166,7 +166,7 @@ static struct sock *udp6_lib_lookup2(struct net *net,
badness = -1; badness = -1;
udp_portaddr_for_each_entry_rcu(sk, &hslot2->head) { udp_portaddr_for_each_entry_rcu(sk, &hslot2->head) {
score = compute_score(sk, net, saddr, sport, score = compute_score(sk, net, saddr, sport,
daddr, hnum, dif, sdif, exact_dif); daddr, hnum, dif, sdif);
if (score > badness) { if (score > badness) {
if (sk->sk_reuseport) { if (sk->sk_reuseport) {
hash = udp6_ehashfn(net, daddr, hnum, hash = udp6_ehashfn(net, daddr, hnum,
...@@ -202,7 +202,7 @@ struct sock *__udp6_lib_lookup(struct net *net, ...@@ -202,7 +202,7 @@ struct sock *__udp6_lib_lookup(struct net *net,
hslot2 = &udptable->hash2[slot2]; hslot2 = &udptable->hash2[slot2];
result = udp6_lib_lookup2(net, saddr, sport, result = udp6_lib_lookup2(net, saddr, sport,
daddr, hnum, dif, sdif, exact_dif, daddr, hnum, dif, sdif,
hslot2, skb); hslot2, skb);
if (!result) { if (!result) {
hash2 = ipv6_portaddr_hash(net, &in6addr_any, hnum); hash2 = ipv6_portaddr_hash(net, &in6addr_any, hnum);
...@@ -212,8 +212,7 @@ struct sock *__udp6_lib_lookup(struct net *net, ...@@ -212,8 +212,7 @@ struct sock *__udp6_lib_lookup(struct net *net,
result = udp6_lib_lookup2(net, saddr, sport, result = udp6_lib_lookup2(net, saddr, sport,
&in6addr_any, hnum, dif, sdif, &in6addr_any, hnum, dif, sdif,
exact_dif, hslot2, hslot2, skb);
skb);
} }
if (IS_ERR(result)) if (IS_ERR(result))
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment