“d5c003b4d1690e666dbab02bc8e705947baa848c”上不存在“include/acpi/platform/aclinuxex.h”
提交 34b3f67d 编写于 作者: N Nicolas Dichtel 提交者: Yang Yingliang

tun: fix bonding active backup with arp monitoring

stable inclusion
from linux-4.19.218
commit a57c5cbfb5c4dff95797a189b4d093b6343bc6d2

--------------------------------

commit a31d27fb upstream.

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-operationSigned-off-by: NNicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 178dcf7a
...@@ -1077,6 +1077,7 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -1077,6 +1077,7 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
{ {
struct tun_struct *tun = netdev_priv(dev); struct tun_struct *tun = netdev_priv(dev);
int txq = skb->queue_mapping; int txq = skb->queue_mapping;
struct netdev_queue *queue;
struct tun_file *tfile; struct tun_file *tfile;
int len = skb->len; int len = skb->len;
...@@ -1123,6 +1124,10 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -1123,6 +1124,10 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
if (ptr_ring_produce(&tfile->tx_ring, skb)) if (ptr_ring_produce(&tfile->tx_ring, skb))
goto drop; 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 */ /* Notify and wake up reader process */
if (tfile->flags & TUN_FASYNC) if (tfile->flags & TUN_FASYNC)
kill_fasync(&tfile->fasync, SIGIO, POLL_IN); kill_fasync(&tfile->fasync, SIGIO, POLL_IN);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册