<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/rtnetlink.h, branch v4.0</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.0</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.0'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2014-12-09T18:36:57Z</updated>
<entry>
<title>rtnetlink: delay RTM_DELLINK notification until after ndo_uninit()</title>
<updated>2014-12-09T18:36:57Z</updated>
<author>
<name>Mahesh Bandewar</name>
<email>maheshb@google.com</email>
</author>
<published>2014-12-03T21:46:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=395eea6ccf2b253f81b4718ffbcae67d36fe2e69'/>
<id>urn:sha1:395eea6ccf2b253f81b4718ffbcae67d36fe2e69</id>
<content type='text'>
The commit 56bfa7ee7c ("unregister_netdevice : move RTM_DELLINK to
until after ndo_uninit") tried to do this ealier but while doing so
it created a problem. Unfortunately the delayed rtmsg_ifinfo() also
delayed call to fill_info(). So this translated into asking driver
to remove private state and then query it's private state. This
could have catastropic consequences.

This change breaks the rtmsg_ifinfo() into two parts - one takes the
precise snapshot of the device by called fill_info() before calling
the ndo_uninit() and the second part sends the notification using
collected snapshot.

It was brought to notice when last link is deleted from an ipvlan device
when it has free-ed the port and the subsequent .fill_info() call is
trying to get the info from the port.

kernel: [  255.139429] ------------[ cut here ]------------
kernel: [  255.139439] WARNING: CPU: 12 PID: 11173 at net/core/rtnetlink.c:2238 rtmsg_ifinfo+0x100/0x110()
kernel: [  255.139493] Modules linked in: ipvlan bonding w1_therm ds2482 wire cdc_acm ehci_pci ehci_hcd i2c_dev i2c_i801 i2c_core msr cpuid bnx2x ptp pps_core mdio libcrc32c
kernel: [  255.139513] CPU: 12 PID: 11173 Comm: ip Not tainted 3.18.0-smp-DEV #167
kernel: [  255.139514] Hardware name: Intel RML,PCH/Ibis_QC_18, BIOS 1.0.10 05/15/2012
kernel: [  255.139515]  0000000000000009 ffff880851b6b828 ffffffff815d87f4 00000000000000e0
kernel: [  255.139516]  0000000000000000 ffff880851b6b868 ffffffff8109c29c 0000000000000000
kernel: [  255.139518]  00000000ffffffa6 00000000000000d0 ffffffff81aaf580 0000000000000011
kernel: [  255.139520] Call Trace:
kernel: [  255.139527]  [&lt;ffffffff815d87f4&gt;] dump_stack+0x46/0x58
kernel: [  255.139531]  [&lt;ffffffff8109c29c&gt;] warn_slowpath_common+0x8c/0xc0
kernel: [  255.139540]  [&lt;ffffffff8109c2ea&gt;] warn_slowpath_null+0x1a/0x20
kernel: [  255.139544]  [&lt;ffffffff8150d570&gt;] rtmsg_ifinfo+0x100/0x110
kernel: [  255.139547]  [&lt;ffffffff814f78b5&gt;] rollback_registered_many+0x1d5/0x2d0
kernel: [  255.139549]  [&lt;ffffffff814f79cf&gt;] unregister_netdevice_many+0x1f/0xb0
kernel: [  255.139551]  [&lt;ffffffff8150acab&gt;] rtnl_dellink+0xbb/0x110
kernel: [  255.139553]  [&lt;ffffffff8150da90&gt;] rtnetlink_rcv_msg+0xa0/0x240
kernel: [  255.139557]  [&lt;ffffffff81329283&gt;] ? rhashtable_lookup_compare+0x43/0x80
kernel: [  255.139558]  [&lt;ffffffff8150d9f0&gt;] ? __rtnl_unlock+0x20/0x20
kernel: [  255.139562]  [&lt;ffffffff8152cb11&gt;] netlink_rcv_skb+0xb1/0xc0
kernel: [  255.139563]  [&lt;ffffffff8150a495&gt;] rtnetlink_rcv+0x25/0x40
kernel: [  255.139565]  [&lt;ffffffff8152c398&gt;] netlink_unicast+0x178/0x230
kernel: [  255.139567]  [&lt;ffffffff8152c75f&gt;] netlink_sendmsg+0x30f/0x420
kernel: [  255.139571]  [&lt;ffffffff814e0b0c&gt;] sock_sendmsg+0x9c/0xd0
kernel: [  255.139575]  [&lt;ffffffff811d1d7f&gt;] ? rw_copy_check_uvector+0x6f/0x130
kernel: [  255.139577]  [&lt;ffffffff814e11c9&gt;] ? copy_msghdr_from_user+0x139/0x1b0
kernel: [  255.139578]  [&lt;ffffffff814e1774&gt;] ___sys_sendmsg+0x304/0x310
kernel: [  255.139581]  [&lt;ffffffff81198723&gt;] ? handle_mm_fault+0xca3/0xde0
kernel: [  255.139585]  [&lt;ffffffff811ebc4c&gt;] ? destroy_inode+0x3c/0x70
kernel: [  255.139589]  [&lt;ffffffff8108e6ec&gt;] ? __do_page_fault+0x20c/0x500
kernel: [  255.139597]  [&lt;ffffffff811e8336&gt;] ? dput+0xb6/0x190
kernel: [  255.139606]  [&lt;ffffffff811f05f6&gt;] ? mntput+0x26/0x40
kernel: [  255.139611]  [&lt;ffffffff811d2b94&gt;] ? __fput+0x174/0x1e0
kernel: [  255.139613]  [&lt;ffffffff814e2129&gt;] __sys_sendmsg+0x49/0x90
kernel: [  255.139615]  [&lt;ffffffff814e2182&gt;] SyS_sendmsg+0x12/0x20
kernel: [  255.139617]  [&lt;ffffffff815df092&gt;] system_call_fastpath+0x12/0x17
kernel: [  255.139619] ---[ end trace 5e6703e87d984f6b ]---

Signed-off-by: Mahesh Bandewar &lt;maheshb@google.com&gt;
Reported-by: Toshiaki Makita &lt;makita.toshiaki@lab.ntt.co.jp&gt;
Cc: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Roopa Prabhu &lt;roopa@cumulusnetworks.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.com&gt;
Acked-by: Thomas Graf &lt;tgraf@suug.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bridge: add brport flags to dflt bridge_getlink</title>
<updated>2014-12-03T04:01:24Z</updated>
<author>
<name>Scott Feldman</name>
<email>sfeldma@gmail.com</email>
</author>
<published>2014-11-28T13:34:25Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2c3c031c8f8930861815fa1685d7c5e8ccec047c'/>
<id>urn:sha1:2c3c031c8f8930861815fa1685d7c5e8ccec047c</id>
<content type='text'>
To allow brport device to return current brport flags set on port.  Add
returned flags to nested IFLA_PROTINFO netlink msg built in dflt getlink.
With this change, netlink msg returned for bridge_getlink contains the port's
offloaded flag settings (the port's SELF settings).

Signed-off-by: Scott Feldman &lt;sfeldma@gmail.com&gt;
Signed-off-by: Jiri Pirko &lt;jiri@resnulli.us&gt;
Acked-by: Andy Gospodarek &lt;gospo@cumulusnetworks.com&gt;
Acked-by: Thomas Graf &lt;tgraf@suug.ch&gt;
Acked-by: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: make vid as a parameter for ndo_fdb_add/ndo_fdb_del</title>
<updated>2014-12-03T04:01:18Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@resnulli.us</email>
</author>
<published>2014-11-28T13:34:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f6f6424ba773da6221ecaaa70973eb4dacfa03b2'/>
<id>urn:sha1:f6f6424ba773da6221ecaaa70973eb4dacfa03b2</id>
<content type='text'>
Do the work of parsing NDA_VLAN directly in rtnetlink code, pass simple
u16 vid to drivers from there.

Signed-off-by: Jiri Pirko &lt;jiri@resnulli.us&gt;
Acked-by: Andy Gospodarek &lt;gospo@cumulusnetworks.com&gt;
Acked-by: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Acked-by: John Fastabend &lt;john.r.fastabend@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: sched: RCU cls_tcindex</title>
<updated>2014-09-13T16:30:26Z</updated>
<author>
<name>John Fastabend</name>
<email>john.fastabend@gmail.com</email>
</author>
<published>2014-09-13T03:08:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=331b72922c5f58d48fd5500acadc91777cc31970'/>
<id>urn:sha1:331b72922c5f58d48fd5500acadc91777cc31970</id>
<content type='text'>
Make cls_tcindex RCU safe.

This patch addds a new RCU routine rcu_dereference_bh_rtnl() to check
caller either holds the rcu read lock or RTNL. This is needed to
handle the case where tcindex_lookup() is being called in both cases.

Signed-off-by: John Fastabend &lt;john.r.fastabend@intel.com&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bridge: fdb dumping takes a filter device</title>
<updated>2014-07-10T19:37:33Z</updated>
<author>
<name>Jamal Hadi Salim</name>
<email>jhs@mojatatu.com</email>
</author>
<published>2014-07-10T11:01:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5d5eacb34c9e1fdc0a47b885d832eaa4de860dc7'/>
<id>urn:sha1:5d5eacb34c9e1fdc0a47b885d832eaa4de860dc7</id>
<content type='text'>
Dumping a bridge fdb dumps every fdb entry
held. With this change we are going to filter
on selected bridge port.

Signed-off-by: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>rtnetlink: wait for unregistering devices in rtnl_link_unregister()</title>
<updated>2014-05-15T19:30:33Z</updated>
<author>
<name>Cong Wang</name>
<email>cwang@twopensource.com</email>
</author>
<published>2014-05-12T22:11:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=200b916f3575bdf11609cb447661b8d5957b0bbf'/>
<id>urn:sha1:200b916f3575bdf11609cb447661b8d5957b0bbf</id>
<content type='text'>
From: Cong Wang &lt;cwang@twopensource.com&gt;

commit 50624c934db18ab90 (net: Delay default_device_exit_batch until no
devices are unregistering) introduced rtnl_lock_unregistering() for
default_device_exit_batch(). Same race could happen we when rmmod a driver
which calls rtnl_link_unregister() as we call dev-&gt;destructor without rtnl
lock.

For long term, I think we should clean up the mess of netdev_run_todo()
and net namespce exit code.

Cc: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Signed-off-by: Cong Wang &lt;cwang@twopensource.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: allow netdev_all_upper_get_next_dev_rcu with rtnl lock held</title>
<updated>2013-12-18T05:19:08Z</updated>
<author>
<name>John Fastabend</name>
<email>john.r.fastabend@intel.com</email>
</author>
<published>2013-11-26T06:33:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=85328240c625f322af9f69c7b60e619717101d77'/>
<id>urn:sha1:85328240c625f322af9f69c7b60e619717101d77</id>
<content type='text'>
It is useful to be able to walk all upper devices when bringing
a device online where the RTNL lock is held. In this case it
is safe to walk the all_adj_list because the RTNL lock is used
to protect the write side as well.

This patch adds a check to see if the rtnl lock is held before
throwing a warning in netdev_all_upper_get_next_dev_rcu().

Also because we now have a call site for lockdep_rtnl_is_held()
outside COFIG_LOCK_PROVING an inline definition returning 1 is
needed. Similar to the rcu_read_lock_is_held().

Fixes: 2a47fa45d4df ("ixgbe: enable l2 forwarding acceleration for macvlans")
CC: Veaceslav Falico &lt;vfalico@redhat.com&gt;
Reported-by: Yuanhan Liu &lt;yuanhan.liu@linux.intel.com&gt;
Signed-off-by: John Fastabend &lt;john.r.fastabend@intel.com&gt;
Tested-by: Phil Schmitt &lt;phillip.j.schmitt@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
</entry>
<entry>
<title>net: fix rtnl notification in atomic context</title>
<updated>2013-10-25T23:03:45Z</updated>
<author>
<name>Alexei Starovoitov</name>
<email>ast@plumgrid.com</email>
</author>
<published>2013-10-23T23:02:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7f29405403d7c17f539c099987972b862e7e5255'/>
<id>urn:sha1:7f29405403d7c17f539c099987972b862e7e5255</id>
<content type='text'>
commit 991fb3f74c "dev: always advertise rx_flags changes via netlink"
introduced rtnl notification from __dev_set_promiscuity(),
which can be called in atomic context.

Steps to reproduce:
ip tuntap add dev tap1 mode tap
ifconfig tap1 up
tcpdump -nei tap1 &amp;
ip tuntap del dev tap1 mode tap

[  271.627994] device tap1 left promiscuous mode
[  271.639897] BUG: sleeping function called from invalid context at mm/slub.c:940
[  271.664491] in_atomic(): 1, irqs_disabled(): 0, pid: 3394, name: ip
[  271.677525] INFO: lockdep is turned off.
[  271.690503] CPU: 0 PID: 3394 Comm: ip Tainted: G        W    3.12.0-rc3+ #73
[  271.703996] Hardware name: System manufacturer System Product Name/P8Z77 WS, BIOS 3007 07/26/2012
[  271.731254]  ffffffff81a58506 ffff8807f0d57a58 ffffffff817544e5 ffff88082fa0f428
[  271.760261]  ffff8808071f5f40 ffff8807f0d57a88 ffffffff8108bad1 ffffffff81110ff8
[  271.790683]  0000000000000010 00000000000000d0 00000000000000d0 ffff8807f0d57af8
[  271.822332] Call Trace:
[  271.838234]  [&lt;ffffffff817544e5&gt;] dump_stack+0x55/0x76
[  271.854446]  [&lt;ffffffff8108bad1&gt;] __might_sleep+0x181/0x240
[  271.870836]  [&lt;ffffffff81110ff8&gt;] ? rcu_irq_exit+0x68/0xb0
[  271.887076]  [&lt;ffffffff811a80be&gt;] kmem_cache_alloc_node+0x4e/0x2a0
[  271.903368]  [&lt;ffffffff810b4ddc&gt;] ? vprintk_emit+0x1dc/0x5a0
[  271.919716]  [&lt;ffffffff81614d67&gt;] ? __alloc_skb+0x57/0x2a0
[  271.936088]  [&lt;ffffffff810b4de0&gt;] ? vprintk_emit+0x1e0/0x5a0
[  271.952504]  [&lt;ffffffff81614d67&gt;] __alloc_skb+0x57/0x2a0
[  271.968902]  [&lt;ffffffff8163a0b2&gt;] rtmsg_ifinfo+0x52/0x100
[  271.985302]  [&lt;ffffffff8162ac6d&gt;] __dev_notify_flags+0xad/0xc0
[  272.001642]  [&lt;ffffffff8162ad0c&gt;] __dev_set_promiscuity+0x8c/0x1c0
[  272.017917]  [&lt;ffffffff81731ea5&gt;] ? packet_notifier+0x5/0x380
[  272.033961]  [&lt;ffffffff8162b109&gt;] dev_set_promiscuity+0x29/0x50
[  272.049855]  [&lt;ffffffff8172e937&gt;] packet_dev_mc+0x87/0xc0
[  272.065494]  [&lt;ffffffff81732052&gt;] packet_notifier+0x1b2/0x380
[  272.080915]  [&lt;ffffffff81731ea5&gt;] ? packet_notifier+0x5/0x380
[  272.096009]  [&lt;ffffffff81761c66&gt;] notifier_call_chain+0x66/0x150
[  272.110803]  [&lt;ffffffff8108503e&gt;] __raw_notifier_call_chain+0xe/0x10
[  272.125468]  [&lt;ffffffff81085056&gt;] raw_notifier_call_chain+0x16/0x20
[  272.139984]  [&lt;ffffffff81620190&gt;] call_netdevice_notifiers_info+0x40/0x70
[  272.154523]  [&lt;ffffffff816201d6&gt;] call_netdevice_notifiers+0x16/0x20
[  272.168552]  [&lt;ffffffff816224c5&gt;] rollback_registered_many+0x145/0x240
[  272.182263]  [&lt;ffffffff81622641&gt;] rollback_registered+0x31/0x40
[  272.195369]  [&lt;ffffffff816229c8&gt;] unregister_netdevice_queue+0x58/0x90
[  272.208230]  [&lt;ffffffff81547ca0&gt;] __tun_detach+0x140/0x340
[  272.220686]  [&lt;ffffffff81547ed6&gt;] tun_chr_close+0x36/0x60

Signed-off-by: Alexei Starovoitov &lt;ast@plumgrid.com&gt;
Acked-by: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: generic fdb support for drivers without ndo_fdb_&lt;op&gt;</title>
<updated>2013-03-07T20:29:45Z</updated>
<author>
<name>Vlad Yasevich</name>
<email>vyasevic@redhat.com</email>
</author>
<published>2013-03-06T15:39:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=090096bf3db1c281ddd034573260045888a68fea'/>
<id>urn:sha1:090096bf3db1c281ddd034573260045888a68fea</id>
<content type='text'>
If the driver does not support the ndo_op use the generic
handler for it. This should work in the majority of cases.
Eventually the fdb_dflt_add call gets translated into a
__dev_set_rx_mode() call which should handle hardware
support for filtering via the IFF_UNICAST_FLT flag.

Namely IFF_UNICAST_FLT indicates if the hardware can do
unicast address filtering. If no support is available
the device is put into promisc mode.

Signed-off-by: Vlad Yasevich &lt;vyasevic@redhat.com&gt;
Signed-off-by: John Fastabend &lt;john.r.fastabend@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ixgbe: add setlink, getlink support to ixgbe and ixgbevf</title>
<updated>2012-10-31T17:18:29Z</updated>
<author>
<name>John Fastabend</name>
<email>john.r.fastabend@intel.com</email>
</author>
<published>2012-10-24T08:13:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=815cccbf10b27115fb3e5827bef26768616e5e27'/>
<id>urn:sha1:815cccbf10b27115fb3e5827bef26768616e5e27</id>
<content type='text'>
This adds support for the net device ops to manage the embedded
hardware bridge on ixgbe devices. With this patch the bridge
mode can be toggled between VEB and VEPA to support stacking
macvlan devices or using the embedded switch without any SW
component in 802.1Qbg/br environments.

Additionally, this adds source address pruning to the ixgbevf
driver to prune any frames sent back from a reflective relay on
the switch. This is required because the existing hardware does
not support this. Without it frames get pushed into the stack
with its own src mac which is invalid per 802.1Qbg VEPA
definition.

Signed-off-by: John Fastabend &lt;john.r.fastabend@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
