Skip to content

Commit 32f8c40

Browse files
ummakynesdavem330
authored andcommitted
net: flow_offload: rename TCF_BLOCK_BINDER_TYPE_* to FLOW_BLOCK_BINDER_TYPE_*
Rename from TCF_BLOCK_BINDER_TYPE_* to FLOW_BLOCK_BINDER_TYPE_* and remove temporary tcf_block_binder_type alias. Signed-off-by: Pablo Neira Ayuso <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9c0e189 commit 32f8c40

File tree

11 files changed

+26
-27
lines changed

11 files changed

+26
-27
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ mlx5e_rep_indr_setup_tc_block(struct net_device *netdev,
701701
struct mlx5e_rep_indr_block_priv *indr_priv;
702702
int err = 0;
703703

704-
if (f->binder_type != TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS)
704+
if (f->binder_type != FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS)
705705
return -EOPNOTSUPP;
706706

707707
switch (f->command) {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1668,10 +1668,10 @@ static int mlxsw_sp_setup_tc_block(struct mlxsw_sp_port *mlxsw_sp_port,
16681668
bool ingress;
16691669
int err;
16701670

1671-
if (f->binder_type == TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS) {
1671+
if (f->binder_type == FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS) {
16721672
cb = mlxsw_sp_setup_tc_block_cb_matchall_ig;
16731673
ingress = true;
1674-
} else if (f->binder_type == TCF_BLOCK_BINDER_TYPE_CLSACT_EGRESS) {
1674+
} else if (f->binder_type == FLOW_BLOCK_BINDER_TYPE_CLSACT_EGRESS) {
16751675
cb = mlxsw_sp_setup_tc_block_cb_matchall_eg;
16761676
ingress = false;
16771677
} else {

drivers/net/ethernet/mscc/ocelot_flower.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ int ocelot_setup_tc_block_flower_bind(struct ocelot_port *port,
306306
struct tcf_block_cb *block_cb;
307307
int ret;
308308

309-
if (f->binder_type == TCF_BLOCK_BINDER_TYPE_CLSACT_EGRESS)
309+
if (f->binder_type == FLOW_BLOCK_BINDER_TYPE_CLSACT_EGRESS)
310310
return -EOPNOTSUPP;
311311

312312
block_cb = tcf_block_cb_lookup(f->block,

drivers/net/ethernet/mscc/ocelot_tc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,10 @@ static int ocelot_setup_tc_block(struct ocelot_port *port,
137137
netdev_dbg(port->dev, "tc_block command %d, binder_type %d\n",
138138
f->command, f->binder_type);
139139

140-
if (f->binder_type == TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS) {
140+
if (f->binder_type == FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS) {
141141
cb = ocelot_setup_tc_block_cb_ig;
142142
port->tc.block_shared = tcf_block_shared(f->block);
143-
} else if (f->binder_type == TCF_BLOCK_BINDER_TYPE_CLSACT_EGRESS) {
143+
} else if (f->binder_type == FLOW_BLOCK_BINDER_TYPE_CLSACT_EGRESS) {
144144
cb = ocelot_setup_tc_block_cb_eg;
145145
} else {
146146
return -EOPNOTSUPP;

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,7 @@ static int nfp_flower_setup_tc_block(struct net_device *netdev,
13081308
struct nfp_repr *repr = netdev_priv(netdev);
13091309
struct nfp_flower_repr_priv *repr_priv;
13101310

1311-
if (f->binder_type != TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS)
1311+
if (f->binder_type != FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS)
13121312
return -EOPNOTSUPP;
13131313

13141314
repr_priv = repr->app_priv;
@@ -1389,8 +1389,8 @@ nfp_flower_setup_indr_tc_block(struct net_device *netdev, struct nfp_app *app,
13891389
struct nfp_flower_priv *priv = app->priv;
13901390
int err;
13911391

1392-
if (f->binder_type != TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS &&
1393-
!(f->binder_type == TCF_BLOCK_BINDER_TYPE_CLSACT_EGRESS &&
1392+
if (f->binder_type != FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS &&
1393+
!(f->binder_type == FLOW_BLOCK_BINDER_TYPE_CLSACT_EGRESS &&
13941394
nfp_flower_internal_port_can_offload(app, netdev)))
13951395
return -EOPNOTSUPP;
13961396

include/net/flow_offload.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,9 @@ enum flow_block_command {
244244
};
245245

246246
enum flow_block_binder_type {
247-
TCF_BLOCK_BINDER_TYPE_UNSPEC,
248-
TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS,
249-
TCF_BLOCK_BINDER_TYPE_CLSACT_EGRESS,
247+
FLOW_BLOCK_BINDER_TYPE_UNSPEC,
248+
FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS,
249+
FLOW_BLOCK_BINDER_TYPE_CLSACT_EGRESS,
250250
};
251251

252252
struct tcf_block;

include/net/pkt_cls.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,9 @@ int register_tcf_proto_ops(struct tcf_proto_ops *ops);
2727
int unregister_tcf_proto_ops(struct tcf_proto_ops *ops);
2828

2929
#define tc_block_offload flow_block_offload
30-
#define tcf_block_binder_type flow_block_binder_type
3130

3231
struct tcf_block_ext_info {
33-
enum tcf_block_binder_type binder_type;
32+
enum flow_block_binder_type binder_type;
3433
tcf_chain_head_change_t *chain_head_change;
3534
void *chain_head_change_priv;
3635
u32 block_index;

net/core/flow_offload.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ int flow_block_cb_setup_simple(struct flow_block_offload *f,
172172
bool ingress_only)
173173
{
174174
if (ingress_only &&
175-
f->binder_type != TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS)
175+
f->binder_type != FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS)
176176
return -EOPNOTSUPP;
177177

178178
f->driver_block_list = driver_block_list;

net/dsa/slave.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -947,9 +947,9 @@ static int dsa_slave_setup_tc_block(struct net_device *dev,
947947
{
948948
tc_setup_cb_t *cb;
949949

950-
if (f->binder_type == TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS)
950+
if (f->binder_type == FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS)
951951
cb = dsa_slave_setup_tc_block_cb_ig;
952-
else if (f->binder_type == TCF_BLOCK_BINDER_TYPE_CLSACT_EGRESS)
952+
else if (f->binder_type == FLOW_BLOCK_BINDER_TYPE_CLSACT_EGRESS)
953953
cb = dsa_slave_setup_tc_block_cb_eg;
954954
else
955955
return -EOPNOTSUPP;

net/sched/cls_api.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ static void tc_indr_block_ing_cmd(struct tc_indr_block_dev *indr_dev,
679679
{
680680
struct tc_block_offload bo = {
681681
.command = command,
682-
.binder_type = TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS,
682+
.binder_type = FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS,
683683
.block = indr_dev->block,
684684
};
685685

@@ -1341,17 +1341,17 @@ static void tcf_block_release(struct Qdisc *q, struct tcf_block *block,
13411341
struct tcf_block_owner_item {
13421342
struct list_head list;
13431343
struct Qdisc *q;
1344-
enum tcf_block_binder_type binder_type;
1344+
enum flow_block_binder_type binder_type;
13451345
};
13461346

13471347
static void
13481348
tcf_block_owner_netif_keep_dst(struct tcf_block *block,
13491349
struct Qdisc *q,
1350-
enum tcf_block_binder_type binder_type)
1350+
enum flow_block_binder_type binder_type)
13511351
{
13521352
if (block->keep_dst &&
1353-
binder_type != TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS &&
1354-
binder_type != TCF_BLOCK_BINDER_TYPE_CLSACT_EGRESS)
1353+
binder_type != FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS &&
1354+
binder_type != FLOW_BLOCK_BINDER_TYPE_CLSACT_EGRESS)
13551355
netif_keep_dst(qdisc_dev(q));
13561356
}
13571357

@@ -1368,7 +1368,7 @@ EXPORT_SYMBOL(tcf_block_netif_keep_dst);
13681368

13691369
static int tcf_block_owner_add(struct tcf_block *block,
13701370
struct Qdisc *q,
1371-
enum tcf_block_binder_type binder_type)
1371+
enum flow_block_binder_type binder_type)
13721372
{
13731373
struct tcf_block_owner_item *item;
13741374

@@ -1383,7 +1383,7 @@ static int tcf_block_owner_add(struct tcf_block *block,
13831383

13841384
static void tcf_block_owner_del(struct tcf_block *block,
13851385
struct Qdisc *q,
1386-
enum tcf_block_binder_type binder_type)
1386+
enum flow_block_binder_type binder_type)
13871387
{
13881388
struct tcf_block_owner_item *item;
13891389

net/sched/sch_ingress.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ static int ingress_init(struct Qdisc *sch, struct nlattr *opt,
8383

8484
mini_qdisc_pair_init(&q->miniqp, sch, &dev->miniq_ingress);
8585

86-
q->block_info.binder_type = TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS;
86+
q->block_info.binder_type = FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS;
8787
q->block_info.chain_head_change = clsact_chain_head_change;
8888
q->block_info.chain_head_change_priv = &q->miniqp;
8989

@@ -217,7 +217,7 @@ static int clsact_init(struct Qdisc *sch, struct nlattr *opt,
217217

218218
mini_qdisc_pair_init(&q->miniqp_ingress, sch, &dev->miniq_ingress);
219219

220-
q->ingress_block_info.binder_type = TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS;
220+
q->ingress_block_info.binder_type = FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS;
221221
q->ingress_block_info.chain_head_change = clsact_chain_head_change;
222222
q->ingress_block_info.chain_head_change_priv = &q->miniqp_ingress;
223223

@@ -228,7 +228,7 @@ static int clsact_init(struct Qdisc *sch, struct nlattr *opt,
228228

229229
mini_qdisc_pair_init(&q->miniqp_egress, sch, &dev->miniq_egress);
230230

231-
q->egress_block_info.binder_type = TCF_BLOCK_BINDER_TYPE_CLSACT_EGRESS;
231+
q->egress_block_info.binder_type = FLOW_BLOCK_BINDER_TYPE_CLSACT_EGRESS;
232232
q->egress_block_info.chain_head_change = clsact_chain_head_change;
233233
q->egress_block_info.chain_head_change_priv = &q->miniqp_egress;
234234

0 commit comments

Comments
 (0)