|
45 | 45 | #define MLX5_SECTAG_HEADER_SIZE_WITHOUT_SCI 0x8 |
46 | 46 | #define MLX5_SECTAG_HEADER_SIZE_WITH_SCI (MLX5_SECTAG_HEADER_SIZE_WITHOUT_SCI + MACSEC_SCI_LEN) |
47 | 47 |
|
48 | | -/* MACsec RX flow steering */ |
49 | | -#define MLX5_ETH_WQE_FT_META_MACSEC_MASK 0x3E |
50 | | - |
51 | 48 | /* MACsec fs_id handling for steering */ |
52 | | -#define macsec_fs_set_tx_fs_id(fs_id) (MLX5_ETH_WQE_FT_META_MACSEC | (fs_id) << 2) |
53 | 49 | #define macsec_fs_set_rx_fs_id(fs_id) ((fs_id) | BIT(30)) |
54 | 50 |
|
55 | 51 | struct mlx5_sectag_header { |
@@ -597,7 +593,7 @@ static int macsec_fs_tx_setup_fte(struct mlx5_macsec_fs *macsec_fs, |
597 | 593 | MLX5_SET(fte_match_param, spec->match_criteria, misc_parameters_2.metadata_reg_a, |
598 | 594 | MLX5_ETH_WQE_FT_META_MACSEC_MASK); |
599 | 595 | MLX5_SET(fte_match_param, spec->match_value, misc_parameters_2.metadata_reg_a, |
600 | | - macsec_fs_set_tx_fs_id(id)); |
| 596 | + MLX5_MACSEC_TX_METADATA(id)); |
601 | 597 |
|
602 | 598 | *fs_id = id; |
603 | 599 | flow_act->crypto.type = MLX5_FLOW_CONTEXT_ENCRYPT_DECRYPT_TYPE_MACSEC; |
@@ -2219,8 +2215,10 @@ static int mlx5_macsec_fs_add_roce_rule_tx(struct mlx5_macsec_fs *macsec_fs, u32 |
2219 | 2215 |
|
2220 | 2216 | MLX5_SET(set_action_in, action, action_type, MLX5_ACTION_TYPE_SET); |
2221 | 2217 | MLX5_SET(set_action_in, action, field, MLX5_ACTION_IN_FIELD_METADATA_REG_A); |
2222 | | - MLX5_SET(set_action_in, action, data, macsec_fs_set_tx_fs_id(fs_id)); |
2223 | | - MLX5_SET(set_action_in, action, offset, 0); |
| 2218 | + MLX5_SET(set_action_in, action, data, |
| 2219 | + mlx5_macsec_fs_set_tx_fs_id(fs_id)); |
| 2220 | + MLX5_SET(set_action_in, action, offset, |
| 2221 | + MLX5_ETH_WQE_FT_META_MACSEC_SHIFT); |
2224 | 2222 | MLX5_SET(set_action_in, action, length, 32); |
2225 | 2223 |
|
2226 | 2224 | modify_hdr = mlx5_modify_header_alloc(mdev, MLX5_FLOW_NAMESPACE_RDMA_TX_MACSEC, |
|
0 commit comments