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>
This commit is contained in:

committed by
Saeed Mahameed

parent
581fdddee4
commit
788a821076
@@ -373,7 +373,8 @@ struct mlx5_ifc_fpga_destroy_qp_out_bits {
|
||||
struct mlx5_ifc_ipsec_extended_cap_bits {
|
||||
u8 encapsulation[0x20];
|
||||
|
||||
u8 reserved_0[0x15];
|
||||
u8 reserved_0[0x14];
|
||||
u8 rx_no_trailer[0x1];
|
||||
u8 ipv4_fragment[0x1];
|
||||
u8 ipv6[0x1];
|
||||
u8 esn[0x1];
|
||||
@@ -445,4 +446,14 @@ struct mlx5_ifc_fpga_ipsec_cmd_resp {
|
||||
u8 reserved[24];
|
||||
} __packed;
|
||||
|
||||
enum mlx5_ifc_fpga_ipsec_cap {
|
||||
MLX5_FPGA_IPSEC_CAP_NO_TRAILER = BIT(0),
|
||||
};
|
||||
|
||||
struct mlx5_ifc_fpga_ipsec_cmd_cap {
|
||||
__be32 cmd;
|
||||
__be32 flags;
|
||||
u8 reserved[24];
|
||||
} __packed;
|
||||
|
||||
#endif /* MLX5_IFC_FPGA_H */
|
||||
|
Reference in New Issue
Block a user