Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] net: ipv4: remove unused arg exact_dif in compute_score
@ 2020-08-29 9:01 Miaohe Lin
2020-08-29 19:27 ` David Ahern
0 siblings, 1 reply; 3+ messages in thread
From: Miaohe Lin @ 2020-08-29 9:01 UTC (permalink / raw)
To: davem, kuznet, yoshfuji, kuba; +Cc: netdev, linux-kernel, linmiaohe
The arg exact_dif is not used anymore, remove it.
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
net/ipv4/inet_hashtables.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c
index 239e54474b65..8cbe74313f38 100644
--- a/net/ipv4/inet_hashtables.c
+++ b/net/ipv4/inet_hashtables.c
@@ -228,7 +228,7 @@ static void inet_unhash2(struct inet_hashinfo *h, struct sock *sk)
static inline int compute_score(struct sock *sk, struct net *net,
const unsigned short hnum, const __be32 daddr,
- const int dif, const int sdif, bool exact_dif)
+ const int dif, const int sdif)
{
int score = -1;
@@ -277,15 +277,13 @@ static struct sock *inet_lhash2_lookup(struct net *net,
const __be32 daddr, const unsigned short hnum,
const int dif, const int sdif)
{
- bool exact_dif = inet_exact_dif_match(net, skb);
struct inet_connection_sock *icsk;
struct sock *sk, *result = NULL;
int score, hiscore = 0;
inet_lhash2_for_each_icsk_rcu(icsk, &ilb2->head) {
sk = (struct sock *)icsk;
- score = compute_score(sk, net, hnum, daddr,
- dif, sdif, exact_dif);
+ score = compute_score(sk, net, hnum, daddr, dif, sdif);
if (score > hiscore) {
result = lookup_reuseport(net, sk, skb, doff,
saddr, sport, daddr, hnum);
--
2.19.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: ipv4: remove unused arg exact_dif in compute_score
2020-08-29 9:01 [PATCH] net: ipv4: remove unused arg exact_dif in compute_score Miaohe Lin
@ 2020-08-29 19:27 ` David Ahern
0 siblings, 0 replies; 3+ messages in thread
From: David Ahern @ 2020-08-29 19:27 UTC (permalink / raw)
To: Miaohe Lin, davem, kuznet, yoshfuji, kuba; +Cc: netdev, linux-kernel
On 8/29/20 3:01 AM, Miaohe Lin wrote:
> @@ -277,15 +277,13 @@ static struct sock *inet_lhash2_lookup(struct net *net,
> const __be32 daddr, const unsigned short hnum,
> const int dif, const int sdif)
> {
> - bool exact_dif = inet_exact_dif_match(net, skb);
inet_exact_dif_match is no longer needed after the above is removed.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: ipv4: remove unused arg exact_dif in compute_score
@ 2020-08-31 1:25 linmiaohe
0 siblings, 0 replies; 3+ messages in thread
From: linmiaohe @ 2020-08-31 1:25 UTC (permalink / raw)
To: David Ahern; +Cc: davem, kuznet, yoshfuji, kuba, netdev, linux-kernel
David Ahern <dsahern@gmail.com> wrote:
>On 8/29/20 3:01 AM, Miaohe Lin wrote:
>> @@ -277,15 +277,13 @@ static struct sock *inet_lhash2_lookup(struct net *net,
>> const __be32 daddr, const unsigned short hnum,
>> const int dif, const int sdif)
>> {
>> - bool exact_dif = inet_exact_dif_match(net, skb);
>
>inet_exact_dif_match is no longer needed after the above is removed.
Oh, I missed it. Will remove inet_exact_dif_match() in v2. Many thanks for review and reply.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-08-31 1:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-29 9:01 [PATCH] net: ipv4: remove unused arg exact_dif in compute_score Miaohe Lin
2020-08-29 19:27 ` David Ahern
2020-08-31 1:25 linmiaohe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).