[PATCH bpf-next] net: remove duplicate INDIRECT_CALLABLE_DECLARE of udp[6]_ehashfn

Lorenz Bauer posted 1 patch 2 years, 6 months ago
net/ipv4/inet_hashtables.c  | 2 --
net/ipv6/inet6_hashtables.c | 2 --
2 files changed, 4 deletions(-)
[PATCH bpf-next] net: remove duplicate INDIRECT_CALLABLE_DECLARE of udp[6]_ehashfn
Posted by Lorenz Bauer 2 years, 6 months ago
There are already INDIRECT_CALLABLE_DECLARE in the hashtable
headers, no need to declare them again.

Fixes: 0f495f761722 ("net: remove duplicate reuseport_lookup functions")
Suggested-by: Martin Lau <martin.lau@linux.dev>
Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
---
As pointed out by Martin there are some duplicate macro invocations
in my recent SO_REUSEPORT support for sk_assign patchset.

Remove the declarations in the .c files.
---
 net/ipv4/inet_hashtables.c  | 2 --
 net/ipv6/inet6_hashtables.c | 2 --
 2 files changed, 4 deletions(-)

diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c
index 6a872b8fb0d3..7876b7d703cb 100644
--- a/net/ipv4/inet_hashtables.c
+++ b/net/ipv4/inet_hashtables.c
@@ -333,8 +333,6 @@ static inline int compute_score(struct sock *sk, struct net *net,
 	return score;
 }
 
-INDIRECT_CALLABLE_DECLARE(inet_ehashfn_t udp_ehashfn);
-
 /**
  * inet_lookup_reuseport() - execute reuseport logic on AF_INET socket if necessary.
  * @net: network namespace.
diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c
index 7c9700c7c9c8..b0e8d278e8a9 100644
--- a/net/ipv6/inet6_hashtables.c
+++ b/net/ipv6/inet6_hashtables.c
@@ -112,8 +112,6 @@ static inline int compute_score(struct sock *sk, struct net *net,
 	return score;
 }
 
-INDIRECT_CALLABLE_DECLARE(inet6_ehashfn_t udp6_ehashfn);
-
 /**
  * inet6_lookup_reuseport() - execute reuseport logic on AF_INET6 socket if necessary.
  * @net: network namespace.

---
base-commit: fb213ecbb8ac56b2d5569737f59126e91f87829a
change-id: 20230731-indir-call-f1474e314184

Best regards,
-- 
Lorenz Bauer <lmb@isovalent.com>
Re: [PATCH bpf-next] net: remove duplicate INDIRECT_CALLABLE_DECLARE of udp[6]_ehashfn
Posted by patchwork-bot+netdevbpf@kernel.org 2 years, 6 months ago
Hello:

This patch was applied to bpf/bpf-next.git (master)
by Martin KaFai Lau <martin.lau@kernel.org>:

On Mon, 31 Jul 2023 11:42:53 +0200 you wrote:
> There are already INDIRECT_CALLABLE_DECLARE in the hashtable
> headers, no need to declare them again.
> 
> Fixes: 0f495f761722 ("net: remove duplicate reuseport_lookup functions")
> Suggested-by: Martin Lau <martin.lau@linux.dev>
> Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
> 
> [...]

Here is the summary with links:
  - [bpf-next] net: remove duplicate INDIRECT_CALLABLE_DECLARE of udp[6]_ehashfn
    https://git.kernel.org/bpf/bpf-next/c/74bdfab4fd7c

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Re: [PATCH bpf-next] net: remove duplicate INDIRECT_CALLABLE_DECLARE of udp[6]_ehashfn
Posted by Kuniyuki Iwashima 2 years, 6 months ago
From: Lorenz Bauer <lmb@isovalent.com>
Date: Mon, 31 Jul 2023 11:42:53 +0200
> There are already INDIRECT_CALLABLE_DECLARE in the hashtable
> headers, no need to declare them again.
> 
> Fixes: 0f495f761722 ("net: remove duplicate reuseport_lookup functions")
> Suggested-by: Martin Lau <martin.lau@linux.dev>
> Signed-off-by: Lorenz Bauer <lmb@isovalent.com>

Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>


> ---
> As pointed out by Martin there are some duplicate macro invocations
> in my recent SO_REUSEPORT support for sk_assign patchset.
> 
> Remove the declarations in the .c files.
> ---
>  net/ipv4/inet_hashtables.c  | 2 --
>  net/ipv6/inet6_hashtables.c | 2 --
>  2 files changed, 4 deletions(-)
> 
> diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c
> index 6a872b8fb0d3..7876b7d703cb 100644
> --- a/net/ipv4/inet_hashtables.c
> +++ b/net/ipv4/inet_hashtables.c
> @@ -333,8 +333,6 @@ static inline int compute_score(struct sock *sk, struct net *net,
>  	return score;
>  }
>  
> -INDIRECT_CALLABLE_DECLARE(inet_ehashfn_t udp_ehashfn);
> -
>  /**
>   * inet_lookup_reuseport() - execute reuseport logic on AF_INET socket if necessary.
>   * @net: network namespace.
> diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c
> index 7c9700c7c9c8..b0e8d278e8a9 100644
> --- a/net/ipv6/inet6_hashtables.c
> +++ b/net/ipv6/inet6_hashtables.c
> @@ -112,8 +112,6 @@ static inline int compute_score(struct sock *sk, struct net *net,
>  	return score;
>  }
>  
> -INDIRECT_CALLABLE_DECLARE(inet6_ehashfn_t udp6_ehashfn);
> -
>  /**
>   * inet6_lookup_reuseport() - execute reuseport logic on AF_INET6 socket if necessary.
>   * @net: network namespace.
> 
> ---
> base-commit: fb213ecbb8ac56b2d5569737f59126e91f87829a
> change-id: 20230731-indir-call-f1474e314184
> 
> Best regards,
> -- 
> Lorenz Bauer <lmb@isovalent.com>