]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_buffers: Assign non-zero quotas to TC 0 of the CPU port
authorIdo Schimmel <idosch@mellanox.com>
Sun, 24 May 2020 21:51:01 +0000 (00:51 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 May 2020 02:32:23 +0000 (19:32 -0700)
commitac082dd977b6b40aa835f0f7f8937f7cdfdcd317
treead4732ebcc1318282e2d95e0d9ad5d0922208332
parentcf9bb64c8a3c8dc574bed674b12dafba415c0583
mlxsw: spectrum_buffers: Assign non-zero quotas to TC 0 of the CPU port

As explained in commit 19e2a40252c5 ("mlxsw: spectrum: Allow packets to
be trapped from any PG"), incoming packets can be admitted to the shared
buffer and forwarded / trapped, 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)

Trapped packets are scheduled to transmission through the CPU port.
Currently, the minimum and maximum quotas of traffic class (TC) 0 of the
CPU port are 0, which means it is not usable.

Assign non-zero quotas to TC 0 of the CPU port, so that it could be
utilized by subsequent patches.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c