All of lore.kernel.org
 help / color / mirror / Atom feed
From: Veaceslav Falico <vfalico@redhat.com>
To: Nikolay Aleksandrov <nikolay@redhat.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, fubar@us.ibm.com,
	jhs@mojatatu.com
Subject: Re: [PATCH net v2 2/2] net_sched: make dev_trans_start return vlan's real dev trans_start
Date: Sat, 3 Aug 2013 22:12:38 +0200	[thread overview]
Message-ID: <20130803201238.GD12638@redhat.com> (raw)
In-Reply-To: <1375560467-1604-2-git-send-email-nikolay@redhat.com>

On Sat, Aug 03, 2013 at 10:07:47PM +0200, Nikolay Aleksandrov wrote:
>From: Nikolay Aleksandrov <Nikolay Aleksandrov nikolay@redhat.com>
>
>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: David Miller <davem@davemloft.net>
>Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>

Acked-by: Veaceslav Falico <vfalico@redhat.com>

>---
>v2: drop the while, since vlan_dev_real_dev now does it for us
>
> net/sched/sch_generic.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
>diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
>index 4626cef..eeb8276 100644
>--- a/net/sched/sch_generic.c
>+++ b/net/sched/sch_generic.c
>@@ -25,6 +25,7 @@
> #include <linux/rcupdate.h>
> #include <linux/list.h>
> #include <linux/slab.h>
>+#include <linux/if_vlan.h>
> #include <net/sch_generic.h>
> #include <net/pkt_sched.h>
> #include <net/dst.h>
>@@ -207,15 +208,19 @@ void __qdisc_run(struct Qdisc *q)
>
> unsigned long dev_trans_start(struct net_device *dev)
> {
>-	unsigned long val, res = dev->trans_start;
>+	unsigned long val, res;
> 	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++) {
> 		val = netdev_get_tx_queue(dev, i)->trans_start;
> 		if (val && time_after(val, res))
> 			res = val;
> 	}
> 	dev->trans_start = res;
>+
> 	return res;
> }
> EXPORT_SYMBOL(dev_trans_start);
>-- 
>1.8.1.4
>

  reply	other threads:[~2013-08-03 20:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-03 20:07 [PATCH net 1/2] vlan: make vlan_dev_real_dev work over stacked vlans Nikolay Aleksandrov
2013-08-03 20:07 ` [PATCH net v2 2/2] net_sched: make dev_trans_start return vlan's real dev trans_start Nikolay Aleksandrov
2013-08-03 20:12   ` Veaceslav Falico [this message]
2013-08-05 19:18   ` David Miller
2013-08-03 20:11 ` [PATCH net 1/2] vlan: make vlan_dev_real_dev work over stacked vlans Veaceslav Falico
2013-08-04  2:17 ` Nikolay Aleksandrov
2013-08-05  6:58   ` Veaceslav Falico
2013-08-05  8:12     ` Nikolay Aleksandrov
2013-08-05 19:18 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130803201238.GD12638@redhat.com \
    --to=vfalico@redhat.com \
    --cc=davem@davemloft.net \
    --cc=fubar@us.ibm.com \
    --cc=jhs@mojatatu.com \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.