Skip to content

Commit 24ee865

Browse files
committed
Merge branch 'nfp-type'
Jakub Kicinski says: ==================== net: rename flow_action stats and set NFP type Jiri, I hope this is okay with you, I just dropped the "type" from the helper and value names, and now things should be able to fit on a line, within 80 characters. Second patch makes the NFP able to offload DELAYED stats, which is the type it supports. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 362d3d8 + 36b4b92 commit 24ee865

File tree

13 files changed

+49
-52
lines changed

13 files changed

+49
-52
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ static int bnxt_tc_parse_actions(struct bnxt *bp,
300300
return -EINVAL;
301301
}
302302

303-
if (!flow_action_basic_hw_stats_types_check(flow_action, extack))
303+
if (!flow_action_basic_hw_stats_check(flow_action, extack))
304304
return -EOPNOTSUPP;
305305

306306
flow_action_for_each(i, act, flow_action) {

drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ int cxgb4_validate_flow_actions(struct net_device *dev,
553553
bool act_vlan = false;
554554
int i;
555555

556-
if (!flow_action_basic_hw_stats_types_check(actions, extack))
556+
if (!flow_action_basic_hw_stats_check(actions, extack))
557557
return -EOPNOTSUPP;
558558

559559
flow_action_for_each(i, act, actions) {

drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,7 +1082,7 @@ static int mvpp2_port_c2_tcam_rule_add(struct mvpp2_port *port,
10821082
u8 qh, ql, pmap;
10831083
int index, ctx;
10841084

1085-
if (!flow_action_basic_hw_stats_types_check(&rule->flow->action, NULL))
1085+
if (!flow_action_basic_hw_stats_check(&rule->flow->action, NULL))
10861086
return -EOPNOTSUPP;
10871087

10881088
memset(&c2, 0, sizeof(c2));
@@ -1308,7 +1308,7 @@ static int mvpp2_cls_rfs_parse_rule(struct mvpp2_rfs_rule *rule)
13081308
struct flow_rule *flow = rule->flow;
13091309
struct flow_action_entry *act;
13101310

1311-
if (!flow_action_basic_hw_stats_types_check(&rule->flow->action, NULL))
1311+
if (!flow_action_basic_hw_stats_check(&rule->flow->action, NULL))
13121312
return -EOPNOTSUPP;
13131313

13141314
act = &flow->action.entries[0];

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3180,8 +3180,8 @@ static int parse_tc_nic_actions(struct mlx5e_priv *priv,
31803180
if (!flow_action_has_entries(flow_action))
31813181
return -EINVAL;
31823182

3183-
if (!flow_action_hw_stats_types_check(flow_action, extack,
3184-
FLOW_ACTION_HW_STATS_TYPE_DELAYED_BIT))
3183+
if (!flow_action_hw_stats_check(flow_action, extack,
3184+
FLOW_ACTION_HW_STATS_DELAYED_BIT))
31853185
return -EOPNOTSUPP;
31863186

31873187
attr->flow_tag = MLX5_FS_DEFAULT_FLOW_TAG;
@@ -3675,8 +3675,8 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv,
36753675
if (!flow_action_has_entries(flow_action))
36763676
return -EINVAL;
36773677

3678-
if (!flow_action_hw_stats_types_check(flow_action, extack,
3679-
FLOW_ACTION_HW_STATS_TYPE_DELAYED_BIT))
3678+
if (!flow_action_hw_stats_check(flow_action, extack,
3679+
FLOW_ACTION_HW_STATS_DELAYED_BIT))
36803680
return -EOPNOTSUPP;
36813681

36823682
flow_action_for_each(i, act, flow_action) {
@@ -4510,7 +4510,7 @@ static int scan_tc_matchall_fdb_actions(struct mlx5e_priv *priv,
45104510
return -EOPNOTSUPP;
45114511
}
45124512

4513-
if (!flow_action_basic_hw_stats_types_check(flow_action, extack))
4513+
if (!flow_action_basic_hw_stats_check(flow_action, extack))
45144514
return -EOPNOTSUPP;
45154515

45164516
flow_action_for_each(i, act, flow_action) {

drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ static int mlxsw_sp_flower_parse_actions(struct mlxsw_sp *mlxsw_sp,
2626

2727
if (!flow_action_has_entries(flow_action))
2828
return 0;
29-
if (!flow_action_mixed_hw_stats_types_check(flow_action, extack))
29+
if (!flow_action_mixed_hw_stats_check(flow_action, extack))
3030
return -EOPNOTSUPP;
3131

3232
act = flow_action_first_entry_get(flow_action);
33-
if (act->hw_stats_type == FLOW_ACTION_HW_STATS_TYPE_ANY ||
34-
act->hw_stats_type == FLOW_ACTION_HW_STATS_TYPE_IMMEDIATE) {
33+
if (act->hw_stats_type == FLOW_ACTION_HW_STATS_ANY ||
34+
act->hw_stats_type == FLOW_ACTION_HW_STATS_IMMEDIATE) {
3535
/* Count action is inserted first */
3636
err = mlxsw_sp_acl_rulei_act_count(mlxsw_sp, rulei, extack);
3737
if (err)
3838
return err;
39-
} else if (act->hw_stats_type != FLOW_ACTION_HW_STATS_TYPE_DISABLED) {
39+
} else if (act->hw_stats_type != FLOW_ACTION_HW_STATS_DISABLED) {
4040
NL_SET_ERR_MSG_MOD(extack, "Unsupported action HW stats type");
4141
return -EOPNOTSUPP;
4242
}

drivers/net/ethernet/mscc/ocelot_flower.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ static int ocelot_flower_parse_action(struct flow_cls_offload *f,
1717
if (!flow_offload_has_one_action(&f->rule->action))
1818
return -EOPNOTSUPP;
1919

20-
if (!flow_action_basic_hw_stats_types_check(&f->rule->action,
21-
f->common.extack))
20+
if (!flow_action_basic_hw_stats_check(&f->rule->action,
21+
f->common.extack))
2222
return -EOPNOTSUPP;
2323

2424
flow_action_for_each(i, a, &f->rule->action) {

drivers/net/ethernet/netronome/nfp/flower/action.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,8 +1207,8 @@ int nfp_flower_compile_action(struct nfp_app *app,
12071207
bool pkt_host = false;
12081208
u32 csum_updated = 0;
12091209

1210-
if (!flow_action_basic_hw_stats_types_check(&flow->rule->action,
1211-
extack))
1210+
if (!flow_action_hw_stats_check(&flow->rule->action, extack,
1211+
FLOW_ACTION_HW_STATS_DELAYED_BIT))
12121212
return -EOPNOTSUPP;
12131213

12141214
memset(nfp_flow->action_data, 0, NFP_FL_MAX_A_SIZ);

drivers/net/ethernet/qlogic/qede/qede_filter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1757,7 +1757,7 @@ static int qede_parse_actions(struct qede_dev *edev,
17571757
return -EINVAL;
17581758
}
17591759

1760-
if (!flow_action_basic_hw_stats_types_check(flow_action, extack))
1760+
if (!flow_action_basic_hw_stats_check(flow_action, extack))
17611761
return -EOPNOTSUPP;
17621762

17631763
flow_action_for_each(i, act, flow_action) {

drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,7 +1387,7 @@ static int __stmmac_test_l3filt(struct stmmac_priv *priv, u32 dst, u32 src,
13871387
cls->rule = rule;
13881388

13891389
rule->action.entries[0].id = FLOW_ACTION_DROP;
1390-
rule->action.entries[0].hw_stats_type = FLOW_ACTION_HW_STATS_TYPE_ANY;
1390+
rule->action.entries[0].hw_stats_type = FLOW_ACTION_HW_STATS_ANY;
13911391
rule->action.num_entries = 1;
13921392

13931393
attr.dst = priv->dev->dev_addr;
@@ -1516,7 +1516,7 @@ static int __stmmac_test_l4filt(struct stmmac_priv *priv, u32 dst, u32 src,
15161516
cls->rule = rule;
15171517

15181518
rule->action.entries[0].id = FLOW_ACTION_DROP;
1519-
rule->action.entries[0].hw_stats_type = FLOW_ACTION_HW_STATS_TYPE_ANY;
1519+
rule->action.entries[0].hw_stats_type = FLOW_ACTION_HW_STATS_ANY;
15201520
rule->action.num_entries = 1;
15211521

15221522
attr.dst = priv->dev->dev_addr;

drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ static int tc_parse_flow_actions(struct stmmac_priv *priv,
376376
if (!flow_action_has_entries(action))
377377
return -EINVAL;
378378

379-
if (!flow_action_basic_hw_stats_types_check(action, extack))
379+
if (!flow_action_basic_hw_stats_check(action, extack))
380380
return -EOPNOTSUPP;
381381

382382
flow_action_for_each(i, act, action) {

0 commit comments

Comments
 (0)