]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Set ECN for received packets using CQE indication
authorNatali Shechtman <natali@mellanox.com>
Tue, 20 Mar 2018 15:15:31 +0000 (17:15 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 6 Sep 2018 04:14:57 +0000 (21:14 -0700)
commit8e6aee338ea7eaa218a253e064e8bf69a3755549
treed73a0c6ba608ea7072f43edc91bee46852431ec5
parent213b29fc84ad39d40bf97f25f03403c6fccecbf7
net/mlx5e: Set ECN for received packets using CQE indication

In multi-host (MH) NIC scheme, a single HW port serves multiple hosts
or sockets on the same host.
The HW uses a mechanism in the PCIe buffer which monitors
the amount of consumed PCIe buffers per host.
On a certain configuration, under congestion,
the HW emulates a switch doing ECN marking on packets using ECN
indication on the completion descriptor (CQE).

The driver needs to set the ECN bits on the packet SKB,
such that the network stack can react on that, this commit does that.

Signed-off-by: Natali Shechtman <natali@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
drivers/net/ethernet/mellanox/mlx5/core/en_stats.h