<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/rtnetlink.h, branch v3.17</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.17</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.17'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2014-07-10T19:37:33Z</updated>
<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>
<entry>
<title>UAPI: (Scripted) Disintegrate include/linux</title>
<updated>2012-10-13T09:46:48Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2012-10-13T09:46:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=607ca46e97a1b6594b29647d98a32d545c24bdff'/>
<id>urn:sha1:607ca46e97a1b6594b29647d98a32d545c24bdff</id>
<content type='text'>
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Michael Kerrisk &lt;mtk.manpages@gmail.com&gt;
Acked-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Acked-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
</entry>
<entry>
<title>rtnetlink: Remove ts/tsage args to rtnl_put_cacheinfo().</title>
<updated>2012-07-11T05:40:13Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-07-10T12:06:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=87a50699cb6d169591cc776fb82683a2c77cecac'/>
<id>urn:sha1:87a50699cb6d169591cc776fb82683a2c77cecac</id>
<content type='text'>
Nobody provides non-zero values any longer.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netlink: Get rid of obsolete rtnetlink macros</title>
<updated>2012-06-27T22:36:44Z</updated>
<author>
<name>Thomas Graf</name>
<email>tgraf@suug.ch</email>
</author>
<published>2012-06-26T23:36:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4c3af034fafeb7269176bf1310c9bcff0b9fd9bb'/>
<id>urn:sha1:4c3af034fafeb7269176bf1310c9bcff0b9fd9bb</id>
<content type='text'>
Removes all RTA_GET*() and RTA_PUT*() variations, as well as the
the unused rtattr_strcmp(). Get rid of rtm_get_table() by moving
it to its only user decnet.

Signed-off-by: Thomas Graf &lt;tgraf@suug.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: add generic PF_BRIDGE:RTM_ FDB hooks</title>
<updated>2012-04-15T17:06:04Z</updated>
<author>
<name>John Fastabend</name>
<email>john.r.fastabend@intel.com</email>
</author>
<published>2012-04-15T06:43:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=77162022ab26a1f99d3af30c03760a76f86e193d'/>
<id>urn:sha1:77162022ab26a1f99d3af30c03760a76f86e193d</id>
<content type='text'>
This adds two new flags NTF_MASTER and NTF_SELF that can
now be used to specify where PF_BRIDGE netlink commands should
be sent. NTF_MASTER sends the commands to the 'dev-&gt;master'
device for parsing. Typically this will be the linux net/bridge,
or open-vswitch devices. Also without any flags set the command
will be handled by the master device as well so that current user
space tools continue to work as expected.

The NTF_SELF flag will push the PF_BRIDGE commands to the
device. In the basic example below the commands are then parsed
and programmed in the embedded bridge.

Note if both NTF_SELF and NTF_MASTER bits are set then the
command will be sent to both 'dev-&gt;master' and 'dev' this allows
user space to easily keep the embedded bridge and software bridge
in sync.

There is a slight complication in the case with both flags set
when an error occurs. To resolve this the rtnl handler clears
the NTF_ flag in the netlink ack to indicate which sets completed
successfully. The add/del handlers will abort as soon as any
error occurs.

To support this new net device ops were added to call into
the device and the existing bridging code was refactored
to use these. There should be no required changes in user space
to support the current bridge behavior.

A basic setup with a SR-IOV enabled NIC looks like this,

          veth0  veth2
            |      |
          ------------
          |  bridge0 |   &lt;---- software bridging
          ------------
               /
               /
  ethx.y      ethx
    VF         PF
     \         \          &lt;---- propagate FDB entries to HW
     \         \
  --------------------
  |  Embedded Bridge |    &lt;---- hardware offloaded switching
  --------------------

In this case the embedded bridge must be managed to allow 'veth0'
to communicate with 'ethx.y' correctly. At present drivers managing
the embedded bridge either send frames onto the network which
then get dropped by the switch OR the embedded bridge will flood
these frames. With this patch we have a mechanism to manage the
embedded bridge correctly from user space. This example is specific
to SR-IOV but replacing the VF with another PF or dropping this
into the DSA framework generates similar management issues.

Examples session using the 'br'[1] tool to add, dump and then
delete a mac address with a new "embedded" option and enabled
ixgbe driver:

# br fdb add 22:35:19:ac:60:59 dev eth3
# br fdb
port    mac addr                flags
veth0   22:35:19:ac:60:58       static
veth0   9a:5f:81:f7:f6:ec       local
eth3    00:1b:21:55:23:59       local
eth3    22:35:19:ac:60:59       static
veth0   22:35:19:ac:60:57       static
#br fdb add 22:35:19:ac:60:59 embedded dev eth3
#br fdb
port    mac addr                flags
veth0   22:35:19:ac:60:58       static
veth0   9a:5f:81:f7:f6:ec       local
eth3    00:1b:21:55:23:59       local
eth3    22:35:19:ac:60:59       static
veth0   22:35:19:ac:60:57       static
eth3    22:35:19:ac:60:59       local embedded
#br fdb del 22:35:19:ac:60:59 embedded dev eth3

I added a couple lines to 'br' to set the flags correctly is all. It
is my opinion that the merit of this patch is now embedded and SW
bridges can both be modeled correctly in user space using very nearly
the same message passing.

[1] 'br' tool was published as an RFC here and will be renamed 'bridge'
    http://patchwork.ozlabs.org/patch/117664/

Thanks to Jamal Hadi Salim, Stephen Hemminger and Ben Hutchings for
valuable feedback, suggestions, and review.

v2: fixed api descriptions and error case with both NTF_SELF and
    NTF_MASTER set plus updated patch description.

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>
