All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/2] net: remove skb_flow_get_ports()
@ 2025-02-21 11:07 Nicolas Dichtel
  2025-02-21 11:07 ` [PATCH net-next v2 1/2] skbuff: kill skb_flow_get_ports() Nicolas Dichtel
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Nicolas Dichtel @ 2025-02-21 11:07 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski, Paolo Abeni, Eric Dumazet
  Cc: Simon Horman, Maciej Fijalkowski, netdev


Remove skb_flow_get_ports() and rename __skb_flow_get_ports() to
skb_flow_get_ports().

v1 -> v2:
 - remove the 'Fixes' tag from the patch #1
 - add patch #2

 drivers/net/bonding/bond_main.c |  2 +-
 include/linux/skbuff.h          | 10 ++--------
 net/core/flow_dissector.c       | 10 +++++-----
 3 files changed, 8 insertions(+), 14 deletions(-)

Comments are welcome.

Regards,
Nicolas

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

* [PATCH net-next v2 1/2] skbuff: kill skb_flow_get_ports()
  2025-02-21 11:07 [PATCH net-next v2 0/2] net: remove skb_flow_get_ports() Nicolas Dichtel
@ 2025-02-21 11:07 ` Nicolas Dichtel
  2025-02-21 11:07 ` [PATCH net-next v2 2/2] net: remove '__' from __skb_flow_get_ports() Nicolas Dichtel
  2025-02-24 22:40 ` [PATCH net-next v2 0/2] net: remove skb_flow_get_ports() patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Nicolas Dichtel @ 2025-02-21 11:07 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski, Paolo Abeni, Eric Dumazet
  Cc: Simon Horman, Maciej Fijalkowski, netdev, Nicolas Dichtel

