kernel_optimize_test/net/core
Roopa Prabhu 8d356b89f3 rtnetlink: add rtnl_link_state check in rtnl_configure_link
rtnl_configure_link sets dev->rtnl_link_state to
RTNL_LINK_INITIALIZED and unconditionally calls
__dev_notify_flags to notify user-space of dev flags.

current call sequence for rtnl_configure_link
rtnetlink_newlink
    rtnl_link_ops->newlink
    rtnl_configure_link (unconditionally notifies userspace of
                         default and new dev flags)

If a newlink handler wants to call rtnl_configure_link
early, we will end up with duplicate notifications to
user-space.

This patch fixes rtnl_configure_link to check rtnl_link_state
and call __dev_notify_flags with gchanges = 0 if already
RTNL_LINK_INITIALIZED.

Later in the series, this patch will help the following sequence
where a driver implementing newlink can call rtnl_configure_link
to initialize the link early.

makes the following call sequence work:
rtnetlink_newlink
    rtnl_link_ops->newlink (vxlan) -> rtnl_configure_link (initializes
                                                link and notifies
                                                user-space of default
                                                dev flags)
    rtnl_configure_link (updates dev flags if requested by user ifm
                         and notifies user-space of new dev flags)

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-07-07 20:20:46 +09:00
..
datagram.c Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL 2018-06-28 10:40:47 -07:00
dev_addr_lists.c
dev_ioctl.c net: use dev_change_tx_queue_len() for SIOCSIFTXQLEN 2018-06-30 21:26:52 +09:00
dev.c net: limit each hash list length to MAX_GRO_SKBS 2018-07-05 19:20:16 +09:00
devlink.c devlink: Add enable_sriov boolean generic parameter 2018-07-05 19:58:35 +09:00
drop_monitor.c
dst_cache.c
dst.c
ethtool.c treewide: Use array_size() in vzalloc() 2018-06-12 16:19:22 -07:00
failover.c
fib_notifier.c
fib_rules.c net: fib_rules: bring back rule_exists to match rule during add 2018-06-30 22:11:13 +09:00
filter.c net: core: filter: mark expected switch fall-through 2018-07-05 20:26:50 +09:00
flow_dissector.c ipv6: omit traffic class when calculating flow hash 2018-06-04 13:21:18 -04:00
gen_estimator.c
gen_stats.c
gro_cells.c
hwbm.c
link_watch.c
lwt_bpf.c
lwtunnel.c
Makefile
neighbour.c neighbour: force neigh_invalidate when NUD_FAILED update is from admin 2018-06-27 15:40:45 +09:00
net_namespace.c
net-procfs.c
net-sysfs.c net-sysfs: Add interface for Rx queue(s) map per Tx queue 2018-07-02 09:06:24 +09:00
net-sysfs.h
net-traces.c
netclassid_cgroup.c
netevent.c
netpoll.c
netprio_cgroup.c
page_pool.c
pktgen.c treewide: Use array_size() in vzalloc_node() 2018-06-12 16:19:22 -07:00
ptp_classifier.c
request_sock.c
rtnetlink.c rtnetlink: add rtnl_link_state check in rtnl_configure_link 2018-07-07 20:20:46 +09:00
scm.c
secure_seq.c
skbuff.c net: Clear skb->tstamp only on the forwarding path 2018-07-04 22:30:27 +09:00
sock_diag.c
sock_reuseport.c
sock.c net/sched: Make etf report drops on error_queue 2018-07-04 22:30:28 +09:00
stream.c
sysctl_net_core.c
timestamping.c
tso.c
utils.c
xdp.c rhashtable: remove nulls_base and related code. 2018-06-22 13:43:27 +09:00