On Wed, Feb 24, 2021 at 10:38 PM Simon Horman <[email protected]> wrote:
> From: Yong Xu <[email protected]> > > Correct calculation of burst parameter used when configuring TC policer > action for ingress port-based policing in the case where TC offload is in > use. This now matches the value calculated for the case where TC offload is > not in use. > > The division by 8 is to convert from bits to bytes. > Its unclear why 64 was previously used. > > Fixes: e7f6ba220 ("lib/tc: add ingress ratelimiting support for > tc-offload") > Signed-off-by: Yong Xu <[email protected]> > [simon: reworked changelog] > Signed-off-by: Simon Horman <[email protected]> > Signed-off-by: Louis Peens <[email protected]> > --- > lib/netdev-linux.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c > index 6be23dbee..eb28777f9 100644 > --- a/lib/netdev-linux.c > +++ b/lib/netdev-linux.c > @@ -2572,7 +2572,7 @@ exit: > static struct tc_police > tc_matchall_fill_police(uint32_t kbits_rate, uint32_t kbits_burst) > { > - unsigned int bsize = MIN(UINT32_MAX / 1024, kbits_burst) * 1024 / 64; > + unsigned int bsize = MIN(UINT32_MAX / 1024, kbits_burst) * 1024 / 8; There is any test case for this in ovs? > > unsigned int bps = ((uint64_t) kbits_rate * 1000) / 8; > struct tc_police police; > struct tc_ratespec rate; > -- > 2.20.1 > > _______________________________________________ > dev mailing list > [email protected] > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