Since commit a815bde56b15 ("net, bonding: Refactor bond_xmit_hash for use
with xdp_buff"), this function is not used anymore.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Reviewed-by: Simon Horman <horms@kernel.org>
---
 include/linux/skbuff.h | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index bb2b751d274a..f403d43064a5 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1530,12 +1530,6 @@ u32 __skb_get_poff(const struct sk_buff *skb, const void *data,
 __be32 __skb_flow_get_ports(const struct sk_buff *skb, int thoff, u8 ip_proto,
 			    const void *data, int hlen_proto);
 
-static inline __be32 skb_flow_get_ports(const struct sk_buff *skb,
-					int thoff, u8 ip_proto)
-{
-	return __skb_flow_get_ports(skb, thoff, ip_proto, NULL, 0);
-}
-
 void skb_flow_dissector_init(struct flow_dissector *flow_dissector,
 			     const struct flow_dissector_key *key,
 			     unsigned int key_count);
-- 
2.47.1


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

* [PATCH net-next v2 2/2] net: remove '__' from __skb_flow_get_ports()
  2025-02-21 11:07 [PATCH net-next v2 0/2] net: remove skb_flow_get_ports() Nicolas Dichtel
  2025-02-21 11:07 ` [PATCH net-next v2 1/2] skbuff: kill skb_flow_get_ports() Nicolas Dichtel
@ 2025-02-21 11:07 ` Nicolas Dichtel
  2025-02-24 22:40 ` [PATCH net-next v2 0/2] net: remove skb_flow_get_ports() patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Nicolas Dichtel @ 2025-02-21 11:07 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski, Paolo Abeni, Eric Dumazet
  Cc: Simon Horman, Maciej Fijalkowski, netdev, Nicolas Dichtel

Only one version of skb_flow_get_ports() exists after the previous commit,
so let's remove the useless '__'.

Suggested-by: Simon Horman <horms@kernel.org>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 drivers/net/bonding/bond_main.c |  2 +-
 include/linux/skbuff.h          |  4 ++--
 net/core/flow_dissector.c       | 10 +++++-----
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index f6d0628a36d9..7d716e90a84c 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -4214,7 +4214,7 @@ static bool bond_flow_ip(struct sk_buff *skb, struct flow_keys *fk, const void *
 	}
 
 	if (l34 && *ip_proto >= 0)
-		fk->ports.ports = __skb_flow_get_ports(skb, *nhoff, *ip_proto, data, hlen);
+		fk->ports.ports = skb_flow_get_ports(skb, *nhoff, *ip_proto, data, hlen);
 
 	return true;
 }
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index f403d43064a5..fe7f98e7c69e 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1527,8 +1527,8 @@ void __skb_get_hash_net(const struct net *net, struct sk_buff *skb);
 u32 skb_get_poff(const struct sk_buff *skb);
 u32 __skb_get_poff(const struct sk_buff *skb, const void *data,
 		   const struct flow_keys_basic *keys, int hlen);
-__be32 __skb_flow_get_ports(const struct sk_buff *skb, int thoff, u8 ip_proto,
-			    const void *data, int hlen_proto);
+__be32 skb_flow_get_ports(const struct sk_buff *skb, int thoff, u8 ip_proto,
+			  const void *data, int hlen_proto);
 
 void skb_flow_dissector_init(struct flow_dissector *flow_dissector,
 			     const struct flow_dissector_key *key,
diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
index 9cd8de6bebb5..1b61bb25ba0e 100644
--- a/net/core/flow_dissector.c
+++ b/net/core/flow_dissector.c
@@ -106,7 +106,7 @@ int flow_dissector_bpf_prog_attach_check(struct net *net,
 #endif /* CONFIG_BPF_SYSCALL */
 
 /**
- * __skb_flow_get_ports - extract the upper layer ports and return them
+ * skb_flow_get_ports - extract the upper layer ports and return them
  * @skb: sk_buff to extract the ports from
  * @thoff: transport header offset
  * @ip_proto: protocol for which to get port offset
@@ -116,8 +116,8 @@ int flow_dissector_bpf_prog_attach_check(struct net *net,
  * The function will try to retrieve the ports at offset thoff + poff where poff
  * is the protocol port offset returned from proto_ports_offset
  */
-__be32 __skb_flow_get_ports(const struct sk_buff *skb, int thoff, u8 ip_proto,
-			    const void *data, int hlen)
+__be32 skb_flow_get_ports(const struct sk_buff *skb, int thoff, u8 ip_proto,
+			  const void *data, int hlen)
 {
 	int poff = proto_ports_offset(ip_proto);
 
@@ -137,7 +137,7 @@ __be32 __skb_flow_get_ports(const struct sk_buff *skb, int thoff, u8 ip_proto,
 
 	return 0;
 }
-EXPORT_SYMBOL(__skb_flow_get_ports);
+EXPORT_SYMBOL(skb_flow_get_ports);
 
 static bool icmp_has_id(u8 type)
 {
@@ -870,7 +870,7 @@ __skb_flow_dissect_ports(const struct sk_buff *skb,
 	if (!key_ports && !key_ports_range)
 		return;
 
-	ports = __skb_flow_get_ports(skb, nhoff, ip_proto, data, hlen);
+	ports = skb_flow_get_ports(skb, nhoff, ip_proto, data, hlen);
 
 	if (key_ports)
 		key_ports->ports = ports;
-- 
2.47.1


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

* Re: [PATCH net-next v2 0/2] net: remove skb_flow_get_ports()
  2025-02-21 11:07 [PATCH net-next v2 0/2] net: remove skb_flow_get_ports() Nicolas Dichtel
  2025-02-21 11:07 ` [PATCH net-next v2 1/2] skbuff: kill skb_flow_get_ports() Nicolas Dichtel
  2025-02-21 11:07 ` [PATCH net-next v2 2/2] net: remove '__' from __skb_flow_get_ports() Nicolas Dichtel
@ 2025-02-24 22:40 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-02-24 22:40 UTC (permalink / raw)
  To: Nicolas Dichtel
  Cc: davem, kuba, pabeni, edumazet, horms, maciej.fijalkowski, netdev

Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Fri, 21 Feb 2025 12:07:27 +0100 you wrote:
> Remove skb_flow_get_ports() and rename __skb_flow_get_ports() to
> skb_flow_get_ports().
> 
> v1 -> v2:
>  - remove the 'Fixes' tag from the patch #1
>  - add patch #2
> 
> [...]

Here is the summary with links:
  - [net-next,v2,1/2] skbuff: kill skb_flow_get_ports()
    https://git.kernel.org/netdev/net-next/c/89ac4a59ca6d
  - [net-next,v2,2/2] net: remove '__' from __skb_flow_get_ports()
    https://git.kernel.org/netdev/net-next/c/c52fd4f083cc

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

end of thread, other threads:[~2025-02-24 22:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-21 11:07 [PATCH net-next v2 0/2] net: remove skb_flow_get_ports() Nicolas Dichtel
2025-02-21 11:07 ` [PATCH net-next v2 1/2] skbuff: kill skb_flow_get_ports() Nicolas Dichtel
2025-02-21 11:07 ` [PATCH net-next v2 2/2] net: remove '__' from __skb_flow_get_ports() Nicolas Dichtel
2025-02-24 22:40 ` [PATCH net-next v2 0/2] net: remove skb_flow_get_ports() patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.