Commit 07ce76aa authored by nikolay@redhat.com's avatar nikolay@redhat.com Committed by David S. Miller

net_sched: make dev_trans_start return vlan's real dev trans_start

Vlan devices are LLTX and don't update their own trans_start, so if
dev_trans_start has to be called with a vlan device then 0 or a stale
value will be returned. Currently the bonding is the only such user, and
it's needed for proper arp monitoring when the slaves are vlans.
Fix this by extracting the vlan's real device trans_start.
Suggested-by: default avatarDavid Miller <davem@davemloft.net>
Signed-off-by: default avatarNikolay Aleksandrov <nikolay@redhat.com>
Acked-by: default avatarVeaceslav Falico <vfalico@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0369722f
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <linux/rcupdate.h> #include <linux/rcupdate.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/if_vlan.h>
#include <net/sch_generic.h> #include <net/sch_generic.h>
#include <net/pkt_sched.h> #include <net/pkt_sched.h>
#include <net/dst.h> #include <net/dst.h>
...@@ -207,15 +208,19 @@ void __qdisc_run(struct Qdisc *q) ...@@ -207,15 +208,19 @@ void __qdisc_run(struct Qdisc *q)
unsigned long dev_trans_start(struct net_device *dev) unsigned long dev_trans_start(struct net_device *dev)
{ {
unsigned long val, res = dev->trans_start; unsigned long val, res;
unsigned int i; unsigned int i;
if (is_vlan_dev(dev))
dev = vlan_dev_real_dev(dev);
res = dev->trans_start;
for (i = 0; i < dev->num_tx_queues; i++) { for (i = 0; i < dev->num_tx_queues; i++) {
val = netdev_get_tx_queue(dev, i)->trans_start; val = netdev_get_tx_queue(dev, i)->trans_start;
if (val && time_after(val, res)) if (val && time_after(val, res))
res = val; res = val;
} }
dev->trans_start = res; dev->trans_start = res;
return res; return res;
} }
EXPORT_SYMBOL(dev_trans_start); EXPORT_SYMBOL(dev_trans_start);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment