* [PATCH] appletalk: remove special handling code for ipddp
@ 2023-10-12 6:34 Lukas Bulwahn
2023-10-13 15:38 ` Simon Horman
2023-10-14 1:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Lukas Bulwahn @ 2023-10-12 6:34 UTC (permalink / raw)
To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Arnd Bergmann, netdev
Cc: kernel-janitors, linux-kernel, Lukas Bulwahn
After commit 1dab47139e61 ("appletalk: remove ipddp driver") removes the
config IPDDP, there is some minor code clean-up possible in the appletalk
network layer.
Remove some code in appletalk layer after the ipddp driver is gone.
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
---
net/appletalk/ddp.c | 36 ------------------------------------
1 file changed, 36 deletions(-)
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c
index 8978fb6212ff..9ba04a69ec2a 100644
--- a/net/appletalk/ddp.c
+++ b/net/appletalk/ddp.c
@@ -1284,39 +1284,6 @@ static int atalk_getname(struct socket *sock, struct sockaddr *uaddr,
return err;
}
-#if IS_ENABLED(CONFIG_IPDDP)
-static __inline__ int is_ip_over_ddp(struct sk_buff *skb)
-{
- return skb->data[12] == 22;
-}
-
-static int handle_ip_over_ddp(struct sk_buff *skb)
-{
- struct net_device *dev = __dev_get_by_name(&init_net, "ipddp0");
- struct net_device_stats *stats;
-
- /* This needs to be able to handle ipddp"N" devices */
- if (!dev) {
- kfree_skb(skb);
- return NET_RX_DROP;
- }
-
- skb->protocol = htons(ETH_P_IP);
- skb_pull(skb, 13);
- skb->dev = dev;
- skb_reset_transport_header(skb);
-
- stats = netdev_priv(dev);
- stats->rx_packets++;
- stats->rx_bytes += skb->len + 13;
- return netif_rx(skb); /* Send the SKB up to a higher place. */
-}
-#else
-/* make it easy for gcc to optimize this test out, i.e. kill the code */
-#define is_ip_over_ddp(skb) 0
-#define handle_ip_over_ddp(skb) 0
-#endif
-
static int atalk_route_packet(struct sk_buff *skb, struct net_device *dev,
struct ddpehdr *ddp, __u16 len_hops, int origlen)
{
@@ -1480,9 +1447,6 @@ static int atalk_rcv(struct sk_buff *skb, struct net_device *dev,
return atalk_route_packet(skb, dev, ddp, len_hops, origlen);
}
- /* if IP over DDP is not selected this code will be optimized out */
- if (is_ip_over_ddp(skb))
- return handle_ip_over_ddp(skb);
/*
* Which socket - atalk_search_socket() looks for a *full match*
* of the <net, node, port> tuple.
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] appletalk: remove special handling code for ipddp
2023-10-12 6:34 [PATCH] appletalk: remove special handling code for ipddp Lukas Bulwahn
@ 2023-10-13 15:38 ` Simon Horman
2023-10-14 1:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2023-10-13 15:38 UTC (permalink / raw)
To: Lukas Bulwahn
Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Arnd Bergmann, netdev, kernel-janitors, linux-kernel
On Thu, Oct 12, 2023 at 08:34:43AM +0200, Lukas Bulwahn wrote:
> After commit 1dab47139e61 ("appletalk: remove ipddp driver") removes the
> config IPDDP, there is some minor code clean-up possible in the appletalk
> network layer.
>
> Remove some code in appletalk layer after the ipddp driver is gone.
>
> Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Thanks,
CONFIG_IPDDP is gone so this code doesn't do anything.
Reviewed-by: Simon Horman <horms@kernel.org>
As a further follow-up should we consider dropping CONFIG_IPDDP*
from various defconfigs it appears in?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] appletalk: remove special handling code for ipddp
2023-10-12 6:34 [PATCH] appletalk: remove special handling code for ipddp Lukas Bulwahn
2023-10-13 15:38 ` Simon Horman
@ 2023-10-14 1:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-10-14 1:10 UTC (permalink / raw)
To: Lukas Bulwahn
Cc: davem, edumazet, kuba, pabeni, arnd, netdev, kernel-janitors,
linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 12 Oct 2023 08:34:43 +0200 you wrote:
> After commit 1dab47139e61 ("appletalk: remove ipddp driver") removes the
> config IPDDP, there is some minor code clean-up possible in the appletalk
> network layer.
>
> Remove some code in appletalk layer after the ipddp driver is gone.
>
> Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
>
> [...]
Here is the summary with links:
- appletalk: remove special handling code for ipddp
https://git.kernel.org/netdev/net-next/c/85605fb694f0
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:[~2023-10-14 1:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-12 6:34 [PATCH] appletalk: remove special handling code for ipddp Lukas Bulwahn
2023-10-13 15:38 ` Simon Horman
2023-10-14 1:10 ` 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).