* [net PATCH] net: appletalk: Drop aarp_send_probe_phase1()
@ 2025-01-09 12:27 Yeking
2025-01-11 2:24 ` Jakub Kicinski
0 siblings, 1 reply; 6+ messages in thread
From: Yeking @ 2025-01-09 12:27 UTC (permalink / raw)
To: netdev
Cc: 谢致邦 (XIE Zhibang), David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Simon Horman,
Arnd Bergmann, Greg Kroah-Hartman, Vitaly Kuznetsov,
Prarit Bhargava, linux-kernel
From: 谢致邦 (XIE Zhibang) <Yeking@Red54.com>
Due to the ltpc, cops, and ipddp drivers have been deleted,
aarp_send_probe_phase1() no longer works. (found by code inspection)
Fixes: 1dab47139e61 ("appletalk: remove ipddp driver")
Fixes: 00f3696f7555 ("net: appletalk: remove cops support")
Fixes: 03dcb90dbf62 ("net: appletalk: remove Apple/Farallon LocalTalk PC support")
Fixes: dbecb011eb78 ("appletalk: use ndo_siocdevprivate")
Signed-off-by: 谢致邦 (XIE Zhibang) <Yeking@Red54.com>
---
net/appletalk/aarp.c | 32 ++------------------------------
1 file changed, 2 insertions(+), 30 deletions(-)
diff --git a/net/appletalk/aarp.c b/net/appletalk/aarp.c
index 9fa0b246902b..af6a737e4dd3 100644
--- a/net/appletalk/aarp.c
+++ b/net/appletalk/aarp.c
@@ -432,38 +432,10 @@ static struct atalk_addr *__aarp_proxy_find(struct net_device *dev,
return a ? sa : NULL;
}
-/*
- * Probe a Phase 1 device or a device that requires its Net:Node to
- * be set via an ioctl.
- */
-static void aarp_send_probe_phase1(struct atalk_iface *iface)
-{
- struct ifreq atreq;
- struct sockaddr_at *sa = (struct sockaddr_at *)&atreq.ifr_addr;
- const struct net_device_ops *ops = iface->dev->netdev_ops;
-
- sa->sat_addr.s_node = iface->address.s_node;
- sa->sat_addr.s_net = ntohs(iface->address.s_net);
-
- /* We pass the Net:Node to the drivers/cards by a Device ioctl. */
- if (!(ops->ndo_do_ioctl(iface->dev, &atreq, SIOCSIFADDR))) {
- ops->ndo_do_ioctl(iface->dev, &atreq, SIOCGIFADDR);
- if (iface->address.s_net != htons(sa->sat_addr.s_net) ||
- iface->address.s_node != sa->sat_addr.s_node)
- iface->status |= ATIF_PROBE_FAIL;
-
- iface->address.s_net = htons(sa->sat_addr.s_net);
- iface->address.s_node = sa->sat_addr.s_node;
- }
-}
-
-
void aarp_probe_network(struct atalk_iface *atif)
{
- if (atif->dev->type == ARPHRD_LOCALTLK ||
- atif->dev->type == ARPHRD_PPP)
- aarp_send_probe_phase1(atif);
- else {
+ if (atif->dev->type != ARPHRD_LOCALTLK &&
+ atif->dev->type != ARPHRD_PPP) {
unsigned int count;
for (count = 0; count < AARP_RETRANSMIT_LIMIT; count++) {
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [net PATCH] net: appletalk: Drop aarp_send_probe_phase1()
2025-01-09 12:27 [net PATCH] net: appletalk: Drop aarp_send_probe_phase1() Yeking
@ 2025-01-11 2:24 ` Jakub Kicinski
2025-01-13 9:44 ` [PATCH net v2] " Yeking
0 siblings, 1 reply; 6+ messages in thread
From: Jakub Kicinski @ 2025-01-11 2:24 UTC (permalink / raw)
To: Yeking
Cc: netdev, David S. Miller, Eric Dumazet, Paolo Abeni, Simon Horman,
Arnd Bergmann, Greg Kroah-Hartman, Vitaly Kuznetsov,
Prarit Bhargava, linux-kernel
On Thu, 9 Jan 2025 12:27:51 +0000 Yeking@Red54.com wrote:
> Due to the ltpc, cops, and ipddp drivers have been deleted,
> aarp_send_probe_phase1() no longer works. (found by code inspection)
Could you explain more? What is your thought process?
> Fixes: 1dab47139e61 ("appletalk: remove ipddp driver")
> Fixes: 00f3696f7555 ("net: appletalk: remove cops support")
> Fixes: 03dcb90dbf62 ("net: appletalk: remove Apple/Farallon LocalTalk PC support")
> Fixes: dbecb011eb78 ("appletalk: use ndo_siocdevprivate")
Dead code is not a bug, you can mention the relevant commits
in the commit message, but no Fixes tag are appropriate here.
--
pw-bot: cr
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH net v2] net: appletalk: Drop aarp_send_probe_phase1()
2025-01-11 2:24 ` Jakub Kicinski
@ 2025-01-13 9:44 ` Yeking
2025-01-15 22:06 ` Jakub Kicinski
0 siblings, 1 reply; 6+ messages in thread
From: Yeking @ 2025-01-13 9:44 UTC (permalink / raw)
To: kuba
Cc: Yeking, arnd, davem, edumazet, gregkh, horms, linux-kernel,
netdev, pabeni, prarit, vkuznets
From: 谢致邦 (XIE Zhibang) <Yeking@Red54.com>
aarp_send_probe_phase1() used to work by calling ndo_do_ioctl of
appletalk drivers such as ltpc, cops, or ipddp, but these drivers have
been removed since the following commits:
commit dbecb011eb78 ("appletalk: use ndo_siocdevprivate")
commit 03dcb90dbf62 ("net: appletalk: remove Apple/Farallon LocalTalk PC
support")
commit 00f3696f7555 ("net: appletalk: remove cops support")
commit 1dab47139e61 ("appletalk: remove ipddp driver")
Thus aarp_send_probe_phase1() no longer works, so drop it. (found by
code inspection)
Signed-off-by: 谢致邦 (XIE Zhibang) <Yeking@Red54.com>
---
V1 -> V2: Update commit message
net/appletalk/aarp.c | 32 ++------------------------------
1 file changed, 2 insertions(+), 30 deletions(-)
diff --git a/net/appletalk/aarp.c b/net/appletalk/aarp.c
index 9fa0b246902b..af6a737e4dd3 100644
--- a/net/appletalk/aarp.c
+++ b/net/appletalk/aarp.c
@@ -432,38 +432,10 @@ static struct atalk_addr *__aarp_proxy_find(struct net_device *dev,
return a ? sa : NULL;
}
-/*
- * Probe a Phase 1 device or a device that requires its Net:Node to
- * be set via an ioctl.
- */
-static void aarp_send_probe_phase1(struct atalk_iface *iface)
-{
- struct ifreq atreq;
- struct sockaddr_at *sa = (struct sockaddr_at *)&atreq.ifr_addr;
- const struct net_device_ops *ops = iface->dev->netdev_ops;
-
- sa->sat_addr.s_node = iface->address.s_node;
- sa->sat_addr.s_net = ntohs(iface->address.s_net);
-
- /* We pass the Net:Node to the drivers/cards by a Device ioctl. */
- if (!(ops->ndo_do_ioctl(iface->dev, &atreq, SIOCSIFADDR))) {
- ops->ndo_do_ioctl(iface->dev, &atreq, SIOCGIFADDR);
- if (iface->address.s_net != htons(sa->sat_addr.s_net) ||
- iface->address.s_node != sa->sat_addr.s_node)
- iface->status |= ATIF_PROBE_FAIL;
-
- iface->address.s_net = htons(sa->sat_addr.s_net);
- iface->address.s_node = sa->sat_addr.s_node;
- }
-}
-
-
void aarp_probe_network(struct atalk_iface *atif)
{
- if (atif->dev->type == ARPHRD_LOCALTLK ||
- atif->dev->type == ARPHRD_PPP)
- aarp_send_probe_phase1(atif);
- else {
+ if (atif->dev->type != ARPHRD_LOCALTLK &&
+ atif->dev->type != ARPHRD_PPP) {
unsigned int count;
for (count = 0; count < AARP_RETRANSMIT_LIMIT; count++) {
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net v2] net: appletalk: Drop aarp_send_probe_phase1()
2025-01-13 9:44 ` [PATCH net v2] " Yeking
@ 2025-01-15 22:06 ` Jakub Kicinski
2025-01-17 1:41 ` [PATCH net-next v3] " Yeking
0 siblings, 1 reply; 6+ messages in thread
From: Jakub Kicinski @ 2025-01-15 22:06 UTC (permalink / raw)
To: Yeking
Cc: arnd, davem, edumazet, gregkh, horms, linux-kernel, netdev,
pabeni, prarit, vkuznets
On Mon, 13 Jan 2025 09:44:51 +0000 Yeking@Red54.com wrote:
> void aarp_probe_network(struct atalk_iface *atif)
> {
> - if (atif->dev->type == ARPHRD_LOCALTLK ||
> - atif->dev->type == ARPHRD_PPP)
> - aarp_send_probe_phase1(atif);
> - else {
> + if (atif->dev->type != ARPHRD_LOCALTLK &&
> + atif->dev->type != ARPHRD_PPP) {
> unsigned int count;
You assert this is our only option, so why leave the if () around
at all?
nit: subject prefix should be "PATCH net-next v2"
--
pw-bot: cr
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH net-next v3] net: appletalk: Drop aarp_send_probe_phase1()
2025-01-15 22:06 ` Jakub Kicinski
@ 2025-01-17 1:41 ` Yeking
2025-01-20 10:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 6+ messages in thread
From: Yeking @ 2025-01-17 1:41 UTC (permalink / raw)
To: kuba
Cc: Yeking, arnd, davem, edumazet, gregkh, horms, linux-kernel,
netdev, pabeni, prarit, vkuznets
From: 谢致邦 (XIE Zhibang) <Yeking@Red54.com>
aarp_send_probe_phase1() used to work by calling ndo_do_ioctl of
appletalk drivers ltpc or cops, but these two drivers have been removed
since the following commits:
commit 03dcb90dbf62 ("net: appletalk: remove Apple/Farallon LocalTalk PC
support")
commit 00f3696f7555 ("net: appletalk: remove cops support")
Thus aarp_send_probe_phase1() no longer works, so drop it. (found by
code inspection)
Signed-off-by: 谢致邦 (XIE Zhibang) <Yeking@Red54.com>
---
V2 -> V3: Drop if(), and update commit message
V1 -> V2: Update commit message
net/appletalk/aarp.c | 45 +++++++-------------------------------------
1 file changed, 7 insertions(+), 38 deletions(-)
diff --git a/net/appletalk/aarp.c b/net/appletalk/aarp.c
index 9fa0b246902b..05cbb3c227c5 100644
--- a/net/appletalk/aarp.c
+++ b/net/appletalk/aarp.c
@@ -432,49 +432,18 @@ static struct atalk_addr *__aarp_proxy_find(struct net_device *dev,
return a ? sa : NULL;
}
-/*
- * Probe a Phase 1 device or a device that requires its Net:Node to
- * be set via an ioctl.
- */
-static void aarp_send_probe_phase1(struct atalk_iface *iface)
-{
- struct ifreq atreq;
- struct sockaddr_at *sa = (struct sockaddr_at *)&atreq.ifr_addr;
- const struct net_device_ops *ops = iface->dev->netdev_ops;
-
- sa->sat_addr.s_node = iface->address.s_node;
- sa->sat_addr.s_net = ntohs(iface->address.s_net);
-
- /* We pass the Net:Node to the drivers/cards by a Device ioctl. */
- if (!(ops->ndo_do_ioctl(iface->dev, &atreq, SIOCSIFADDR))) {
- ops->ndo_do_ioctl(iface->dev, &atreq, SIOCGIFADDR);
- if (iface->address.s_net != htons(sa->sat_addr.s_net) ||
- iface->address.s_node != sa->sat_addr.s_node)
- iface->status |= ATIF_PROBE_FAIL;
-
- iface->address.s_net = htons(sa->sat_addr.s_net);
- iface->address.s_node = sa->sat_addr.s_node;
- }
-}
-
-
void aarp_probe_network(struct atalk_iface *atif)
{
- if (atif->dev->type == ARPHRD_LOCALTLK ||
- atif->dev->type == ARPHRD_PPP)
- aarp_send_probe_phase1(atif);
- else {
- unsigned int count;
+ unsigned int count;
- for (count = 0; count < AARP_RETRANSMIT_LIMIT; count++) {
- aarp_send_probe(atif->dev, &atif->address);
+ for (count = 0; count < AARP_RETRANSMIT_LIMIT; count++) {
+ aarp_send_probe(atif->dev, &atif->address);
- /* Defer 1/10th */
- msleep(100);
+ /* Defer 1/10th */
+ msleep(100);
- if (atif->status & ATIF_PROBE_FAIL)
- break;
- }
+ if (atif->status & ATIF_PROBE_FAIL)
+ break;
}
}
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next v3] net: appletalk: Drop aarp_send_probe_phase1()
2025-01-17 1:41 ` [PATCH net-next v3] " Yeking
@ 2025-01-20 10:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-01-20 10:10 UTC (permalink / raw)
To: XIE Zhibang
Cc: kuba, Yeking, arnd, davem, edumazet, gregkh, horms, linux-kernel,
netdev, pabeni, prarit, vkuznets
Hello:
This patch was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:
On Fri, 17 Jan 2025 01:41:40 +0000 you wrote:
> From: 谢致邦 (XIE Zhibang) <Yeking@Red54.com>
>
> aarp_send_probe_phase1() used to work by calling ndo_do_ioctl of
> appletalk drivers ltpc or cops, but these two drivers have been removed
> since the following commits:
> commit 03dcb90dbf62 ("net: appletalk: remove Apple/Farallon LocalTalk PC
> support")
> commit 00f3696f7555 ("net: appletalk: remove cops support")
>
> [...]
Here is the summary with links:
- [net-next,v3] net: appletalk: Drop aarp_send_probe_phase1()
https://git.kernel.org/netdev/net-next/c/45bd1c5ba758
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] 6+ messages in thread
end of thread, other threads:[~2025-01-20 10:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-09 12:27 [net PATCH] net: appletalk: Drop aarp_send_probe_phase1() Yeking
2025-01-11 2:24 ` Jakub Kicinski
2025-01-13 9:44 ` [PATCH net v2] " Yeking
2025-01-15 22:06 ` Jakub Kicinski
2025-01-17 1:41 ` [PATCH net-next v3] " Yeking
2025-01-20 10: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).