net:qos: police action offloading parameter 'burst' change to the original value
Since 'tcfp_burst' with TICK factor, driver side always need to recover it to the original value, this patch moves the generic calculation and recover to the 'burst' original value before offloading to device driver. Signed-off-by: Po Liu <po.liu@nxp.com> Acked-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -746,9 +746,7 @@ static int felix_port_policer_add(struct dsa_switch *ds, int port,
|
||||
struct ocelot *ocelot = ds->priv;
|
||||
struct ocelot_policer pol = {
|
||||
.rate = div_u64(policer->rate_bytes_per_sec, 1000) * 8,
|
||||
.burst = div_u64(policer->rate_bytes_per_sec *
|
||||
PSCHED_NS2TICKS(policer->burst),
|
||||
PSCHED_TICKS_PER_SEC),
|
||||
.burst = policer->burst,
|
||||
};
|
||||
|
||||
return ocelot_port_policer_add(ocelot, port, &pol);
|
||||
|
Reference in New Issue
Block a user