From: Eric Dumazet <eric.dumazet@gmail.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: David Miller <davem@davemloft.net>,
vfalico@redhat.com, netdev@vger.kernel.org,
stephen@networkplumber.org
Subject: Re: [PATCH net-next] bridge: remove a redundant synchronize_net()
Date: Thu, 04 Apr 2013 09:03:45 -0700 [thread overview]
Message-ID: <1365091425.3308.7.camel@edumazet-glaptop> (raw)
In-Reply-To: <1365090287.3308.3.camel@edumazet-glaptop>
On Thu, 2013-04-04 at 08:44 -0700, Eric Dumazet wrote:
> Because maybe the synchronize_net() in netdev_rx_handler_unregister()
> is enough and you dont even need the call_rcu(). Thats was my question.
So we have the following sequence in team_port_del()
netdev_rx_handler_unregister(port_dev);
netdev_upper_dev_unlink(port_dev, dev);
team_port_disable_netpoll(port);
vlan_vids_del_by_dev(port_dev, dev);
dev_uc_unsync(port_dev, dev);
dev_mc_unsync(port_dev, dev);
dev_close(port_dev);
team_port_leave(team, port);
__team_option_inst_mark_removed_port(team, port);
__team_options_change_check(team);
__team_option_inst_del_port(team, port);
__team_port_change_port_removed(port);
team_port_set_orig_dev_addr(port);
dev_set_mtu(port_dev, port->orig.mtu);
synchronize_rcu();
kfree(port);
And I suspect we can remove synchronize_rcu() call.
But as this is a long list of operations, maybe some of them requires
the rcu grace period before kfree(port)
next prev parent reply other threads:[~2013-04-04 16:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-02 15:45 [PATCH net-next] bridge: remove a redundant synchronize_net() Eric Dumazet
2013-04-02 15:58 ` Veaceslav Falico
2013-04-02 16:12 ` David Miller
2013-04-02 16:27 ` Eric Dumazet
2013-04-02 18:19 ` David Miller
2013-04-04 15:35 ` Jiri Pirko
2013-04-04 15:44 ` Eric Dumazet
2013-04-04 16:03 ` Eric Dumazet [this message]
2013-04-04 16:08 ` Jiri Pirko
2013-04-04 16:07 ` Jiri Pirko
2013-04-04 16:18 ` Eric Dumazet
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=1365091425.3308.7.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=vfalico@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox