From: Stephen Hemminger <stephen@networkplumber.org>
To: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Cc: netdev@vger.kernel.org, bridge@lists.linux-foundation.org,
davem@davemloft.net
Subject: Re: [PATCH net] bridge: stp: when using userspace stp stop kernel hello and hold timers
Date: Thu, 23 Jul 2015 10:13:11 -0700 [thread overview]
Message-ID: <20150723101311.5e15b970@urahara> (raw)
In-Reply-To: <55B11EF4.8050501@cumulusnetworks.com>
On Thu, 23 Jul 2015 19:05:56 +0200
Nikolay Aleksandrov <nikolay@cumulusnetworks.com> wrote:
> On 07/23/2015 06:59 PM, Stephen Hemminger wrote:
> > On Thu, 23 Jul 2015 09:07:37 -0700
> > Nikolay Aleksandrov <nikolay@cumulusnetworks.com> wrote:
> >
> >> + /* Stop hello and hold timer */
> >> + spin_lock_bh(&br->lock);
> >> + del_timer(&br->hello_timer);
> >> + list_for_each_entry(p, &br->port_list, list)
> >> + del_timer(&p->hold_timer);
> >> + spin_unlock_bh(&br->lock);
> >
> > Wouldn't it be easier to use del_timer_sync here?
> >
> I think it should work. Also I have an error in the commit message
> about the kernel BPDU sending which I need to correct. I'll prepare
> a v2 with your suggestion and fixed commit message.
The one thing to watch out for with del_timer_sync is that
the timer routine and the caller can't be using the same lock
otherwise timer will be spinning waiting to get lock that
is held by caller who is waiting for timer.
next prev parent reply other threads:[~2015-07-23 17:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-23 16:07 [PATCH net] bridge: stp: when using userspace stp stop kernel hello and hold timers Nikolay Aleksandrov
2015-07-23 16:59 ` Stephen Hemminger
2015-07-23 17:05 ` Nikolay Aleksandrov
2015-07-23 17:13 ` Stephen Hemminger [this message]
2015-07-23 17:31 ` Nikolay Aleksandrov
2015-07-23 18:01 ` [PATCH net v2] " Nikolay Aleksandrov
2015-07-29 6:33 ` 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=20150723101311.5e15b970@urahara \
--to=stephen@networkplumber.org \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=nikolay@cumulusnetworks.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).