linux/drivers/net/ethernet/marvell
Hariprasad Kelam bb0d96ebe5 octeontx2-pf: tc: fix egress ratelimiting
The egress rate calculation computes an incorrect mantissa and exponent,
causing up to ~50% deviation from the configured rate at lower speeds.

Rework the computation to follow the hardware rate formula:

	rate = 2 * (1 + mantissa/256) * 2^exp / (1 << div_exp)

Keep div_exp = 0 and derive exp and mantissa from half of the requested
rate. Rates below 2 Mbps are floored to the smallest encodable step
(exp = 0, mantissa = 0).

Fixes: e638a83f16 ("octeontx2-pf: TC_MATCHALL egress ratelimiting offload")
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Signed-off-by: Nitin Shetty J <nshettyj@marvell.com>
Link: https://patch.msgid.link/20260717084349.2227796-1-nshettyj@marvell.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
History 2026-07-23 08:30:07 -07:00
..
mvpp2 net: mvpp2: build skb from XDP-adjusted data on XDP_PASS 2026-06-11 09:57:31 +02:00
octeon_ep octeon_ep: Remove unnecessary semicolons in octep_oq_drop_rx() 2026-04-12 13:50:13 -07:00
octeon_ep_vf octeon_ep_vf: add NULL check for napi_build_skb() 2026-04-13 15:40:49 -07:00
octeontx2 octeontx2-pf: tc: fix egress ratelimiting 2026-07-23 08:30:07 -07:00
prestera net: marvell: prestera: initialize err in prestera_port_sfp_bind 2026-06-21 14:23:53 -07:00
Kconfig net: phy: remove Kconfig symbol MDIO_DEVRES 2025-05-14 19:12:19 -07:00
Makefile octeon_ep_vf: Add driver framework and device initialization 2024-02-12 09:01:52 +00:00
mv643xx_eth.c net: mv643xx: fix OF node refcount 2026-06-04 18:40:31 -07:00
mvmdio.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
mvneta.c net: mvneta: re-enable percpu interrupt on resume 2026-06-24 18:59:20 -07:00
mvneta_bm.c net: ethernet: Switch back to struct platform_driver::remove() 2024-10-04 16:39:56 -07:00
mvneta_bm.h net: Fix typos 2025-07-25 10:29:07 -07:00
pxa168_eth.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
skge.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
skge.h net: marvell: remove leading spaces before tabs 2021-05-19 12:17:31 -07:00
sky2.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
sky2.h sky2: Make sure there is at least one frag_addr available 2023-10-02 08:03:52 +01:00