<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/net/switchdev, branch v4.14-rc5</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>net: switchdev: Remove bridge bypass support from switchdev</title>
<updated>2017-08-07T21:48:48+00:00</updated>
<author>
<name>Arkadi Sharshevsky</name>
<email>arkadis@mellanox.com</email>
</author>
<published>2017-08-06T13:15:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=29ab586c3d83f81c435e269cace9a1619afb5bbd'/>
<id>29ab586c3d83f81c435e269cace9a1619afb5bbd</id>
<content type='text'>
Currently the bridge port flags, vlans, FDBs and MDBs can be offloaded
through the bridge code, making the switchdev's SELF bridge bypass
implementation to be redundant. This implies several changes:
- No need for dump infra in switchdev, DSA's special case is handled
  privately.
- Remove obj_dump from switchdev_ops.
- FDBs are removed from obj_add/del routines, due to the fact that they
  are offloaded through the bridge notification chain.
- The switchdev_port_bridge_xx() and switchdev_port_fdb_xx() functions
  can be removed.

Signed-off-by: Arkadi Sharshevsky &lt;arkadis@mellanox.com&gt;
Reviewed-by: Vivien Didelot &lt;vivien.didelot@savoirfairelinux.com&gt;
Acked-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Reviewed-by: Ivan Vecera &lt;ivecera@redhat.com&gt;
Reviewed-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently the bridge port flags, vlans, FDBs and MDBs can be offloaded
through the bridge code, making the switchdev's SELF bridge bypass
implementation to be redundant. This implies several changes:
- No need for dump infra in switchdev, DSA's special case is handled
  privately.
- Remove obj_dump from switchdev_ops.
- FDBs are removed from obj_add/del routines, due to the fact that they
  are offloaded through the bridge notification chain.
- The switchdev_port_bridge_xx() and switchdev_port_fdb_xx() functions
  can be removed.

Signed-off-by: Arkadi Sharshevsky &lt;arkadis@mellanox.com&gt;
Reviewed-by: Vivien Didelot &lt;vivien.didelot@savoirfairelinux.com&gt;
Acked-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Reviewed-by: Ivan Vecera &lt;ivecera@redhat.com&gt;
Reviewed-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: dsa: Move FDB dump implementation inside DSA</title>
<updated>2017-08-07T21:48:48+00:00</updated>
<author>
<name>Arkadi Sharshevsky</name>
<email>arkadis@mellanox.com</email>
</author>
<published>2017-08-06T13:15:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2bedde1abbef5eec211308f0293dd7681b0513ec'/>
<id>2bedde1abbef5eec211308f0293dd7681b0513ec</id>
<content type='text'>
&gt;From all switchdev devices only DSA requires special FDB dump. This is due
to lack of ability for syncing the hardware learned FDBs with the bridge.
Due to this it is removed from switchdev and moved inside DSA.

Signed-off-by: Arkadi Sharshevsky &lt;arkadis@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
&gt;From all switchdev devices only DSA requires special FDB dump. This is due
to lack of ability for syncing the hardware learned FDBs with the bridge.
Due to this it is removed from switchdev and moved inside DSA.

Signed-off-by: Arkadi Sharshevsky &lt;arkadis@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: switchdev: Change notifier chain to be atomic</title>
<updated>2017-06-08T18:16:24+00:00</updated>
<author>
<name>Arkadi Sharshevsky</name>
<email>arkadis@mellanox.com</email>
</author>
<published>2017-06-08T06:44:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ff5cf100110c6ea722d63dfa3d747ceb179e8da4'/>
<id>ff5cf100110c6ea722d63dfa3d747ceb179e8da4</id>
<content type='text'>
In order to use the switchdev notifier chain for FDB sync with the
device it has to be changed to atomic. The is done because the bridge
can learn new FDBs in atomic context.

Signed-off-by: Arkadi Sharshevsky &lt;arkadis@mellanox.com&gt;
Reviewed-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
Reviewed-by: Ivan Vecera &lt;ivecera@redhat.com&gt;
Signed-off-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Reviewed-by: Ivan Vecera &lt;ivecera@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In order to use the switchdev notifier chain for FDB sync with the
device it has to be changed to atomic. The is done because the bridge
can learn new FDBs in atomic context.

