Skip to content

Commit

Permalink
net_sched: use macvlan real dev trans_start in dev_trans_start()
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Chris Dion authored and davem330 committed Dec 6, 2017
1 parent cc10f87 commit 32d3e51
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/sched/sch_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <linux/list.h>
#include <linux/slab.h>
#include <linux/if_vlan.h>
#include <linux/if_macvlan.h>
#include <net/sch_generic.h>
#include <net/pkt_sched.h>
#include <net/dst.h>
Expand Down Expand Up @@ -277,6 +278,8 @@ unsigned long dev_trans_start(struct net_device *dev)

if (is_vlan_dev(dev))
dev = vlan_dev_real_dev(dev);
else if (netif_is_macvlan(dev))
dev = macvlan_dev_real_dev(dev);
res = netdev_get_tx_queue(dev, 0)->trans_start;
for (i = 1; i < dev->num_tx_queues; i++) {
val = netdev_get_tx_queue(dev, i)->trans_start;
Expand Down

0 comments on commit 32d3e51

Please sign in to comment.