]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
net: ipv4: remove unused arg exact_dif in compute_score
authorMiaohe Lin <linmiaohe@huawei.com>
Mon, 31 Aug 2020 06:26:34 +0000 (02:26 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 31 Aug 2020 20:08:29 +0000 (13:08 -0700)
The arg exact_dif is not used anymore, remove it. inet_exact_dif_match()
is no longer needed after the above is removed, so remove it too.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/tcp.h
net/ipv4/inet_hashtables.c

index eab6c7510b5b82831c8ef8aa34d02b3c6cb4317c..0d11db6436c8e0808a04de3976cd976c5a40686e 100644 (file)
@@ -941,16 +941,6 @@ INDIRECT_CALLABLE_DECLARE(void tcp_v6_early_demux(struct sk_buff *skb));
 
 #endif
 
-static inline bool inet_exact_dif_match(struct net *net, struct sk_buff *skb)
-{
-#if IS_ENABLED(CONFIG_NET_L3_MASTER_DEV)
-       if (!net->ipv4.sysctl_tcp_l3mdev_accept &&
-           skb && ipv4_l3mdev_skb(IPCB(skb)->flags))
-               return true;
-#endif
-       return false;
-}
-
 /* TCP_SKB_CB reference means this can not be used from early demux */
 static inline int tcp_v4_sdif(struct sk_buff *skb)
 {
index 239e54474b653febf8524f303edd6e9b3e3f0590..8cbe74313f38268a3cf2fecb36eb2d1d2dd60ac0 100644 (file)
@@ -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);