tun: fix bonding active backup with arp monitoring
Subsystems (4)
PATCH 1/1 tun: fix bonding active backup with arp monitoring
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.
--- drivers/net/tun.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/net/tun.c +5 -0
@@ -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 );
Signature · 1 line
2.33.0
This patch was applied to netdev/net.git (master) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <[email protected]>:
Quoted 8 lines · On Fri, 12 Nov 2021 08:56:03 +0100 you wrote:
As stated in the bonding doc,
trans_startmust be set manually for drivers usingNETIF_F_LLTX:
Drivers that useNETIF_F_LLTXflag must also updatenetdev_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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Le 15/11/2021 à 14:10, [email protected] a écrit :
Quoted 13 lines
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <[email protected]>:Quoted 7 lines · On Fri, 12 Nov 2021 08:56:03 +0100 you wrote:
As stated in the bonding doc,
trans_startmust be set manually for drivers usingNETIF_F_LLTX:
Drivers that useNETIF_F_LLTXflag must also updatenetdev_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.
Quoted 8 lines
Quoted 1 line
[...]
Here is the summary with links:
- [net] tun: fix bonding active backup with arp monitoringhttps://git.kernel.org/netdev/net/c/a31d27fbed5dYou 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
Quoted 24 lines · Nicolas Dichtel
Le 15/11/2021 à 14:10, [email protected] a écrit :
Quoted 13 lines
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <[email protected]>:Quoted 7 lines · On Fri, 12 Nov 2021 08:56:03 +0100 you wrote:
As stated in the bonding doc,
trans_startmust be set manually for drivers usingNETIF_F_LLTX:
Drivers that useNETIF_F_LLTXflag must also updatenetdev_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.Quoted 8 lines
Quoted 1 line
[...]
Here is the summary with links:
- [net] tun: fix bonding active backup with arp monitoringhttps://git.kernel.org/netdev/net/c/a31d27fbed5dYou are awesome, thank you!
May I ask for a backport to stable of this patch?
Quoted 7 lines
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=a31d27fbed5dI 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