]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: pci: Avoid flow control for EMAD packets
authorDanielle Ratson <danieller@nvidia.com>
Wed, 5 Jan 2022 10:22:27 +0000 (12:22 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 Jan 2022 15:01:43 +0000 (15:01 +0000)
commit29d4020a73f0f77e4ef4cb9b281380d84ef16141
treef69abeaad052af478ed58b627988d841fcd0406c
parent727576aac6b30bc2e6b950306f1948849caed75f
mlxsw: pci: Avoid flow control for EMAD packets

Locally generated packets ingress the device through its CPU port. When
the CPU port is congested and there are not enough credits in its
headroom buffer, packets can be dropped.

While this might be acceptable for data packets that traverse the
network, configuration packets exchanged between the host and the device
(EMADs) should not be subjected to this flow control.

The "sdq_lp" bit in the SDQ (Send Descriptor Queue) context allows the
host to instruct the device to treat packets sent on this queue as
"local processing" and always process them, regardless of the state of
the CPU port's headroom.

Add the definition of this bit and set it for the dedicated SDQ reserved
for the transmission of EMAD packets. This makes the "local processing"
bit in the WQE (Work Queue Element) redundant, so clear it.

Signed-off-by: Danielle Ratson <danieller@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/cmd.h
drivers/net/ethernet/mellanox/mlxsw/pci.c