@@ -140,7 +140,7 @@ static int ocelot_setup_tc_block(struct ocelot_port *port,
if (f->binder_type == TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS) {
cb = ocelot_setup_tc_block_cb_ig;
- port->tc.block_shared = tcf_block_shared(f->block);
+ port->tc.block_shared = f->block_shared;
} else if (f->binder_type == TCF_BLOCK_BINDER_TYPE_CLSACT_EGRESS) {
cb = ocelot_setup_tc_block_cb_eg;
} else {
@@ -1270,7 +1270,7 @@ static int nfp_flower_setup_tc_block(struct net_device *netdev,
return -EOPNOTSUPP;
repr_priv = repr->app_priv;
- repr_priv->block_shared = tcf_block_shared(f->block);
+ repr_priv->block_shared = f->block_shared;
switch (f->command) {
case TC_BLOCK_BIND:
@@ -663,7 +663,7 @@ struct tc_block_offload {
enum tcf_block_binder_type binder_type;
struct list_head cb_list;
struct net *net;
- struct tcf_block *block;
+ bool block_shared;
struct netlink_ext_ack *extack;
};
@@ -1073,7 +1073,6 @@ static void tc_indr_block_ing_cmd(struct tc_indr_block_dev *indr_dev,
.command = command,
.binder_type = TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS,
.net = dev_net(indr_dev->dev),
- .block = indr_dev->block,
};
INIT_LIST_HEAD(&bo.cb_list);
@@ -1164,7 +1163,6 @@ static void tc_indr_block_call(struct tcf_block *block, struct net_device *dev,
.command = command,
.binder_type = ei->binder_type,
.net = dev_net(dev),
- .block = block,
.extack = extack,
};
INIT_LIST_HEAD(&bo.cb_list);
@@ -1195,7 +1193,7 @@ static int tcf_block_offload_cmd(struct tcf_block *block,
bo.command = command;
bo.binder_type = ei->binder_type;
bo.net = dev_net(dev),
- bo.block = block;
+ bo.block_shared = tcf_block_shared(block);
bo.extack = extack;
INIT_LIST_HEAD(&bo.cb_list);
Expose the block index which is sufficient to look up for the tcf_block_cb object. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> --- drivers/net/ethernet/mscc/ocelot_tc.c | 2 +- drivers/net/ethernet/netronome/nfp/flower/offload.c | 2 +- include/net/pkt_cls.h | 2 +- net/sched/cls_api.c | 4 +--- 4 files changed, 4 insertions(+), 6 deletions(-)