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)
commitf007c13d4ad62f494c83897eda96437005df4a91
treed73a0c6ba608ea7072f43edc91bee46852431ec5
parent64109f1dc41f25f4a9c6b114e04b6266bf4128ad
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