Message ID | 20201125193505.1052466-1-idosch@idosch.org |
---|---|
Headers | show |
Series | mlxsw: Update adjacency index more efficiently | expand |
On 11/25/20 12:35 PM, Ido Schimmel wrote: > Example: > > 8k IPv6 routes were added in an alternating manner to two VRFs. All the > routes are using the same nexthop object ('nhid 1'). > > Before: > > # perf stat -e devlink:devlink_hwmsg --filter='incoming==0' -- ip nexthop replace id 1 via 2001:db8:1::2 dev swp3 > > Performance counter stats for 'ip nexthop replace id 1 via 2001:db8:1::2 dev swp3': > > 16,385 devlink:devlink_hwmsg > > 4.255933213 seconds time elapsed > > 0.000000000 seconds user > 0.666923000 seconds sys > > Number of EMAD transactions corresponds to number of routes using the > nexthop group. > > After: > > # perf stat -e devlink:devlink_hwmsg --filter='incoming==0' -- ip nexthop replace id 1 via 2001:db8:1::2 dev swp3 > > Performance counter stats for 'ip nexthop replace id 1 via 2001:db8:1::2 dev swp3': > > 3 devlink:devlink_hwmsg > > 0.077655094 seconds time elapsed > > 0.000000000 seconds user > 0.076698000 seconds sys > > Number of EMAD transactions corresponds to number of VRFs / VRs. wow, that is a huge difference - a good example of the efficiencies the nexthop model allows.
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Wed, 25 Nov 2020 21:35:00 +0200 you wrote: > From: Ido Schimmel <idosch@nvidia.com> > > The device supports an operation that allows the driver to issue one > request to update the adjacency index for all the routes in a given > virtual router (VR) from old index and size to new ones. This is useful > in case the configuration of a certain nexthop group is updated and its > adjacency index changes. > > [...] Here is the summary with links: - [net-next,1/5] mlxsw: spectrum_router: Fix error handling issue https://git.kernel.org/netdev/net-next/c/1c2c5eb6e108 - [net-next,2/5] mlxsw: spectrum_router: Pass virtual router parameters directly instead of pointer https://git.kernel.org/netdev/net-next/c/40e4413d5dde - [net-next,3/5] mlxsw: spectrum_router: Rollback virtual router adjacency pointer update https://git.kernel.org/netdev/net-next/c/9a4ab10c74a0 - [net-next,4/5] mlxsw: spectrum_router: Track nexthop group virtual router membership https://git.kernel.org/netdev/net-next/c/d2141a42b96a - [net-next,5/5] mlxsw: spectrum_router: Update adjacency index more efficiently https://git.kernel.org/netdev/net-next/c/ff47fa13c991 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
From: Ido Schimmel <idosch@nvidia.com> The device supports an operation that allows the driver to issue one request to update the adjacency index for all the routes in a given virtual router (VR) from old index and size to new ones. This is useful in case the configuration of a certain nexthop group is updated and its adjacency index changes. Currently, the driver does not use this operation in an efficient manner. It iterates over all the routes using the nexthop group and issues an update request for the VR if it is not the same as the previous VR. Instead, this patch set tracks the VRs in which the nexthop group is used and issues one request for each VR. Example: 8k IPv6 routes were added in an alternating manner to two VRFs. All the routes are using the same nexthop object ('nhid 1'). Before: # perf stat -e devlink:devlink_hwmsg --filter='incoming==0' -- ip nexthop replace id 1 via 2001:db8:1::2 dev swp3 Performance counter stats for 'ip nexthop replace id 1 via 2001:db8:1::2 dev swp3': 16,385 devlink:devlink_hwmsg 4.255933213 seconds time elapsed 0.000000000 seconds user 0.666923000 seconds sys Number of EMAD transactions corresponds to number of routes using the nexthop group. After: # perf stat -e devlink:devlink_hwmsg --filter='incoming==0' -- ip nexthop replace id 1 via 2001:db8:1::2 dev swp3 Performance counter stats for 'ip nexthop replace id 1 via 2001:db8:1::2 dev swp3': 3 devlink:devlink_hwmsg 0.077655094 seconds time elapsed 0.000000000 seconds user 0.076698000 seconds sys Number of EMAD transactions corresponds to number of VRFs / VRs. Patch set overview: Patch #1 is a fix for a bug introduced in previous submission. Detected by Coverity. Patches #2 and #3 are preparations. Patch #4 tracks the VRs a nexthop group is member of. Patch #5 uses the membership tracking from the previous patch to issue one update request per each VR. Ido Schimmel (5): mlxsw: spectrum_router: Fix error handling issue mlxsw: spectrum_router: Pass virtual router parameters directly instead of pointer mlxsw: spectrum_router: Rollback virtual router adjacency pointer update mlxsw: spectrum_router: Track nexthop group virtual router membership mlxsw: spectrum_router: Update adjacency index more efficiently .../ethernet/mellanox/mlxsw/spectrum_router.c | 203 ++++++++++++++++-- 1 file changed, 186 insertions(+), 17 deletions(-)