Signed-off-by: Arkadi Sharshevsky &lt;arkadis@mellanox.com&gt;
Reviewed-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
Reviewed-by: Ivan Vecera &lt;ivecera@redhat.com&gt;
Signed-off-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Reviewed-by: Ivan Vecera &lt;ivecera@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netlink: pass extended ACK struct to parsing functions</title>
<updated>2017-04-13T17:58:22+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2017-04-12T12:34:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fceb6435e85298f747fee938415057af837f5a8a'/>
<id>fceb6435e85298f747fee938415057af837f5a8a</id>
<content type='text'>
Pass the new extended ACK reporting struct to all of the generic
netlink parsing functions. For now, pass NULL in almost all callers
(except for some in the core.)

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pass the new extended ACK reporting struct to all of the generic
netlink parsing functions. For now, pass NULL in almost all callers
(except for some in the core.)

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2016-10-30T16:42:58+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2016-10-30T16:42:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=27058af401e49d88a905df000dd26f443fcfa8ce'/>
<id>27058af401e49d88a905df000dd26f443fcfa8ce</id>
<content type='text'>
Mostly simple overlapping changes.

For example, David Ahern's adjacency list revamp in 'net-next'
conflicted with an adjacency list traversal bug fix in 'net'.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Mostly simple overlapping changes.

For example, David Ahern's adjacency list revamp in 'net-next'
conflicted with an adjacency list traversal bug fix in 'net'.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>switchdev: Remove redundant variable</title>
<updated>2016-10-29T18:58:33+00:00</updated>
<author>
<name>Ido Schimmel</name>
<email>idosch@mellanox.com</email>
</author>
<published>2016-10-26T09:03:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c778453b138889587eee23e246e231bb12d1e80d'/>
<id>c778453b138889587eee23e246e231bb12d1e80d</id>
<content type='text'>
Instead of storing return value in 'err' and returning, just return
directly.

Signed-off-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
Reviewed-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of storing return value in 'err' and returning, just return
directly.

Signed-off-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
Reviewed-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>switchdev: Execute bridge ndos only for bridge ports</title>
<updated>2016-10-19T14:58:04+00:00</updated>
<author>
<name>Ido Schimmel</name>
<email>idosch@mellanox.com</email>
</author>
<published>2016-10-18T16:50:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=97c242902c209e7d46e365335db5202634484dcb'/>
<id>97c242902c209e7d46e365335db5202634484dcb</id>
<content type='text'>
We recently got the following warning after setting up a vlan device on
top of an offloaded bridge and executing 'bridge link':

