Skip to content

Commit 91a7d4b

Browse files
nathanchancekuba-moo
authored andcommitted
mlxsw: spectrum_qdisc: Fix 64-bit division error in mlxsw_sp_qdisc_tbf_rate_kbps
When building arm32 allmodconfig: ERROR: "__aeabi_uldivmod" [drivers/net/ethernet/mellanox/mlxsw/mlxsw_spectrum.ko] undefined! rate_bytes_ps has type u64, we need to use a 64-bit division helper to avoid a build error. Fixes: a44f58c ("mlxsw: spectrum_qdisc: Support offloading of TBF Qdisc") Signed-off-by: Nathan Chancellor <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Tested-by: Ido Schimmel <[email protected]> Acked-by: Jiri Pirko <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent b5ce31b commit 91a7d4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ mlxsw_sp_qdisc_tbf_rate_kbps(struct tc_tbf_qopt_offload_replace_params *p)
614614
/* TBF interface is in bytes/s, whereas Spectrum ASIC is configured in
615615
* Kbits/s.
616616
*/
617-
return p->rate.rate_bytes_ps / 1000 * 8;
617+
return div_u64(p->rate.rate_bytes_ps, 1000) * 8;
618618
}
619619

620620
static int

0 commit comments

Comments
 (0)