• Felix Fietkau's avatar
    net: ethernet: mtk_eth_soc: implement multi-queue support for per-port queues · f63959c7
    Felix Fietkau authored
    When sending traffic to multiple ports with different link speeds, queued
    packets to one port can drown out tx to other ports.
    In order to better handle transmission to multiple ports, use the hardware
    shaper feature to implement weighted fair queueing between ports.
    Weight and maximum rate are automatically adjusted based on the link speed
    of the port.
    The first 3 queues are unrestricted and reserved for non-DSA direct tx on
    GMAC ports. The following queues are automatically assigned by the MTK DSA
    tag driver based on the target port number.
    The PPE offload code configures the queues for offloaded traffic in the same
    way.
    This feature is only supported on devices supporting QDMA. All queues still
    share the same DMA ring and descriptor pool.
    Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
    Link: https://lore.kernel.org/r/20221116080734.44013-5-nbd@nbd.nameSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    f63959c7
mtk_eth_soc.h 39.1 KB