WARNING: CPU: 0 PID: 18566 at drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c:81 mlxsw_sp_port_orig_get.part.9+0x55/0x70 [mlxsw_spectrum]
[...]
 CPU: 0 PID: 18566 Comm: bridge Not tainted 4.8.0-rc7 #1
 Hardware name: Mellanox Technologies Ltd. Mellanox switch/Mellanox switch, BIOS 4.6.5 05/21/2015
  0000000000000286 00000000e64ab94f ffff880406e6f8f0 ffffffff8135eaa3
  0000000000000000 0000000000000000 ffff880406e6f930 ffffffff8108c43b
  0000005106e6f988 ffff8803df398840 ffff880403c60108 ffff880406e6f990
 Call Trace:
  [&lt;ffffffff8135eaa3&gt;] dump_stack+0x63/0x90
  [&lt;ffffffff8108c43b&gt;] __warn+0xcb/0xf0
  [&lt;ffffffff8108c56d&gt;] warn_slowpath_null+0x1d/0x20
  [&lt;ffffffffa01420d5&gt;] mlxsw_sp_port_orig_get.part.9+0x55/0x70 [mlxsw_spectrum]
  [&lt;ffffffffa0142195&gt;] mlxsw_sp_port_attr_get+0xa5/0xb0 [mlxsw_spectrum]
  [&lt;ffffffff816f151f&gt;] switchdev_port_attr_get+0x4f/0x140
  [&lt;ffffffff816f15d0&gt;] switchdev_port_attr_get+0x100/0x140
  [&lt;ffffffff816f15d0&gt;] switchdev_port_attr_get+0x100/0x140
  [&lt;ffffffff816f1d6b&gt;] switchdev_port_bridge_getlink+0x5b/0xc0
  [&lt;ffffffff816f2680&gt;] ? switchdev_port_fdb_dump+0x90/0x90
  [&lt;ffffffff815f5427&gt;] rtnl_bridge_getlink+0xe7/0x190
  [&lt;ffffffff8161a1b2&gt;] netlink_dump+0x122/0x290
  [&lt;ffffffff8161b0df&gt;] __netlink_dump_start+0x15f/0x190
  [&lt;ffffffff815f5340&gt;] ? rtnl_bridge_dellink+0x230/0x230
  [&lt;ffffffff815fab46&gt;] rtnetlink_rcv_msg+0x1a6/0x220
  [&lt;ffffffff81208118&gt;] ? __kmalloc_node_track_caller+0x208/0x2c0
  [&lt;ffffffff815f5340&gt;] ? rtnl_bridge_dellink+0x230/0x230
  [&lt;ffffffff815fa9a0&gt;] ? rtnl_newlink+0x890/0x890
  [&lt;ffffffff8161cf54&gt;] netlink_rcv_skb+0xa4/0xc0
  [&lt;ffffffff815f56f8&gt;] rtnetlink_rcv+0x28/0x30
  [&lt;ffffffff8161c92c&gt;] netlink_unicast+0x18c/0x240
  [&lt;ffffffff8161ccdb&gt;] netlink_sendmsg+0x2fb/0x3a0
  [&lt;ffffffff815c5a48&gt;] sock_sendmsg+0x38/0x50
  [&lt;ffffffff815c6031&gt;] SYSC_sendto+0x101/0x190
  [&lt;ffffffff815c7111&gt;] ? __sys_recvmsg+0x51/0x90
  [&lt;ffffffff815c6b6e&gt;] SyS_sendto+0xe/0x10
  [&lt;ffffffff817017f2&gt;] entry_SYSCALL_64_fastpath+0x1a/0xa4

The problem is that the 8021q module propagates the call to
ndo_bridge_getlink() via switchdev ops, but the switch driver doesn't
recognize the netdev, as it's not offloaded.

While we can ignore calls being made to non-bridge ports inside the
driver, a better fix would be to push this check up to the switchdev
layer.

Note that these ndos can be called for non-bridged netdev, but this only
happens in certain PF drivers which don't call the corresponding
switchdev functions anyway.

Fixes: 99f44bb3527b ("mlxsw: spectrum: Enable L3 interfaces on top of bridge devices")
Signed-off-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
Reported-by: Tamir Winetroub &lt;tamirw@mellanox.com&gt;
Tested-by: Tamir Winetroub &lt;tamirw@mellanox.com&gt;
Signed-off-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We recently got the following warning after setting up a vlan device on
top of an offloaded bridge and executing 'bridge link':

