]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: Configure descriptor buffers
authorPetr Machata <petrm@nvidia.com>
Mon, 2 May 2022 08:49:24 +0000 (11:49 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 3 May 2022 10:10:50 +0000 (12:10 +0200)
commit9fe16a0418e955f92a353b658583690382cb739f
tree856cc498aed96fac2e80b3b5b991ed271e09f746
parent175040e13754a7ec5026896deb26d38476a81539
mlxsw: Configure descriptor buffers

Spectrum machines have two resources related to keeping packets in an
internal buffer: bytes (allocated in cell-sized units) for packet payload,
and descriptors, for keeping metadata. Currently, mlxsw only configures the
bytes part of the resource management.

Spectrum switches permit a full parallel configuration for the descriptor
resources, including port-pool and port-TC-pool quotas. By default, these
are all configured to use pool 14, with an infinite quota. The ingress pool
14 is then infinite in size.

However, egress pool 14 has finite size by default. The size is chip
dependent, but always much lower than what the chip actually permits. As a
result, we can easily construct workloads that exhaust the configured
descriptor limit.

Fix the issue by configuring the egress descriptor pool to be infinite in
size as well. This will maintain the configuration philosophy of the
default configuration, but will unlock all chip resources to be usable.

In the code, include both the configuration of ingress and ingress, mostly
for clarity.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c