Skip to content

Commit 235ff07

Browse files
Paul Blakeykuba-moo
authored andcommitted
net/mlx5e: Rename CHAIN_TO_REG to MAPPED_OBJ_TO_REG
This reg usage is always a mapped object, not necessarily containing chain info. Rename to properly convey what it stores. This patch doesn't change any functionality. Signed-off-by: Paul Blakey <[email protected]> Reviewed-by: Roi Dayan <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 93a1ab2 commit 235ff07

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en/tc/sample.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ sample_modify_hdr_get(struct mlx5_core_dev *mdev, u32 obj_id,
237237
int err;
238238

239239
err = mlx5e_tc_match_to_reg_set(mdev, mod_acts, MLX5_FLOW_NAMESPACE_FDB,
240-
CHAIN_TO_REG, obj_id);
240+
MAPPED_OBJ_TO_REG, obj_id);
241241
if (err)
242242
goto err_set_regc0;
243243

drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1875,7 +1875,7 @@ __mlx5_tc_ct_flow_offload(struct mlx5_tc_ct_priv *ct_priv,
18751875
ct_flow->chain_mapping = chain_mapping;
18761876

18771877
err = mlx5e_tc_match_to_reg_set(priv->mdev, pre_mod_acts, ct_priv->ns_type,
1878-
CHAIN_TO_REG, chain_mapping);
1878+
MAPPED_OBJ_TO_REG, chain_mapping);
18791879
if (err) {
18801880
ct_dbg("Failed to set chain register mapping");
18811881
goto err_mapping;

drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ struct mlx5e_tc_table {
109109
};
110110

111111
struct mlx5e_tc_attr_to_reg_mapping mlx5e_tc_attr_to_reg_mappings[] = {
112-
[CHAIN_TO_REG] = {
112+
[MAPPED_OBJ_TO_REG] = {
113113
.mfield = MLX5_ACTION_IN_FIELD_METADATA_REG_C_0,
114114
.moffset = 0,
115115
.mlen = 16,
@@ -136,7 +136,7 @@ struct mlx5e_tc_attr_to_reg_mapping mlx5e_tc_attr_to_reg_mappings[] = {
136136
* into reg_b that is passed to SW since we don't
137137
* jump between steering domains.
138138
*/
139-
[NIC_CHAIN_TO_REG] = {
139+
[NIC_MAPPED_OBJ_TO_REG] = {
140140
.mfield = MLX5_ACTION_IN_FIELD_METADATA_REG_B,
141141
.moffset = 0,
142142
.mlen = 16,
@@ -1605,7 +1605,7 @@ mlx5e_tc_offload_to_slow_path(struct mlx5_eswitch *esw,
16051605
goto err_get_chain;
16061606

16071607
err = mlx5e_tc_match_to_reg_set(esw->dev, &mod_acts, MLX5_FLOW_NAMESPACE_FDB,
1608-
CHAIN_TO_REG, chain_mapping);
1608+
MAPPED_OBJ_TO_REG, chain_mapping);
16091609
if (err)
16101610
goto err_reg_set;
16111611

drivers/net/ethernet/mellanox/mlx5/core/en_tc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ void mlx5e_tc_update_neigh_used_value(struct mlx5e_neigh_hash_entry *nhe);
227227
void mlx5e_tc_reoffload_flows_work(struct work_struct *work);
228228

229229
enum mlx5e_tc_attr_to_reg {
230-
CHAIN_TO_REG,
230+
MAPPED_OBJ_TO_REG,
231231
VPORT_TO_REG,
232232
TUNNEL_TO_REG,
233233
CTSTATE_TO_REG,
@@ -236,7 +236,7 @@ enum mlx5e_tc_attr_to_reg {
236236
MARK_TO_REG,
237237
LABELS_TO_REG,
238238
FTEID_TO_REG,
239-
NIC_CHAIN_TO_REG,
239+
NIC_MAPPED_OBJ_TO_REG,
240240
NIC_ZONE_RESTORE_TO_REG,
241241
PACKET_COLOR_TO_REG,
242242
};

drivers/net/ethernet/mellanox/mlx5/core/lib/fs_chains.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ create_chain_restore(struct fs_chain *chain)
214214
struct mlx5_eswitch *esw = chain->chains->dev->priv.eswitch;
215215
u8 modact[MLX5_UN_SZ_BYTES(set_add_copy_action_in_auto)] = {};
216216
struct mlx5_fs_chains *chains = chain->chains;
217-
enum mlx5e_tc_attr_to_reg chain_to_reg;
217+
enum mlx5e_tc_attr_to_reg mapped_obj_to_reg;
218218
struct mlx5_modify_hdr *mod_hdr;
219219
u32 index;
220220
int err;
@@ -242,7 +242,7 @@ create_chain_restore(struct fs_chain *chain)
242242
chain->id = index;
243243

244244
if (chains->ns == MLX5_FLOW_NAMESPACE_FDB) {
245-
chain_to_reg = CHAIN_TO_REG;
245+
mapped_obj_to_reg = MAPPED_OBJ_TO_REG;
246246
chain->restore_rule = esw_add_restore_rule(esw, chain->id);
247247
if (IS_ERR(chain->restore_rule)) {
248248
err = PTR_ERR(chain->restore_rule);
@@ -253,20 +253,20 @@ create_chain_restore(struct fs_chain *chain)
253253
* since we write the metadata to reg_b
254254
* that is passed to SW directly.
255255
*/
256-
chain_to_reg = NIC_CHAIN_TO_REG;
256+
mapped_obj_to_reg = NIC_MAPPED_OBJ_TO_REG;
257257
} else {
258258
err = -EINVAL;
259259
goto err_rule;
260260
}
261261

262262
MLX5_SET(set_action_in, modact, action_type, MLX5_ACTION_TYPE_SET);
263263
MLX5_SET(set_action_in, modact, field,
264-
mlx5e_tc_attr_to_reg_mappings[chain_to_reg].mfield);
264+
mlx5e_tc_attr_to_reg_mappings[mapped_obj_to_reg].mfield);
265265
MLX5_SET(set_action_in, modact, offset,
266-
mlx5e_tc_attr_to_reg_mappings[chain_to_reg].moffset);
266+
mlx5e_tc_attr_to_reg_mappings[mapped_obj_to_reg].moffset);
267267
MLX5_SET(set_action_in, modact, length,
268-
mlx5e_tc_attr_to_reg_mappings[chain_to_reg].mlen == 32 ?
269-
0 : mlx5e_tc_attr_to_reg_mappings[chain_to_reg].mlen);
268+
mlx5e_tc_attr_to_reg_mappings[mapped_obj_to_reg].mlen == 32 ?
269+
0 : mlx5e_tc_attr_to_reg_mappings[mapped_obj_to_reg].mlen);
270270
MLX5_SET(set_action_in, modact, data, chain->id);
271271
mod_hdr = mlx5_modify_header_alloc(chains->dev, chains->ns,
272272
1, modact);

0 commit comments

Comments
 (0)