OpenCloudOS-Kernel/include/linux/mlx5
Eli Britstein 97417f6182 net/mlx5e: Fix GRE key by controlling port tunnel entropy calculation
Flow entropy is calculated on the inner packet headers and used for
flow distribution in processing, routing etc. For GRE-type
encapsulations the entropy value is placed in the eight LSB of the key
field in the GRE header as defined in NVGRE RFC 7637. For UDP based
encapsulations the entropy value is placed in the source port of the
UDP header.
The hardware may support entropy calculation specifically for GRE and
for all tunneling protocols. With commit df2ef3bff1 ("net/mlx5e: Add
GRE protocol offloading") GRE is offloaded, but the hardware is
configured by default to calculate flow entropy so packets transmitted
on the wire have a wrong key. To support UDP based tunnels (i.e VXLAN),
GRE (i.e. no flow entropy) and NVGRE (i.e. with flow entropy) the
hardware behaviour must be controlled by the driver.

Ensure port entropy calculation is enabled for offloaded VXLAN tunnels
and disable port entropy calculation in the presence of offloaded GRE
tunnels by monitoring the presence of entropy enabling tunnels (i.e
VXLAN) and entropy disabing tunnels (i.e GRE).

Fixes: df2ef3bff1 ("net/mlx5e: Add GRE protocol offloading")
Signed-off-by: Eli Britstein <elibr@mellanox.com>
Reviewed-by: Oz Shlomo <ozsh@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
2019-02-22 13:38:23 -08:00
..
accel.h net/mlx5: IPSec, Add support for ESN 2018-03-07 15:54:36 -08:00
cmd.h
cq.h net/mlx5e: Use CQE padding for Ethernet CQs 2018-12-11 14:52:20 -08:00
device.h net/mlx5: Add host params change event 2019-02-14 12:14:42 -08:00
doorbell.h IB/mlx5: Use blue flame register allocator in mlx5_ib 2017-01-09 20:25:08 +02:00
driver.h net/mlx5: E-Switch, Consider ECPF vport depends on eswitch ownership 2019-02-15 17:25:58 -08:00
eq.h net/mlx5: EQ, Introduce atomic notifier chain subscription API 2018-11-26 13:39:33 -08:00
eswitch.h net/mlx5: E-Switch, Centralize repersentor reg/unreg to eswitch driver 2019-02-15 17:25:58 -08:00
fs.h net/mlx5: Support extended destination format in flow steering command 2018-12-10 14:00:08 -08:00
fs_helpers.h {net,IB}/mlx5: Add ipsec helper 2018-04-04 12:06:27 -06:00
mlx5_ifc.h net/mlx5: Introduce tunnel entropy control in PCMR register 2019-02-22 13:38:23 -08:00
mlx5_ifc_fpga.h net/mlx5: Accel, add TLS rx offload routines 2018-07-16 00:13:11 -07:00
port.h net/mlx5e: Fix GRE key by controlling port tunnel entropy calculation 2019-02-22 13:38:23 -08:00
qp.h net/mlx5: Add interface to hold and release core resources 2018-11-12 22:20:29 +02:00
transobj.h net/mlx5: Move SRQ functions to RDMA part 2018-12-04 09:14:30 +02:00
vport.h net/mlx5: E-Switch, Consider ECPF vport depends on eswitch ownership 2019-02-15 17:25:58 -08:00