netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] ipv4: Make ip_idents_reserve static
@ 2022-01-28 23:53 David Ahern
  2022-01-29  0:14 ` Eric Dumazet
  2022-01-31 11:40 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: David Ahern @ 2022-01-28 23:53 UTC (permalink / raw)
  To: netdev; +Cc: David Ahern, Eric Dumazet

ip_idents_reserve is only used in net/ipv4/route.c. Make it static
and remove the export.

Signed-off-by: David Ahern <dsahern@kernel.org>
Cc: Eric Dumazet <edumazet@google.com>
---
 include/net/ip.h | 1 -
 net/ipv4/route.c | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/include/net/ip.h b/include/net/ip.h
index b51bae43b0dd..4fcb48598d2d 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -517,7 +517,6 @@ void ip_dst_metrics_put(struct dst_entry *dst)
 		kfree(p);
 }
 
-u32 ip_idents_reserve(u32 hash, int segs);
 void __ip_select_ident(struct net *net, struct iphdr *iph, int segs);
 
 static inline void ip_select_ident_segs(struct net *net, struct sk_buff *skb,
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index e42e283b5515..8b35075088e1 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -457,7 +457,7 @@ static u32 *ip_tstamps __read_mostly;
  * if one generator is seldom used. This makes hard for an attacker
  * to infer how many packets were sent between two points in time.
  */
-u32 ip_idents_reserve(u32 hash, int segs)
+static u32 ip_idents_reserve(u32 hash, int segs)
 {
 	u32 bucket, old, now = (u32)jiffies;
 	atomic_t *p_id;
@@ -478,7 +478,6 @@ u32 ip_idents_reserve(u32 hash, int segs)
 	 */
 	return atomic_add_return(segs + delta, p_id) - segs;
 }
-EXPORT_SYMBOL(ip_idents_reserve);
 
 void __ip_select_ident(struct net *net, struct iphdr *iph, int segs)
 {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] ipv4: Make ip_idents_reserve static
  2022-01-28 23:53 [PATCH net-next] ipv4: Make ip_idents_reserve static David Ahern
@ 2022-01-29  0:14 ` Eric Dumazet
  2022-01-31 11:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2022-01-29  0:14 UTC (permalink / raw)
  To: David Ahern; +Cc: netdev

On Fri, Jan 28, 2022 at 3:53 PM David Ahern <dsahern@kernel.org> wrote:
>
> ip_idents_reserve is only used in net/ipv4/route.c. Make it static
> and remove the export.
>
> Signed-off-by: David Ahern <dsahern@kernel.org>
> Cc: Eric Dumazet <edumazet@google.com>
> ---

Thanks, this came after

commit 62f20e068ccc ipv6: use prandom_u32() for ID generation

Reviewed-by: Eric Dumazet <edumazet@google.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] ipv4: Make ip_idents_reserve static
  2022-01-28 23:53 [PATCH net-next] ipv4: Make ip_idents_reserve static David Ahern
  2022-01-29  0:14 ` Eric Dumazet
@ 2022-01-31 11:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-01-31 11:40 UTC (permalink / raw)
  To: David Ahern; +Cc: netdev, edumazet

Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Fri, 28 Jan 2022 16:53:47 -0700 you wrote:
> ip_idents_reserve is only used in net/ipv4/route.c. Make it static
> and remove the export.
> 
> Signed-off-by: David Ahern <dsahern@kernel.org>
> Cc: Eric Dumazet <edumazet@google.com>
> ---
>  include/net/ip.h | 1 -
>  net/ipv4/route.c | 3 +--
>  2 files changed, 1 insertion(+), 3 deletions(-)

Here is the summary with links:
  - [net-next] ipv4: Make ip_idents_reserve static
    https://git.kernel.org/netdev/net-next/c/47ed9442b2ec

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-31 11:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-28 23:53 [PATCH net-next] ipv4: Make ip_idents_reserve static David Ahern
2022-01-29  0:14 ` Eric Dumazet
2022-01-31 11:40 ` patchwork-bot+netdevbpf

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).