* [PATCH v2] net: ipv6: remove unused arg exact_dif in compute_score
@ 2020-08-31 6:26 Miaohe Lin
2020-08-31 20:08 ` David Miller
2020-08-31 20:19 ` David Ahern
0 siblings, 2 replies; 3+ messages in thread
From: Miaohe Lin @ 2020-08-31 6:26 UTC (permalink / raw)
To: davem, kuznet, yoshfuji, kuba; +Cc: netdev, linux-kernel, linmiaohe
The arg exact_dif is not used anymore, remove it. inet6_exact_dif_match()
is no longer needed after the above is removed, remove it too.
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
include/linux/ipv6.h | 11 -----------
net/ipv6/inet6_hashtables.c | 6 ++----
2 files changed, 2 insertions(+), 15 deletions(-)
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index a44789d027cc..4d6b03803379 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -177,17 +177,6 @@ static inline int inet6_sdif(const struct sk_buff *skb)
return 0;
}
-/* can not be used in TCP layer after tcp_v6_fill_cb */
-static inline bool inet6_exact_dif_match(struct net *net, struct sk_buff *skb)
-{
-#if defined(CONFIG_NET_L3_MASTER_DEV)
- if (!net->ipv4.sysctl_tcp_l3mdev_accept &&
- skb && ipv6_l3mdev_skb(IP6CB(skb)->flags))
- return true;
-#endif
- return false;
-}
-
struct tcp6_request_sock {
struct tcp_request_sock tcp6rsk_tcp;
};
diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c
index 2d3add9e6116..55c290d55605 100644
--- a/net/ipv6/inet6_hashtables.c
+++ b/net/ipv6/inet6_hashtables.c
@@ -94,7 +94,7 @@ EXPORT_SYMBOL(__inet6_lookup_established);
static inline int compute_score(struct sock *sk, struct net *net,
const unsigned short hnum,
const struct in6_addr *daddr,
- const int dif, const int sdif, bool exact_dif)
+ const int dif, const int sdif)
{
int score = -1;
@@ -138,15 +138,13 @@ static struct sock *inet6_lhash2_lookup(struct net *net,
const __be16 sport, const struct in6_addr *daddr,
const unsigned short hnum, const int dif, const int sdif)
{
- bool exact_dif = inet6_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 v2] net: ipv6: remove unused arg exact_dif in compute_score
2020-08-31 6:26 [PATCH v2] net: ipv6: remove unused arg exact_dif in compute_score Miaohe Lin
@ 2020-08-31 20:08 ` David Miller
2020-08-31 20:19 ` David Ahern
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2020-08-31 20:08 UTC (permalink / raw)
To: linmiaohe; +Cc: kuznet, yoshfuji, kuba, netdev, linux-kernel
From: Miaohe Lin <linmiaohe@huawei.com>
Date: Mon, 31 Aug 2020 02:26:10 -0400
> The arg exact_dif is not used anymore, remove it. inet6_exact_dif_match()
> is no longer needed after the above is removed, remove it too.
>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Applied to net-next.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] net: ipv6: remove unused arg exact_dif in compute_score
2020-08-31 6:26 [PATCH v2] net: ipv6: remove unused arg exact_dif in compute_score Miaohe Lin
2020-08-31 20:08 ` David Miller
@ 2020-08-31 20:19 ` David Ahern
1 sibling, 0 replies; 3+ messages in thread
From: David Ahern @ 2020-08-31 20:19 UTC (permalink / raw)
To: Miaohe Lin, davem, kuznet, yoshfuji, kuba; +Cc: netdev, linux-kernel
On 8/31/20 12:26 AM, Miaohe Lin wrote:
> The arg exact_dif is not used anymore, remove it. inet6_exact_dif_match()
> is no longer needed after the above is removed, remove it too.
>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
> include/linux/ipv6.h | 11 -----------
> net/ipv6/inet6_hashtables.c | 6 ++----
> 2 files changed, 2 insertions(+), 15 deletions(-)
>
Reviewed-by: David Ahern <dsahern@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-08-31 20:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-31 6:26 [PATCH v2] net: ipv6: remove unused arg exact_dif in compute_score Miaohe Lin
2020-08-31 20:08 ` David Miller
2020-08-31 20:19 ` David Ahern
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).