* [PATCH net] tun: fix bonding active backup with arp monitoring
@ 2021-11-12 7:56 Nicolas Dichtel
2021-11-15 13:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Dichtel @ 2021-11-12 7:56 UTC (permalink / raw)
To: davem, kuba; +Cc: netdev, Nicolas Dichtel
As stated in the bonding doc, trans_start must be set manually for drivers
using NETIF_F_LLTX:
Drivers that use NETIF_F_LLTX flag must also update
netdev_queue->trans_start. If they do not, then the ARP monitor will
immediately fail any slaves using that driver, and those slaves will stay
down.
Link: https://www.kernel.org/doc/html/v5.15/networking/bonding.html#arp-monitor-operation
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
drivers/net/tun.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index fecc9a1d293a..1572878c3403 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1010,6 +1010,7 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct tun_struct *tun = netdev_priv(dev);
int txq = skb->queue_mapping;
+ struct netdev_queue *queue;
struct tun_file *tfile;
int len = skb->len;
@@ -1054,6 +1055,10 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
if (ptr_ring_produce(&tfile->tx_ring, skb))
goto drop;
+ /* NETIF_F_LLTX requires to do our own update of trans_start */
+ queue = netdev_get_tx_queue(dev, txq);
+ queue->trans_start = jiffies;
+
/* Notify and wake up reader process */
if (tfile->flags & TUN_FASYNC)
kill_fasync(&tfile->fasync, SIGIO, POLL_IN);
--
2.33.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net] tun: fix bonding active backup with arp monitoring
2021-11-12 7:56 [PATCH net] tun: fix bonding active backup with arp monitoring Nicolas Dichtel
@ 2021-11-15 13:10 ` patchwork-bot+netdevbpf
2021-11-19 17:26 ` Nicolas Dichtel
0 siblings, 1 reply; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-11-15 13:10 UTC (permalink / raw)
To: Nicolas Dichtel; +Cc: davem, kuba, netdev
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:
On Fri, 12 Nov 2021 08:56:03 +0100 you wrote:
> As stated in the bonding doc, trans_start must be set manually for drivers
> using NETIF_F_LLTX:
> Drivers that use NETIF_F_LLTX flag must also update
> netdev_queue->trans_start. If they do not, then the ARP monitor will
> immediately fail any slaves using that driver, and those slaves will stay
> down.
>
> [...]
Here is the summary with links:
- [net] tun: fix bonding active backup with arp monitoring
https://git.kernel.org/netdev/net/c/a31d27fbed5d
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
* Re: [PATCH net] tun: fix bonding active backup with arp monitoring
2021-11-15 13:10 ` patchwork-bot+netdevbpf
@ 2021-11-19 17:26 ` Nicolas Dichtel
2021-11-22 11:18 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Dichtel @ 2021-11-19 17:26 UTC (permalink / raw)
To: patchwork-bot+netdevbpf; +Cc: davem, kuba, netdev, stable, Krzysztof Kozlowski
Le 15/11/2021 à 14:10, patchwork-bot+netdevbpf@kernel.org a écrit :
> Hello:
>
> This patch was applied to netdev/net.git (master)
> by David S. Miller <davem@davemloft.net>:
>
> On Fri, 12 Nov 2021 08:56:03 +0100 you wrote:
>> As stated in the bonding doc, trans_start must be set manually for drivers
>> using NETIF_F_LLTX:
>> Drivers that use NETIF_F_LLTX flag must also update
>> netdev_queue->trans_start. If they do not, then the ARP monitor will
>> immediately fail any slaves using that driver, and those slaves will stay
>> down.
>>
>> [...]
>
> Here is the summary with links:
> - [net] tun: fix bonding active backup with arp monitoring
> https://git.kernel.org/netdev/net/c/a31d27fbed5d
>
> You are awesome, thank you!
>
May I ask for a backport to stable of this patch?
It's now in Linus tree: a31d27fbed5d ("tun: fix bonding active backup with arp
monitoring"):
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a31d27fbed5d
I didn't put a Fixes tag in the original submission because the bug is there
before git ages.
Maybe "Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")" would have been a better choice.
Regards,
Nicolas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] tun: fix bonding active backup with arp monitoring
2021-11-19 17:26 ` Nicolas Dichtel
@ 2021-11-22 11:18 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2021-11-22 11:18 UTC (permalink / raw)
To: Nicolas Dichtel
Cc: patchwork-bot+netdevbpf, davem, kuba, netdev, stable,
Krzysztof Kozlowski
On Fri, Nov 19, 2021 at 06:26:17PM +0100, Nicolas Dichtel wrote:
> Le 15/11/2021 à 14:10, patchwork-bot+netdevbpf@kernel.org a écrit :
> > Hello:
> >
> > This patch was applied to netdev/net.git (master)
> > by David S. Miller <davem@davemloft.net>:
> >
> > On Fri, 12 Nov 2021 08:56:03 +0100 you wrote:
> >> As stated in the bonding doc, trans_start must be set manually for drivers
> >> using NETIF_F_LLTX:
> >> Drivers that use NETIF_F_LLTX flag must also update
> >> netdev_queue->trans_start. If they do not, then the ARP monitor will
> >> immediately fail any slaves using that driver, and those slaves will stay
> >> down.
> >>
> >> [...]
> >
> > Here is the summary with links:
> > - [net] tun: fix bonding active backup with arp monitoring
> > https://git.kernel.org/netdev/net/c/a31d27fbed5d
> >
> > You are awesome, thank you!
> >
> May I ask for a backport to stable of this patch?
>
> It's now in Linus tree: a31d27fbed5d ("tun: fix bonding active backup with arp
> monitoring"):
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a31d27fbed5d
>
> I didn't put a Fixes tag in the original submission because the bug is there
> before git ages.
> Maybe "Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")" would have been a better choice.
Now queued up, thanks.
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-11-22 11:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-12 7:56 [PATCH net] tun: fix bonding active backup with arp monitoring Nicolas Dichtel
2021-11-15 13:10 ` patchwork-bot+netdevbpf
2021-11-19 17:26 ` Nicolas Dichtel
2021-11-22 11:18 ` Greg KH
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).