aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/accel
diff options
context:
space:
mode:
authorYossi Kuperman <yossiku@mellanox.com>2017-10-22 19:45:45 +0300
committerSaeed Mahameed <saeedm@mellanox.com>2018-03-07 15:53:18 -0800
commit788a8210764ce2977095010931959c87b60c2f51 (patch)
tree96d961776baccf9e6d88f6b6283e4fa1d7b307af /drivers/net/ethernet/mellanox/mlx5/core/accel
parentnet/mlx5: IPSec, Generalize sandbox QP commands (diff)
downloadlinux-dev-788a8210764ce2977095010931959c87b60c2f51.tar.xz
linux-dev-788a8210764ce2977095010931959c87b60c2f51.zip
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>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/accel')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.h b/drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.h
index 67cda8871f5a..4da9611a753d 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.h
@@ -43,6 +43,7 @@ enum {
MLX5_ACCEL_IPSEC_IPV6 = BIT(2),
MLX5_ACCEL_IPSEC_ESP = BIT(3),
MLX5_ACCEL_IPSEC_LSO = BIT(4),
+ MLX5_ACCEL_IPSEC_NO_TRAILER = BIT(5),
};
#define MLX5_IPSEC_SADB_IP_AH BIT(7)
@@ -55,6 +56,7 @@ enum {
enum {
MLX5_IPSEC_CMD_ADD_SA = 0,
MLX5_IPSEC_CMD_DEL_SA = 1,
+ MLX5_IPSEC_CMD_SET_CAP = 5,
};
enum mlx5_accel_ipsec_enc_mode {