* [PATCH] net_sched: use macvlan real dev trans_start in dev_trans_start()
@ 2017-12-06 15:50 Chris Dion
2017-12-06 20:34 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Chris Dion @ 2017-12-06 15:50 UTC (permalink / raw)
Cc: Chris Dion, Jamal Hadi Salim, Cong Wang, Jiri Pirko,
David S. Miller, netdev, linux-kernel
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 <christopher.dion@dell.com>
---
net/sched/sch_generic.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 3839cbb..cd1b200 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -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>
@@ -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;
--
1.9.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net_sched: use macvlan real dev trans_start in dev_trans_start()
2017-12-06 15:50 [PATCH] net_sched: use macvlan real dev trans_start in dev_trans_start() Chris Dion
@ 2017-12-06 20:34 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-12-06 20:34 UTC (permalink / raw)
To: christopher.dion; +Cc: jhs, xiyou.wangcong, jiri, netdev, linux-kernel
From: Chris Dion <christopher.dion@dell.com>
Date: Wed, 6 Dec 2017 10:50:28 -0500
> 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 <christopher.dion@dell.com>
Looks good, applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-06 20:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-06 15:50 [PATCH] net_sched: use macvlan real dev trans_start in dev_trans_start() Chris Dion
2017-12-06 20:34 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.