netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: change the type of ip_route_input_rcu to static
@ 2022-07-11  7:35 Zhengchao Shao
  2022-07-12 13:20 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Zhengchao Shao @ 2022-07-11  7:35 UTC (permalink / raw)
  To: netdev, linux-kernel, davem, yoshfuji, dsahern, edumazet, kuba, pabeni
  Cc: weiyongjun1, yuehaibing, shaozhengchao

The type of ip_route_input_rcu should be static.

Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
---
 include/net/route.h |  4 ----
 net/ipv4/route.c    | 34 +++++++++++++++++-----------------
 2 files changed, 17 insertions(+), 21 deletions(-)

diff --git a/include/net/route.h b/include/net/route.h
index b6743ff88e30..4929a710c24b 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -201,10 +201,6 @@ int ip_mc_validate_source(struct sk_buff *skb, __be32 daddr, __be32 saddr,
 			  struct in_device *in_dev, u32 *itag);
 int ip_route_input_noref(struct sk_buff *skb, __be32 dst, __be32 src,
 			 u8 tos, struct net_device *devin);
-int ip_route_input_rcu(struct sk_buff *skb, __be32 dst, __be32 src,
-		       u8 tos, struct net_device *devin,
-		       struct fib_result *res);
-
 int ip_route_use_hint(struct sk_buff *skb, __be32 dst, __be32 src,
 		      u8 tos, struct net_device *devin,
 		      const struct sk_buff *hint);
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index bd351fab46e6..328beff85a1e 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2432,24 +2432,9 @@ out:	return err;
 	goto out;
 }
 
-int ip_route_input_noref(struct sk_buff *skb, __be32 daddr, __be32 saddr,
-			 u8 tos, struct net_device *dev)
-{
-	struct fib_result res;
-	int err;
-
-	tos &= IPTOS_RT_MASK;
-	rcu_read_lock();
-	err = ip_route_input_rcu(skb, daddr, saddr, tos, dev, &res);
-	rcu_read_unlock();
-
-	return err;
-}
-EXPORT_SYMBOL(ip_route_input_noref);
-
 /* called with rcu_read_lock held */
-int ip_route_input_rcu(struct sk_buff *skb, __be32 daddr, __be32 saddr,
-		       u8 tos, struct net_device *dev, struct fib_result *res)
+static int ip_route_input_rcu(struct sk_buff *skb, __be32 daddr, __be32 saddr,
+			      u8 tos, struct net_device *dev, struct fib_result *res)
 {
 	/* Multicast recognition logic is moved from route cache to here.
 	 * The problem was that too many Ethernet cards have broken/missing
@@ -2498,6 +2483,21 @@ int ip_route_input_rcu(struct sk_buff *skb, __be32 daddr, __be32 saddr,
 	return ip_route_input_slow(skb, daddr, saddr, tos, dev, res);
 }
 
+int ip_route_input_noref(struct sk_buff *skb, __be32 daddr, __be32 saddr,
+			 u8 tos, struct net_device *dev)
+{
+	struct fib_result res;
+	int err;
+
+	tos &= IPTOS_RT_MASK;
+	rcu_read_lock();
+	err = ip_route_input_rcu(skb, daddr, saddr, tos, dev, &res);
+	rcu_read_unlock();
+
+	return err;
+}
+EXPORT_SYMBOL(ip_route_input_noref);
+
 /* called with rcu_read_lock() */
 static struct rtable *__mkroute_output(const struct fib_result *res,
 				       const struct flowi4 *fl4, int orig_oif,
-- 
2.17.1


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

* Re: [PATCH] net: change the type of ip_route_input_rcu to static
  2022-07-11  7:35 [PATCH] net: change the type of ip_route_input_rcu to static Zhengchao Shao
@ 2022-07-12 13:20 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-07-12 13:20 UTC (permalink / raw)
  To: Zhengchao Shao
  Cc: netdev, linux-kernel, davem, yoshfuji, dsahern, edumazet, kuba,
	pabeni, weiyongjun1, yuehaibing

Hello:

This patch was applied to netdev/net-next.git (master)
by Paolo Abeni <pabeni@redhat.com>:

On Mon, 11 Jul 2022 15:35:49 +0800 you wrote:
> The type of ip_route_input_rcu should be static.
> 
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
> ---
>  include/net/route.h |  4 ----
>  net/ipv4/route.c    | 34 +++++++++++++++++-----------------
>  2 files changed, 17 insertions(+), 21 deletions(-)

Here is the summary with links:
  - net: change the type of ip_route_input_rcu to static
    https://git.kernel.org/netdev/net-next/c/5022e221c98a

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] 2+ messages in thread

end of thread, other threads:[~2022-07-12 13:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-11  7:35 [PATCH] net: change the type of ip_route_input_rcu to static Zhengchao Shao
2022-07-12 13:20 ` 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).