Skip to content

Commit 32d3e51

Browse files
Chris Diondavem330
authored andcommitted
net_sched: use macvlan real dev trans_start in dev_trans_start()
Macvlan devices are similar to vlans and do not update their own trans_start. In order for arp monitoring to work for a bond device when the slaves are macvlans, obtain its real device. Signed-off-by: Chris Dion <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent cc10f87 commit 32d3e51

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/sched/sch_generic.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <linux/list.h>
2727
#include <linux/slab.h>
2828
#include <linux/if_vlan.h>
29+
#include <linux/if_macvlan.h>
2930
#include <net/sch_generic.h>
3031
#include <net/pkt_sched.h>
3132
#include <net/dst.h>
@@ -277,6 +278,8 @@ unsigned long dev_trans_start(struct net_device *dev)
277278

278279
if (is_vlan_dev(dev))
279280
dev = vlan_dev_real_dev(dev);
281+
else if (netif_is_macvlan(dev))
282+
dev = macvlan_dev_real_dev(dev);
280283
res = netdev_get_tx_queue(dev, 0)->trans_start;
281284
for (i = 1; i < dev->num_tx_queues; i++) {
282285
val = netdev_get_tx_queue(dev, i)->trans_start;

0 commit comments

Comments
 (0)