WARNING: CPU: 0 PID: 18566 at drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c:81 mlxsw_sp_port_orig_get.part.9+0x55/0x70 [mlxsw_spectrum]
[...]
 CPU: 0 PID: 18566 Comm: bridge Not tainted 4.8.0-rc7 #1
 Hardware name: Mellanox Technologies Ltd. Mellanox switch/Mellanox switch, BIOS 4.6.5 05/21/2015
  0000000000000286 00000000e64ab94f ffff880406e6f8f0 ffffffff8135eaa3
  0000000000000000 0000000000000000 ffff880406e6f930 ffffffff8108c43b
  0000005106e6f988 ffff8803df398840 ffff880403c60108 ffff880406e6f990
 Call Trace:
  [&lt;ffffffff8135eaa3&gt;] dump_stack+0x63/0x90
  [&lt;ffffffff8108c43b&gt;] __warn+0xcb/0xf0
  [&lt;ffffffff8108c56d&gt;] warn_slowpath_null+0x1d/0x20
  [&lt;ffffffffa01420d5&gt;] mlxsw_sp_port_orig_get.part.9+0x55/0x70 [mlxsw_spectrum]
  [&lt;ffffffffa0142195&gt;] mlxsw_sp_port_attr_get+0xa5/0xb0 [mlxsw_spectrum]
  [&lt;ffffffff816f151f&gt;] switchdev_port_attr_get+0x4f/0x140
  [&lt;ffffffff816f15d0&gt;] switchdev_port_attr_get+0x100/0x140
  [&lt;ffffffff816f15d0&gt;] switchdev_port_attr_get+0x100/0x140
  [&lt;ffffffff816f1d6b&gt;] switchdev_port_bridge_getlink+0x5b/0xc0
  [&lt;ffffffff816f2680&gt;] ? switchdev_port_fdb_dump+0x90/0x90
  [&lt;ffffffff815f5427&gt;] rtnl_bridge_getlink+0xe7/0x190
  [&lt;ffffffff8161a1b2&gt;] netlink_dump+0x122/0x290
  [&lt;ffffffff8161b0df&gt;] __netlink_dump_start+0x15f/0x190
  [&lt;ffffffff815f5340&gt;] ? rtnl_bridge_dellink+0x230/0x230
  [&lt;ffffffff815fab46&gt;] rtnetlink_rcv_msg+0x1a6/0x220
  [&lt;ffffffff81208118&gt;] ? __kmalloc_node_track_caller+0x208/0x2c0
  [&lt;ffffffff815f5340&gt;] ? rtnl_bridge_dellink+0x230/0x230
  [&lt;ffffffff815fa9a0&gt;] ? rtnl_newlink+0x890/0x890
  [&lt;ffffffff8161cf54&gt;] netlink_rcv_skb+0xa4/0xc0
  [&lt;ffffffff815f56f8&gt;] rtnetlink_rcv+0x28/0x30
  [&lt;ffffffff8161c92c&gt;] netlink_unicast+0x18c/0x240
  [&lt;ffffffff8161ccdb&gt;] netlink_sendmsg+0x2fb/0x3a0
  [&lt;ffffffff815c5a48&gt;] sock_sendmsg+0x38/0x50
  [&lt;ffffffff815c6031&gt;] SYSC_sendto+0x101/0x190
  [&lt;ffffffff815c7111&gt;] ? __sys_recvmsg+0x51/0x90
  [&lt;ffffffff815c6b6e&gt;] SyS_sendto+0xe/0x10
  [&lt;ffffffff817017f2&gt;] entry_SYSCALL_64_fastpath+0x1a/0xa4

The problem is that the 8021q module propagates the call to
ndo_bridge_getlink() via switchdev ops, but the switch driver doesn't
recognize the netdev, as it's not offloaded.

While we can ignore calls being made to non-bridge ports inside the
driver, a better fix would be to push this check up to the switchdev
layer.

Note that these ndos can be called for non-bridged netdev, but this only
happens in certain PF drivers which don't call the corresponding
switchdev functions anyway.

Fixes: 99f44bb3527b ("mlxsw: spectrum: Enable L3 interfaces on top of bridge devices")
Signed-off-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
Reported-by: Tamir Winetroub &lt;tamirw@mellanox.com&gt;
Tested-by: Tamir Winetroub &lt;tamirw@mellanox.com&gt;
Signed-off-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>switchdev: remove FIB offload infrastructure</title>
<updated>2016-09-28T08:48:00+00:00</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2016-09-26T10:52:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=347e3b28c1ba24c1ae2f30290d8247480ab9ce14'/>
<id>347e3b28c1ba24c1ae2f30290d8247480ab9ce14</id>
<content type='text'>
Since this is now taken care of by FIB notifier, remove the code, with
all unused dependencies.

Signed-off-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since this is now taken care of by FIB notifier, remove the code, with
all unused dependencies.

