]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Support DSCP trust state to Ethernet's IP packet on SQ
authorHuy Nguyen <huyn@mellanox.com>
Tue, 18 Jul 2017 21:34:51 +0000 (16:34 -0500)
committerSaeed Mahameed <saeedm@mellanox.com>
Sun, 5 Nov 2017 04:26:42 +0000 (21:26 -0700)
commit41196ffcf7285afe0b90e91e5f2bc2052dd9562e
tree2c778a2fd92a9caac04a9d0927b3f65bb62ff2fb
parent830f5c61f42d23944dceb056f0dff311e0751385
net/mlx5e: Support DSCP trust state to Ethernet's IP packet on SQ

If the port is in DSCP trust state, packets are placed in the right
priority queue based on the dscp value. This is done by selecting
the transmit queue based on the dscp of the skb.

Until now select_queue honors priority only from the vlan header.
However that is not sufficient in cases where port trust state is DSCP
mode as packet might not even contain vlan header. Therefore if the port
is in dscp trust state and vport's min inline mode is not NONE,
copy the IP header to the eseg's inline header if the skb has it.
This is done by changing the transmit queue sq's min inline mode to L3.
Note that the min inline mode of sqs that belong to other features such
as xdpsq, icosq are not modified.

Signed-off-by: Huy Nguyen <huyn@mellanox.com>
Reviewed-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_common.c
drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c