linux/drivers/net/ethernet/intel/i40e
Michal Jaron 198eb7e1b8 i40e: Fix set max_tx_rate when it is lower than 1 Mbps
While converting max_tx_rate from bytes to Mbps, this value was set to 0,
if the original value was lower than 125000 bytes (1 Mbps). This would
cause no transmission rate limiting to occur. This happened due to lack of
check of max_tx_rate against the 1 Mbps value for max_tx_rate and the
following division by 125000. Fix this issue by adding a helper
i40e_bw_bytes_to_mbits() which sets max_tx_rate to minimum usable value of
50 Mbps, if its value is less than 1 Mbps, otherwise do the required
conversion by dividing by 125000.

Fixes: 5ecae4120a ("i40e: Refactor VF BW rate limiting")
Signed-off-by: Michal Jaron <michalx.jaron@intel.com>
Signed-off-by: Andrii Staikov <andrii.staikov@intel.com>
Tested-by: Bharathi Sreenivas <bharathi.sreenivas@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2022-09-19 14:13:06 -07:00
..
Makefile
i40e.h i40e: Refactor tc mqprio checks 2022-07-22 10:01:00 -07:00
i40e_adminq.c i40e: Add new versions of send ASQ command functions 2022-02-03 13:13:50 -08:00
i40e_adminq.h
i40e_adminq_cmd.h i40e: Update FW API version 2022-01-07 09:04:21 -08:00
i40e_alloc.h
i40e_client.c i40e: Fix kernel crash during module removal 2022-09-02 11:15:36 -07:00
i40e_common.c i40e: Add Ethernet Connection X722 for 10GbE SFP+ support 2022-04-12 11:07:05 -07:00
i40e_dcb.c intel: clean up mismatched header comments 2021-03-23 11:34:02 -07:00
i40e_dcb.h
i40e_dcb_nl.c intel: clean up mismatched header comments 2021-03-23 11:34:02 -07:00
i40e_ddp.c intel: clean up mismatched header comments 2021-03-23 11:34:02 -07:00
i40e_debugfs.c i40e: Add tx_stopped stat 2022-04-12 11:07:05 -07:00
i40e_devids.h i40e: Add Ethernet Connection X722 for 10GbE SFP+ support 2022-04-12 11:07:05 -07:00
i40e_diag.c
i40e_diag.h
i40e_ethtool.c i40e: Fix incorrect address type for IPv6 flow rules 2022-08-24 12:21:31 -07:00
i40e_hmc.c
i40e_hmc.h
i40e_lan_hmc.c intel: clean up mismatched header comments 2021-03-23 11:34:02 -07:00
i40e_lan_hmc.h
i40e_main.c i40e: Fix set max_tx_rate when it is lower than 1 Mbps 2022-09-19 14:13:06 -07:00
i40e_nvm.c i40e: little endian only valid checksums 2022-03-17 07:40:46 -07:00
i40e_osdep.h
i40e_prototype.h i40e: Add new version of i40e_aq_add_macvlan function 2022-02-03 13:13:51 -08:00
i40e_ptp.c i40e: convert .adjfreq to .adjfine 2022-07-28 10:59:38 -07:00
i40e_register.h i40e: Fix dropped jumbo frames statistics 2022-06-30 13:09:00 -07:00
i40e_status.h i40e: Remove non-inclusive language 2022-01-07 09:04:21 -08:00
i40e_trace.h
i40e_txrx.c i40e: Fix ADQ rate limiting for PF 2022-09-02 11:00:25 -07:00
i40e_txrx.h i40e: Add tx_stopped stat 2022-04-12 11:07:05 -07:00
i40e_txrx_common.h i40e, xsk: Terminate Rx side of NAPI when XSK Rx queue gets full 2022-04-15 21:10:41 +02:00
i40e_type.h i40e: Fix dropped jumbo frames statistics 2022-06-30 13:09:00 -07:00
i40e_virtchnl_pf.c i40e: Fix VF set max MTU size 2022-09-19 14:13:06 -07:00
i40e_virtchnl_pf.h i40e: stop disabling VFs due to PF error responses 2022-03-08 13:31:08 -08:00
i40e_xsk.c i40e: read the XDP program once per NAPI 2022-06-24 16:37:12 -07:00
i40e_xsk.h xsk: Wipe out dead zero_copy_allocator declarations 2021-12-14 00:24:24 +01:00