Signed-off-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fib: introduce FIB info offload flag helpers</title>
<updated>2016-09-28T08:48:00+00:00</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2016-09-26T10:52:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c98501879b1b1af90c7325574f2672e9efca592c'/>
<id>c98501879b1b1af90c7325574f2672e9efca592c</id>
<content type='text'>
These helpers are to be used in case someone offloads the FIB entry. The
result is that if the entry is offloaded to at least one device, the
offload flag is set.

Signed-off-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Reviewed-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These helpers are to be used in case someone offloads the FIB entry. The
result is that if the entry is offloaded to at least one device, the
offload flag is set.

Signed-off-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Reviewed-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtnetlink: fdb dump: optimize by saving last interface markers</title>
<updated>2016-09-01T23:56:15+00:00</updated>
<author>
<name>Roopa Prabhu</name>
<email>roopa@cumulusnetworks.com</email>
</author>
<published>2016-08-31T04:56:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d297653dd6f07afbe7e6c702a4bcd7615680002e'/>
<id>d297653dd6f07afbe7e6c702a4bcd7615680002e</id>
<content type='text'>
fdb dumps spanning multiple skb's currently restart from the first
interface again for every skb. This results in unnecessary
iterations on the already visited interfaces and their fdb
entries. In large scale setups, we have seen this to slow
down fdb dumps considerably. On a system with 30k macs we
see fdb dumps spanning across more than 300 skbs.

To fix the problem, this patch replaces the existing single fdb
marker with three markers: netdev hash entries, netdevs and fdb
index to continue where we left off instead of restarting from the
first netdev. This is consistent with link dumps.

In the process of fixing the performance issue, this patch also
re-implements fix done by
commit 472681d57a5d ("net: ndo_fdb_dump should report -EMSGSIZE to rtnl_fdb_dump")
(with an internal fix from Wilson Kok) in the following ways:
- change ndo_fdb_dump handlers to return error code instead
of the last fdb index
- use cb-&gt;args strictly for dump frag markers and not error codes.
This is consistent with other dump functions.

Below results were taken on a system with 1000 netdevs
and 35085 fdb entries:
before patch:
$time bridge fdb show | wc -l
15065

real    1m11.791s
user    0m0.070s
sys 1m8.395s

(existing code does not return all macs)

after patch:
$time bridge fdb show | wc -l
35085

real    0m2.017s
user    0m0.113s
sys 0m1.942s

Signed-off-by: Roopa Prabhu &lt;roopa@cumulusnetworks.com&gt;
Signed-off-by: Wilson Kok &lt;wkok@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fdb dumps spanning multiple skb's currently restart from the first
interface again for every skb. This results in unnecessary
iterations on the already visited interfaces and their fdb
entries. In large scale setups, we have seen this to slow
down fdb dumps considerably. On a system with 30k macs we
see fdb dumps spanning across more than 300 skbs.

To fix the problem, this patch replaces the existing single fdb
marker with three markers: netdev hash entries, netdevs and fdb
index to continue where we left off instead of restarting from the
first netdev. This is consistent with link dumps.

In the process of fixing the performance issue, this patch also
re-implements fix done by
commit 472681d57a5d ("net: ndo_fdb_dump should report -EMSGSIZE to rtnl_fdb_dump")
(with an internal fix from Wilson Kok) in the following ways:
- change ndo_fdb_dump handlers to return error code instead
of the last fdb index
- use cb-&gt;args strictly for dump frag markers and not error codes.
This is consistent with other dump functions.

Below results were taken on a system with 1000 netdevs
and 35085 fdb entries:
before patch:
$time bridge fdb show | wc -l
15065

real    1m11.791s
user    0m0.070s
sys 1m8.395s

(existing code does not return all macs)

after patch:
$time bridge fdb show | wc -l
35085

real    0m2.017s
user    0m0.113s
sys 0m1.942s

Signed-off-by: Roopa Prabhu &lt;roopa@cumulusnetworks.com&gt;
Signed-off-by: Wilson Kok &lt;wkok@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
