Thread (12 messages) flat view 12 messages, 3 authors, 2016-02-07

Re: [PATCH v2 net-next 2/4] net: dev: add batching to net_device notifiers

From: Julian Anastasov <ja@ssi.bg>
Date: 2016-02-07 10:09:59

	Hello,

On Sat, 6 Feb 2016, Salam Noureddine wrote:
On Sat, Feb 6, 2016 at 10:58 AM, Julian Anastasov [off-list ref] wrote:
quoted
quoted
+     /* call batch notifiers which act on net namespaces */
+     list_for_each_entry(dev, head, unreg_list) {
+             net_add_event_list(&net_head, dev_net(dev));
        Looks like we can move the above net_add_event_list with
the comment into the previous loop after NETDEV_UNREGISTER,
we will save some cycles.
I didn't move it into the previous loop because the NETDEV_UNREGISTER
notifier can
end up calling rollback_registered_many (for example the vlan driver
unregistering
all vlans on top of a device) in which case we would be using the
event_list in the net
namespace.
	ok. May be another safe option is to call it just before
NETDEV_UNREGISTER, so that if rollback_registered_many is called
recursively we will have single NETDEV_UNREGISTER_BATCH call.
Same should work for NETDEV_DOWN_BATCH in dev_close_many. But
these are small optimizations, so it is up to you to decide.

Regards
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help