History

net/mlx5: Introduce TLS RX offload hardware bits

Add TLS RX offload related IFC hardware fields and enumerations.

Tariq Toukan committed 6 years ago

Commit ee5cdf71 parent 3df01072 files · +19 −4Browse files

Unified · Split

2 files
  1. include/linux/mlx5/device.h +16 −2
  2. include/linux/mlx5/mlx5_ifc.h +3 −2
include/linux/mlx5/device.h+16−2
@@ -450,10 +450,12 @@ enum { · 449 unmodified lines
450450
451451 enum {
452452 MLX5_OPC_MOD_TLS_TIS_STATIC_PARAMS = 0x1,
453+ MLX5_OPC_MOD_TLS_TIR_STATIC_PARAMS = 0x2,
453454 };
454455
455456 enum {
456457 MLX5_OPC_MOD_TLS_TIS_PROGRESS_PARAMS = 0x1,
458+ MLX5_OPC_MOD_TLS_TIR_PROGRESS_PARAMS = 0x2,
457459 };
458460
459461 enum {
@@ -764,7 +766,7 @@ struct mlx5_err_cqe { · 304 unmodified lines
764766 };
765767
766768 struct mlx5_cqe64 {
767− u8 outer_l3_tunneled;
769+ u8 tls_outer_l3_tunneled;
768770 u8 rsvd0;
769771 __be16 wqe_id;
770772 u8 lro_tcppsh_abort_dupack;
@@ -854,7 +856,12 @@ static inline u8 get_cqe_l3_hdr_type(struct mlx5_cqe64 *cqe) · 83 unmodified lines
854856
855857 static inline bool cqe_is_tunneled(struct mlx5_cqe64 *cqe)
856858 {
857− return cqe->outer_l3_tunneled & 0x1;
859+ return cqe->tls_outer_l3_tunneled & 0x1;
860+}
861+
862+static inline u8 get_cqe_tls_offload(struct mlx5_cqe64 *cqe)
863+{
864+ return (cqe->tls_outer_l3_tunneled >> 3) & 0x3;
858865 }
859866
860867 static inline bool cqe_has_vlan(struct mlx5_cqe64 *cqe)
@@ -942,6 +949,13 @@ enum { · 81 unmodified lines
942949 CQE_L4_OK = 1 << 2,
943950 };
944951
952+enum {
953+ CQE_TLS_OFFLOAD_NOT_DECRYPTED = 0x0,
954+ CQE_TLS_OFFLOAD_DECRYPTED = 0x1,
955+ CQE_TLS_OFFLOAD_RESYNC = 0x2,
956+ CQE_TLS_OFFLOAD_ERROR = 0x3,
957+};
958+
945959 struct mlx5_sig_err_cqe {
946960 u8 rsvd0[16];
947961 __be32 expected_trans_sig;
include/linux/mlx5/mlx5_ifc.h+3−2
@@ -1491,7 +1491,7 @@ struct mlx5_ifc_cmd_hca_cap_bits { · 1490 unmodified lines
14911491
14921492 u8 reserved_at_480[0x1];
14931493 u8 tls_tx[0x1];
1494− u8 reserved_at_482[0x1];
1494+ u8 tls_rx[0x1];
14951495 u8 log_max_l2_table[0x5];
14961496 u8 reserved_at_488[0x8];
14971497 u8 log_uar_page_sz[0x10];
@@ -3136,7 +3136,8 @@ struct mlx5_ifc_tirc_bits { · 1638 unmodified lines
31363136 u8 reserved_at_0[0x20];
31373137
31383138 u8 disp_type[0x4];
3139− u8 reserved_at_24[0x1c];
3139+ u8 tls_en[0x1];
3140+ u8 reserved_at_25[0x1b];
31403141
31413142 u8 reserved_at_40[0x40];
31423143