]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: IPSec, Add support for ESP trailer removal by hardware
authorYossi Kuperman <yossiku@mellanox.com>
Sun, 22 Oct 2017 16:45:45 +0000 (19:45 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Wed, 7 Mar 2018 23:53:18 +0000 (15:53 -0800)
commit41450a7fd5496a371ffb12aedf83f0db95d9e11b
tree96d961776baccf9e6d88f6b6283e4fa1d7b307af
parentfdcf3ab300cfc4c0df5cc5e4a05e1eccc9510b27
net/mlx5e: IPSec, Add support for ESP trailer removal by hardware

Current hardware decrypts and authenticates incoming ESP packets.
Subsequently, the software extracts the nexthdr field, truncates the
trailer and adjusts csum accordingly.

With this patch and a capable device, the trailer is being removed
by the hardware and the nexthdr field is conveyed via PET. This way
we avoid both the need to access the trailer (cache miss) and to
compute its relative checksum, which significantly improve
the performance.

Experiment shows that trailer removal improves the performance by
2Gbps, (netperf). Both forwarding and host-to-host configurations.

Signed-off-by: Yossi Kuperman <yossiku@mellanox.com>
Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.h
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.h
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c
drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c
include/linux/mlx5/mlx5_ifc_fpga.h