linux_dsm_epyc7002/drivers/net/ethernet/mellanox/mlxsw
Petr Machata 289460404f mlxsw: __mlxsw_sp_port_headroom_set(): Fix a use of local variable
The function-local variable "delay" enters the loop interpreted as delay
in bits. However, inside the loop it gets overwritten by the result of
mlxsw_sp_pg_buf_delay_get(), and thus leaves the loop as quantity in
cells. Thus on second and further loop iterations, the headroom for a
given priority is configured with a wrong size.

Fix by introducing a loop-local variable, delay_cells. Rename thres to
thres_cells for consistency.

Fixes: f417f04da5 ("mlxsw: spectrum: Refactor port buffer configuration")
Signed-off-by: Petr Machata <petrm@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-17 10:13:46 -08:00
..
cmd.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
core_acl_flex_actions.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
core_acl_flex_actions.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
core_acl_flex_keys.c mlxsw: spectrum: acl: Remove mlxsw_afk_encode() block range args and key/mask check 2018-11-15 14:43:43 -08:00
core_acl_flex_keys.h mlxsw: spectrum_acl: Add Spectrum-2 keys 2018-12-11 23:01:33 -08:00
core_hwmon.c mlxsw: core: Fix use-after-free when flashing firmware during init 2018-10-17 22:25:45 -07:00
core_thermal.c mlxsw: core: Extend cooling device with cooling levels 2018-11-20 10:31:15 -08:00
core.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-12-20 11:53:36 -08:00
core.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-12-20 11:53:36 -08:00
emad.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
i2c.c mlxsw: remove unused arrays mlxsw_i2c_driver_name and mlxsw_pci_driver_name 2018-08-10 10:23:51 -07:00
i2c.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
ib.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
item.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
Kconfig mlxsw: spectrum: Add VXLAN dependency for spectrum 2019-01-08 16:53:54 -05:00
Makefile mlxsw: spectrum_acl: Introduce Bloom filter 2018-12-16 15:20:33 -08:00
minimal.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
pci_hw.h mlxsw: pci: Increase PCI SW reset timeout 2019-01-18 15:12:16 -08:00
pci.c mlxsw: pci: Return error on PCI reset timeout 2019-01-18 15:12:16 -08:00
pci.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
port.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
reg.h mlxsw: reg: Activate Bloom filter 2018-12-16 15:20:34 -08:00
resources.h mlxsw: resources: Add Spectrum-2 Bloom filter resource 2018-12-16 15:20:33 -08:00
spectrum1_acl_tcam.c mlxsw: spectrum_acl: Support rule creation without action creation 2018-12-11 23:01:33 -08:00
spectrum1_kvdl.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum1_mr_tcam.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum2_acl_tcam.c mlxsw: spectrum_acl: Add replace rule action operation 2018-12-11 23:01:33 -08:00
spectrum2_kvdl.c mlxsw: spectrum: Add a new type of KVD linear record 2018-10-11 10:08:22 -07:00
spectrum2_mr_tcam.c mlxsw: spectrum_router: Add Multicast routing support for Spectrum-2 2018-12-11 23:01:33 -08:00
spectrum_acl_atcam.c mlxsw: spectrum_acl: Update Bloom filter on eRP transitions 2018-12-16 15:20:34 -08:00
spectrum_acl_bloom_filter.c mlxsw: spectrum_acl: Add Bloom filter handling 2018-12-16 15:20:34 -08:00
spectrum_acl_ctcam.c mlxsw: spectrum_acl: Add cleanup after C-TCAM update error condition 2019-01-08 16:53:53 -05:00
spectrum_acl_erp.c mlxsw: spectrum_acl: Remove ASSERT_RTNL()s in module removal flow 2019-01-08 16:53:53 -05:00
spectrum_acl_flex_actions.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_acl_flex_actions.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_acl_flex_keys.c mlxsw: spectrum_acl: Add Spectrum-2 keys 2018-12-11 23:01:33 -08:00
spectrum_acl_tcam.c mlxsw: spectrum_acl: Limit priority value 2018-12-11 23:01:33 -08:00
spectrum_acl_tcam.h mlxsw: spectrum_acl: Update Bloom filter on eRP transitions 2018-12-16 15:20:34 -08:00
spectrum_acl.c mlxsw: spectrum_acl: Support rule creation without action creation 2018-12-11 23:01:33 -08:00
spectrum_buffers.c mlxsw: spectrum_buffers: Tweak SBMM configuration 2018-09-20 07:46:01 -07:00
spectrum_cnt.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_cnt.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_dcb.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_dpipe.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_dpipe.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_fid.c mlxsw: spectrum_fid: Update dummy FID index 2019-01-18 15:12:16 -08:00
spectrum_flower.c mlxsw: spectrum_acl: Support rule creation without action creation 2018-12-11 23:01:33 -08:00
spectrum_ipip.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_ipip.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_kvdl.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_mr_tcam.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_mr_tcam.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_mr.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_mr.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_nve_vxlan.c mlxsw: spectrum_nve: Add mlxsw_sp_nve_ops.fdb_clear_offload 2018-12-07 12:59:08 -08:00
spectrum_nve.c mlxsw: spectrum_nve: Replace error code with EINVAL 2019-01-08 16:53:54 -05:00
spectrum_nve.h mlxsw: spectrum_nve: Add mlxsw_sp_nve_ops.fdb_clear_offload 2018-12-07 12:59:08 -08:00
spectrum_qdisc.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_router.c mlxsw: spectrum: Replace hard-coded default VID with a define 2018-12-20 15:48:54 -08:00
spectrum_router.h mlxsw: spectrum: Move L3 protocol and address definitions to global header file 2018-10-11 10:08:22 -07:00
spectrum_span.c net: Add netif_is_gretap()/netif_is_ip6gretap() 2018-12-10 15:53:04 -08:00
spectrum_span.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_switchdev.c mlxsw: spectrum_switchdev: Do not treat static FDB entries as sticky 2019-01-18 15:12:16 -08:00
spectrum_switchdev.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum.c mlxsw: __mlxsw_sp_port_headroom_set(): Fix a use of local variable 2019-02-17 10:13:46 -08:00
spectrum.h mlxsw: spectrum: Switch to VID 4095 as default VID 2018-12-20 15:48:54 -08:00
switchib.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
switchx2.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
trap.h mlxsw: spectrum: Add trap for decapsulated ARP packets 2018-12-18 09:17:38 -08:00
txheader.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00