From: Cong Wang <xiyou.wangcong@gmail.com>
To: Taehee Yoo <ap420073@gmail.com>
Cc: David Miller <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Linux Kernel Network Developers <netdev@vger.kernel.org>,
jwi@linux.ibm.com, kgraul@linux.ibm.com, hca@linux.ibm.com,
gor@linux.ibm.com, borntraeger@de.ibm.com,
Marek Lindner <mareklindner@neomailbox.ch>,
sw@simonwunderlich.de, a@unstable.cc, sven@narfation.org,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
dsahern@kernel.org
Subject: Re: [PATCH net-next v2 1/7] mld: convert from timer to delayed work
Date: Sat, 13 Feb 2021 11:07:04 -0800 [thread overview]
Message-ID: <CAM_iQpXLMk+4VuHr8WyLE1fxNV5hsN7JvA2PoDOmnZ4beJOH7Q@mail.gmail.com> (raw)
In-Reply-To: <20210213175102.28227-1-ap420073@gmail.com>
On Sat, Feb 13, 2021 at 9:51 AM Taehee Yoo <ap420073@gmail.com> wrote:
> -static void mld_dad_start_timer(struct inet6_dev *idev, unsigned long delay)
> +static void mld_dad_start_work(struct inet6_dev *idev, unsigned long delay)
> {
> unsigned long tv = prandom_u32() % delay;
>
> - if (!mod_timer(&idev->mc_dad_timer, jiffies+tv+2))
> + if (!mod_delayed_work(mld_wq, &idev->mc_dad_work, msecs_to_jiffies(tv + 2)))
IIUC, before this patch 'delay' is in jiffies, after this patch it is in msecs?
[...]
> -static void mld_dad_timer_expire(struct timer_list *t)
> +static void mld_dad_work(struct work_struct *work)
> {
> - struct inet6_dev *idev = from_timer(idev, t, mc_dad_timer);
> + struct inet6_dev *idev = container_of(to_delayed_work(work),
> + struct inet6_dev,
> + mc_dad_work);
>
> + rtnl_lock();
Any reason why we need RTNL after converting the timer to
delayed work?
Thanks.
next prev parent reply other threads:[~2021-02-13 19:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-13 17:51 [PATCH net-next v2 1/7] mld: convert from timer to delayed work Taehee Yoo
2021-02-13 19:07 ` Cong Wang [this message]
2021-02-14 10:56 ` Taehee Yoo
2021-02-15 18:04 ` Cong Wang
2021-02-16 14:46 ` Taehee Yoo
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=CAM_iQpXLMk+4VuHr8WyLE1fxNV5hsN7JvA2PoDOmnZ4beJOH7Q@mail.gmail.com \
--to=xiyou.wangcong@gmail.com \
--cc=a@unstable.cc \
--cc=ap420073@gmail.com \
--cc=borntraeger@de.ibm.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=jwi@linux.ibm.com \
--cc=kgraul@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=mareklindner@neomailbox.ch \
--cc=netdev@vger.kernel.org \
--cc=sven@narfation.org \
--cc=sw@simonwunderlich.de \
--cc=yoshfuji@linux-ipv6.org \
/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.