linux/drivers/net/ethernet/qlogic/qlcnic
Roopa Prabhu d297653dd6 rtnetlink: fdb dump: optimize by saving last interface markers
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 472681d57a ("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->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 <roopa@cumulusnetworks.com>
Signed-off-by: Wilson Kok <wkok@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-09-01 16:56:15 -07:00
..
Makefile net: ethernet: qlogic: qlcnic: Remove duplicate object file from Makefile 2014-08-11 12:44:35 -07:00
qlcnic_83xx_hw.c net: qlcnic: don't set unused function argument 2016-06-16 17:33:11 -07:00
qlcnic_83xx_hw.h qlcnic: Add support to enable capability to extend minidump for iSCSI 2015-08-10 13:34:28 -07:00
qlcnic_83xx_init.c qlcnic: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_port 2016-06-17 20:23:31 -07:00
qlcnic_83xx_vnic.c qlcnic: fix a loop exit condition better 2015-12-24 11:02:35 -05:00
qlcnic_ctx.c qlcnic: correctly handle qlcnic_alloc_mbx_args 2016-01-04 17:14:30 -05:00
qlcnic_dcb.c qlcnic: constify qlcnic_dcb_ops structures 2015-12-28 00:44:52 -05:00
qlcnic_dcb.h net: qlcnic: avoid superfluous assignement 2016-08-01 13:47:00 -07:00
qlcnic_ethtool.c qlcnic: Fix mailbox completion handling during spurious interrupt 2016-03-10 16:15:54 -05:00
qlcnic_hdr.h
qlcnic_hw.c qlcnic: Rearrange ordering of header files inclusion 2015-08-10 13:34:28 -07:00
qlcnic_hw.h qlcnic: Add support to enable capability to extend minidump for iSCSI 2015-08-10 13:34:28 -07:00
qlcnic_init.c qlcnic: Use usleep_range() instead of msleep() for sleep less than 20ms 2014-08-29 20:15:36 -07:00
qlcnic_io.c qlcnic: fix napi budget alteration 2016-08-03 12:03:35 -07:00
qlcnic_main.c rtnetlink: fdb dump: optimize by saving last interface markers 2016-09-01 16:56:15 -07:00
qlcnic_minidump.c qlcnic: potential NULL dereference in qlcnic_83xx_get_minidump_template() 2016-05-11 23:44:56 -04:00
qlcnic_sriov_common.c qlcnic: fix data structure corruption in async mbx command handling 2016-08-03 12:03:35 -07:00
qlcnic_sriov_pf.c qlcnic: Rearrange ordering of header files inclusion 2015-08-10 13:34:28 -07:00
qlcnic_sriov.h qlcnic: fix data structure corruption in async mbx command handling 2016-08-03 12:03:35 -07:00
qlcnic_sysfs.c qlcnic: Rearrange ordering of header files inclusion 2015-08-10 13:34:28 -07:00
qlcnic.h qlcnic: Update version to 5.3.65 2016-08-03 12:03:35 -07:00