• Ido Schimmel's avatar
    mlxsw: spectrum: Allow packets to be trapped from any PG · 9ffcc372
    Ido Schimmel authored
    When packets enter the device they are classified to a priority group
    (PG) buffer based on their PCP value. After their egress port and
    traffic class are determined they are moved to the switch's shared
    buffer and await transmission, if:
    
    (Ingress{Port}.Usage < Thres && Ingress{Port,PG}.Usage < Thres &&
     Egress{Port}.Usage < Thres && Egress{Port,TC}.Usage < Thres)
    ||
    (Ingress{Port}.Usage < Min || Ingress{Port,PG} < Min ||
     Egress{Port}.Usage < Min || Egress{Port,TC}.Usage < Min)
    
    Packets scheduled to transmission through CPU port (trapped to CPU) use
    traffic class 7, which has a zero maximum and minimum quotas. However,
    when such packets arrive from PG 0 they are admitted to the shared
    buffer as PG 0 has a non-zero minimum quota.
    
    Allow all packets to be trapped to the CPU - regardless of the PG they
    were classified to - by assigning a 10KB minimum quota for CPU port and
    TC7.
    
    Fixes: 8e8dfe9f ("mlxsw: spectrum: Add IEEE 802.1Qaz ETS support")
    Reported-by: default avatarTamir Winetroub <tamirw@mellanox.com>
    Tested-by: default avatarTamir Winetroub <tamirw@mellanox.com>
    Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
    Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    9ffcc372
spectrum_buffers.c 27.8 KB