Home
last modified time | relevance | path

Searched hist:e0a7683d30e91e30ee6cf96314ae58a0314a095e (Results 1 – 1 of 1) sorted by relevance

/linux/net/sched/
H A Dsch_cbs.cdiff e0a7683d30e91e30ee6cf96314ae58a0314a095e Mon Apr 08 19:12:18 CEST 2019 Leandro Dorileo <leandro.maciel.dorileo@intel.com> net/sched: cbs: fix port_rate miscalculation

The Credit Based Shaper heavily depends on link speed to calculate
the scheduling credits, we can't properly calculate the credits if the
device has failed to report the link speed.

In that case we can't dequeue packets assuming a wrong port rate that will
result into an inconsistent credit distribution.

This patch makes sure we fail to dequeue case:

1) __ethtool_get_link_ksettings() reports error or 2) the ethernet driver
failed to set the ksettings' speed value (setting link speed to
SPEED_UNKNOWN).

Additionally we properly re calculate the port rate whenever the link speed
is changed.

Fixes: 3d0bd028ffb4a ("net/sched: Add support for HW offloading for CBS")
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
Reviewed-by: Vedang Patel <vedang.patel@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>