linux/drivers/net/ethernet/mellanox/mlxsw
Ido Schimmel 7866f265b8 mlxsw: spectrum_router: Only perform atomic nexthop bucket replacement when requested
When cleared, the 'force' parameter in nexthop bucket replacement
notifications indicates that a driver should try to perform an atomic
replacement. Meaning, only update the contents of the bucket if it is
inactive.

Since mlxsw only queries buckets' activity once every second, there is
no point in trying an atomic replacement if the idle timer interval is
smaller than 1 second.

Currently, mlxsw ignores the original value of 'force' and will always
try an atomic replacement if the idle timer is not smaller than 1
second.

Fix this by taking the original value of 'force' into account and never
promoting a non-atomic replacement to an atomic one.

Fixes: 617a77f044 ("mlxsw: spectrum_router: Add nexthop bucket replacement support")
Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-03-30 17:51:21 -07:00
..
cmd.h mlxsw: spectrum: Set KVH XLT cache mode for Spectrum2/3 2020-12-14 19:09:55 -08:00
core_acl_flex_actions.c mlxsw: core_acl_flex_actions: Add mirror sampler action 2021-03-16 15:32:22 -07:00
core_acl_flex_actions.h mlxsw: core_acl_flex_actions: Add mirror sampler action 2021-03-16 15:32:22 -07:00
core_acl_flex_keys.c mlxsw: core_acl: Use an array instead of a struct with a zero-length array 2020-12-06 19:22:14 -08:00
core_acl_flex_keys.h
core_env.c mlxsw: Update module's settings when module is plugged in 2020-09-27 13:27:01 -07:00
core_env.h net: don't include ethtool.h from netdevice.h 2020-11-23 17:27:04 -08:00
core_hwmon.c mlxsw: core_hwmon: Query MTMP before writing to set only relevant fields 2020-09-27 13:27:00 -07:00
core_thermal.c mlxsw: core: Increase critical threshold for ASIC thermal zone 2021-01-09 16:25:10 -08:00
core.c mlxsw: Adjust some MFDE fields shift and size to fw implementation 2021-03-10 13:04:57 -08:00
core.h mlxsw: pci: Set extra metadata in skb control block 2021-03-14 15:00:43 -07:00
emad.h
i2c.c
i2c.h
ib.h
item.h
Kconfig mlxsw: Fix firmware flashing 2020-11-18 11:07:00 -08:00
Makefile mlxsw: spectrum_router: Introduce XM implementation of router low-level ops 2020-12-14 19:09:54 -08:00
minimal.c mlxsw: Ignore ports that are connected to eXtended mezanine 2020-12-14 19:09:54 -08:00
pci_hw.h mlxsw: pci: Add more metadata fields to CQEv2 2021-03-14 15:00:43 -07:00
pci.c mlxsw: pci: Set extra metadata in skb control block 2021-03-14 15:00:43 -07:00
pci.h
port.h
reg.h mlxsw: reg: Add Router Adjacency Table Activity Dump Register 2021-03-24 16:34:57 -07:00
resources.h mlxsw: resources: Add resource identifier for global policers 2020-07-15 18:09:59 -07:00
spectrum1_acl_tcam.c
spectrum1_kvdl.c
spectrum1_mr_tcam.c
spectrum2_acl_tcam.c
spectrum2_kvdl.c
spectrum2_mr_tcam.c
spectrum_acl_atcam.c
spectrum_acl_bloom_filter.c
spectrum_acl_ctcam.c
spectrum_acl_erp.c
spectrum_acl_flex_actions.c mlxsw: spectrum_acl: Offload FLOW_ACTION_SAMPLE 2021-03-16 15:32:22 -07:00
spectrum_acl_flex_actions.h
spectrum_acl_flex_keys.c
spectrum_acl_tcam.c mlxsw: spectrum_acl: Fix mlxsw_sp_acl_tcam_group_add()'s error path 2020-09-27 13:22:31 -07:00
spectrum_acl_tcam.h
spectrum_acl.c mlxsw: spectrum_acl: Offload FLOW_ACTION_SAMPLE 2021-03-16 15:32:22 -07:00
spectrum_buffers.c mlxsw: spectrum_buffers: Support two headroom modes 2020-09-17 17:01:38 -07:00
spectrum_cnt.c mlxsw: spectrum_cnt: Use flex_array_size() helper in memcpy() 2020-07-30 17:38:23 -07:00
spectrum_cnt.h
spectrum_dcb.c mlxsw: spectrum_dcb: Implement dcbnl_setbuffer / getbuffer 2020-09-17 17:01:38 -07:00
spectrum_dpipe.c mlxsw: spectrum_router: Pass payload pointer to nexthop update function 2021-03-24 16:34:57 -07:00
spectrum_dpipe.h
spectrum_ethtool.c mlxsw: spectrum_ethtool: Add an external speed to PTYS register 2021-02-26 15:47:53 -08:00
spectrum_fid.c
spectrum_flow.c mlxsw: spectrum_matchall: Propagate extack further 2021-03-16 15:32:22 -07:00
spectrum_flower.c mlxsw: spectrum_acl: Offload FLOW_ACTION_SAMPLE 2021-03-16 15:32:22 -07:00
spectrum_ipip.c mlxsw: spectrum_router: Pass payload pointer to nexthop update function 2021-03-24 16:34:57 -07:00
spectrum_ipip.h mlxsw: spectrum_router: Pass payload pointer to nexthop update function 2021-03-24 16:34:57 -07:00
spectrum_kvdl.c
spectrum_matchall.c mlxsw: spectrum_matchall: Perform priority checks earlier 2021-03-29 13:37:25 -07:00
spectrum_mr_tcam.c
spectrum_mr_tcam.h
spectrum_mr.c mlxsw: spectrum_mr: Use flexible-array member instead of zero-length array 2020-12-06 19:22:14 -08:00
spectrum_mr.h
spectrum_nve_vxlan.c mlxsw: Allow 802.1d and .1ad VxLAN bridges to coexist on Spectrum>=2 2021-03-17 12:26:28 -07:00
spectrum_nve.c mlxsw: Veto Q-in-VNI for Spectrum-1 ASIC 2020-12-08 15:45:56 -08:00
spectrum_nve.h mlxsw: Allow 802.1d and .1ad VxLAN bridges to coexist on Spectrum>=2 2021-03-17 12:26:28 -07:00
spectrum_policer.c mlxsw: spectrum_policer: Add devlink resource support 2020-07-15 18:10:00 -07:00
spectrum_ptp.c mlxsw: spectrum_ptp: use PTP wide message type definitions 2020-11-25 12:23:14 -08:00
spectrum_ptp.h mlxsw: spectrum_ptp: use PTP wide message type definitions 2020-11-25 12:23:14 -08:00
spectrum_qdisc.c mlxsw: spectrum_span: Add SPAN probability rate support 2021-03-11 16:22:39 -08:00
spectrum_router_xm.c mlxsw: spectrum_router: Use eXtended mezzanine to offload IPv4 router 2020-12-14 19:09:55 -08:00
spectrum_router.c mlxsw: spectrum_router: Only perform atomic nexthop bucket replacement when requested 2021-03-30 17:51:21 -07:00
spectrum_router.h mlxsw: spectrum_router: Periodically update activity of nexthop buckets 2021-03-24 16:34:57 -07:00
spectrum_span.c mlxsw: spectrum_span: Add SPAN probability rate support 2021-03-11 16:22:39 -08:00
spectrum_span.h mlxsw: spectrum_matchall: Implement sampling using mirroring 2021-03-11 16:22:39 -08:00
spectrum_switchdev.c mlxsw: Allow 802.1d and .1ad VxLAN bridges to coexist on Spectrum>=2 2021-03-17 12:26:28 -07:00
spectrum_switchdev.h
spectrum_trap.c mlxsw: spectrum_acl: Offload FLOW_ACTION_SAMPLE 2021-03-16 15:32:22 -07:00
spectrum_trap.h mlxsw: spectrum_trap: Allow for per-ASIC traps initialization 2020-08-03 18:06:46 -07:00
spectrum.c mlxsw: spectrum: Veto sampling if already enabled on port 2021-03-29 13:37:26 -07:00
spectrum.h mlxsw: spectrum_router: Create per-ASIC router operations 2021-03-22 13:45:46 -07:00
switchib.c mlxsw: Set port split ability attribute in driver 2020-07-09 13:15:29 -07:00
switchx2.c mlxsw: spectrum_ethtool: Add an external speed to PTYS register 2021-02-26 15:47:53 -08:00
trap.h mlxsw: spectrum_router: Use different trap identifier for unresolved nexthops 2020-11-24 12:14:55 -08:00
txheader.h