OSDN Git Service

net: mvneta: Add TC traffic shaping offload
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Fri, 26 Nov 2021 11:20:56 +0000 (12:20 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Nov 2021 12:05:52 +0000 (12:05 +0000)
commit2551dc9e398c37a15e52122d385c29a8b06be45f
tree668a4d90feac8dd4e2a4ffd12037cf5314b5a526
parente9f7099d0730341b24c057acbf545dd019581db6
net: mvneta: Add TC traffic shaping offload

The mvneta controller is able to do some tocken-bucket per-queue traffic
shaping. This commit adds support for setting these using the TC mqprio
interface.

The token-bucket parameters are customisable, but the current
implementation configures them to have a 10kbps resolution for the
rate limitation, since it allows to cover the whole range of max_rate
values from 10kbps to 5Gbps with 10kbps increments.

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvneta.c