Home
last modified time | relevance | path

Searched refs:block_cb (Results 1 – 15 of 15) sorted by relevance

/kernel/linux/linux-5.10/net/core/
Dflow_offload.c209 struct flow_block_cb *block_cb; in flow_block_cb_alloc() local
211 block_cb = kzalloc(sizeof(*block_cb), GFP_KERNEL); in flow_block_cb_alloc()
212 if (!block_cb) in flow_block_cb_alloc()
215 block_cb->cb = cb; in flow_block_cb_alloc()
216 block_cb->cb_ident = cb_ident; in flow_block_cb_alloc()
217 block_cb->cb_priv = cb_priv; in flow_block_cb_alloc()
218 block_cb->release = release; in flow_block_cb_alloc()
220 return block_cb; in flow_block_cb_alloc()
224 void flow_block_cb_free(struct flow_block_cb *block_cb) in flow_block_cb_free() argument
226 if (block_cb->release) in flow_block_cb_free()
[all …]
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlxsw/
Dspectrum_flow.c207 struct flow_block_cb *block_cb; in mlxsw_sp_setup_tc_block_bind() local
211 block_cb = flow_block_cb_lookup(f->block, mlxsw_sp_flow_block_cb, in mlxsw_sp_setup_tc_block_bind()
213 if (!block_cb) { in mlxsw_sp_setup_tc_block_bind()
217 block_cb = flow_block_cb_alloc(mlxsw_sp_flow_block_cb, in mlxsw_sp_setup_tc_block_bind()
220 if (IS_ERR(block_cb)) { in mlxsw_sp_setup_tc_block_bind()
222 return PTR_ERR(block_cb); in mlxsw_sp_setup_tc_block_bind()
226 flow_block = flow_block_cb_priv(block_cb); in mlxsw_sp_setup_tc_block_bind()
228 flow_block_cb_incref(block_cb); in mlxsw_sp_setup_tc_block_bind()
240 flow_block_cb_add(block_cb, f); in mlxsw_sp_setup_tc_block_bind()
241 list_add_tail(&block_cb->driver_list, &mlxsw_sp_block_cb_list); in mlxsw_sp_setup_tc_block_bind()
[all …]
Dspectrum_qdisc.c1714 struct flow_block_cb *block_cb; in mlxsw_sp_setup_tc_block_qevent_bind() local
1719 block_cb = flow_block_cb_lookup(f->block, mlxsw_sp_qevent_block_cb, mlxsw_sp); in mlxsw_sp_setup_tc_block_qevent_bind()
1720 if (!block_cb) { in mlxsw_sp_setup_tc_block_qevent_bind()
1724 block_cb = flow_block_cb_alloc(mlxsw_sp_qevent_block_cb, mlxsw_sp, qevent_block, in mlxsw_sp_setup_tc_block_qevent_bind()
1726 if (IS_ERR(block_cb)) { in mlxsw_sp_setup_tc_block_qevent_bind()
1728 return PTR_ERR(block_cb); in mlxsw_sp_setup_tc_block_qevent_bind()
1732 qevent_block = flow_block_cb_priv(block_cb); in mlxsw_sp_setup_tc_block_qevent_bind()
1734 flow_block_cb_incref(block_cb); in mlxsw_sp_setup_tc_block_qevent_bind()
1763 flow_block_cb_add(block_cb, f); in mlxsw_sp_setup_tc_block_qevent_bind()
1764 list_add_tail(&block_cb->driver_list, &mlxsw_sp_qevent_block_cb_list); in mlxsw_sp_setup_tc_block_qevent_bind()
[all …]
/kernel/linux/linux-5.10/include/net/netfilter/
Dnf_flow_table.h168 struct flow_block_cb *block_cb; in nf_flow_table_offload_add_cb() local
172 block_cb = flow_block_cb_lookup(block, cb, cb_priv); in nf_flow_table_offload_add_cb()
173 if (block_cb) { in nf_flow_table_offload_add_cb()
178 block_cb = flow_block_cb_alloc(cb, cb_priv, cb_priv, NULL); in nf_flow_table_offload_add_cb()
179 if (IS_ERR(block_cb)) { in nf_flow_table_offload_add_cb()
180 err = PTR_ERR(block_cb); in nf_flow_table_offload_add_cb()
184 list_add_tail(&block_cb->list, &block->cb_list); in nf_flow_table_offload_add_cb()
196 struct flow_block_cb *block_cb; in nf_flow_table_offload_del_cb() local
199 block_cb = flow_block_cb_lookup(block, cb, cb_priv); in nf_flow_table_offload_del_cb()
200 if (block_cb) { in nf_flow_table_offload_del_cb()
[all …]
/kernel/linux/linux-5.10/include/net/
Dflow_offload.h463 void (*cleanup)(struct flow_block_cb *block_cb);
487 void (*cleanup)(struct flow_block_cb *block_cb));
488 void flow_block_cb_free(struct flow_block_cb *block_cb);
493 void *flow_block_cb_priv(struct flow_block_cb *block_cb);
494 void flow_block_cb_incref(struct flow_block_cb *block_cb);
495 unsigned int flow_block_cb_decref(struct flow_block_cb *block_cb);
497 static inline void flow_block_cb_add(struct flow_block_cb *block_cb, in flow_block_cb_add() argument
500 list_add_tail(&block_cb->list, &offload->cb_list); in flow_block_cb_add()
503 static inline void flow_block_cb_remove(struct flow_block_cb *block_cb, in flow_block_cb_remove() argument
506 list_move(&block_cb->list, &offload->cb_list); in flow_block_cb_remove()
[all …]
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx5/core/en/rep/
Dtc.c413 void (*cleanup)(struct flow_block_cb *block_cb)) in mlx5e_rep_indr_setup_block() argument
417 struct flow_block_cb *block_cb; in mlx5e_rep_indr_setup_block() local
444 block_cb = flow_indr_block_cb_alloc(setup_cb, indr_priv, indr_priv, in mlx5e_rep_indr_setup_block()
448 if (IS_ERR(block_cb)) { in mlx5e_rep_indr_setup_block()
451 return PTR_ERR(block_cb); in mlx5e_rep_indr_setup_block()
453 flow_block_cb_add(block_cb, f); in mlx5e_rep_indr_setup_block()
454 list_add_tail(&block_cb->driver_list, &mlx5e_block_cb_list); in mlx5e_rep_indr_setup_block()
462 block_cb = flow_block_cb_lookup(f->block, setup_cb, indr_priv); in mlx5e_rep_indr_setup_block()
463 if (!block_cb) in mlx5e_rep_indr_setup_block()
466 flow_indr_block_cb_remove(block_cb, f); in mlx5e_rep_indr_setup_block()
[all …]
/kernel/linux/linux-5.10/net/netfilter/
Dnf_tables_offload.c200 struct flow_block_cb *block_cb; in nft_setup_cb_call() local
203 list_for_each_entry(block_cb, cb_list, list) { in nft_setup_cb_call()
204 err = block_cb->cb(type, type_data, block_cb->cb_priv); in nft_setup_cb_call()
293 struct flow_block_cb *block_cb, *next; in nft_flow_offload_unbind() local
307 list_for_each_entry_safe(block_cb, next, &bo->cb_list, list) { in nft_flow_offload_unbind()
308 list_del(&block_cb->list); in nft_flow_offload_unbind()
309 flow_block_cb_free(block_cb); in nft_flow_offload_unbind()
369 static void nft_indr_block_cleanup(struct flow_block_cb *block_cb) in nft_indr_block_cleanup() argument
371 struct nft_base_chain *basechain = block_cb->indr.data; in nft_indr_block_cleanup()
372 struct net_device *dev = block_cb->indr.dev; in nft_indr_block_cleanup()
[all …]
Dnf_flow_table_offload.c685 struct flow_block_cb *block_cb; in nf_flow_offload_tuple() local
696 list_for_each_entry(block_cb, block_cb_list, list) { in nf_flow_offload_tuple()
697 err = block_cb->cb(TC_SETUP_CLSFLOWER, &cls_flow, in nf_flow_offload_tuple()
698 block_cb->cb_priv); in nf_flow_offload_tuple()
910 struct flow_block_cb *block_cb, *next; in nf_flow_table_block_setup() local
919 list_for_each_entry_safe(block_cb, next, &bo->cb_list, list) { in nf_flow_table_block_setup()
920 list_del(&block_cb->list); in nf_flow_table_block_setup()
921 flow_block_cb_free(block_cb); in nf_flow_table_block_setup()
949 static void nf_flow_table_indr_cleanup(struct flow_block_cb *block_cb) in nf_flow_table_indr_cleanup() argument
951 struct nf_flowtable *flowtable = block_cb->indr.data; in nf_flow_table_indr_cleanup()
[all …]
/kernel/linux/linux-5.10/drivers/net/ethernet/netronome/nfp/flower/
Doffload.c1673 struct flow_block_cb *block_cb; in nfp_flower_setup_tc_block() local
1688 block_cb = flow_block_cb_alloc(nfp_flower_setup_tc_block_cb, in nfp_flower_setup_tc_block()
1690 if (IS_ERR(block_cb)) in nfp_flower_setup_tc_block()
1691 return PTR_ERR(block_cb); in nfp_flower_setup_tc_block()
1693 flow_block_cb_add(block_cb, f); in nfp_flower_setup_tc_block()
1694 list_add_tail(&block_cb->driver_list, &nfp_block_cb_list); in nfp_flower_setup_tc_block()
1697 block_cb = flow_block_cb_lookup(f->block, in nfp_flower_setup_tc_block()
1700 if (!block_cb) in nfp_flower_setup_tc_block()
1703 flow_block_cb_remove(block_cb, f); in nfp_flower_setup_tc_block()
1704 list_del(&block_cb->driver_list); in nfp_flower_setup_tc_block()
[all …]
Dmain.h476 void (*cleanup)(struct flow_block_cb *block_cb));
/kernel/linux/linux-5.10/drivers/net/ethernet/mscc/
Docelot_net.c147 struct flow_block_cb *block_cb; in ocelot_setup_tc_block() local
166 block_cb = flow_block_cb_alloc(cb, priv, priv, NULL); in ocelot_setup_tc_block()
167 if (IS_ERR(block_cb)) in ocelot_setup_tc_block()
168 return PTR_ERR(block_cb); in ocelot_setup_tc_block()
170 flow_block_cb_add(block_cb, f); in ocelot_setup_tc_block()
171 list_add_tail(&block_cb->driver_list, f->driver_block_list); in ocelot_setup_tc_block()
174 block_cb = flow_block_cb_lookup(f->block, cb, priv); in ocelot_setup_tc_block()
175 if (!block_cb) in ocelot_setup_tc_block()
178 flow_block_cb_remove(block_cb, f); in ocelot_setup_tc_block()
179 list_del(&block_cb->driver_list); in ocelot_setup_tc_block()
/kernel/linux/linux-5.10/net/sched/
Dcls_api.c644 static void tc_block_indr_cleanup(struct flow_block_cb *block_cb) in tc_block_indr_cleanup() argument
646 struct tcf_block *block = block_cb->indr.data; in tc_block_indr_cleanup()
647 struct net_device *dev = block_cb->indr.dev; in tc_block_indr_cleanup()
648 struct Qdisc *sch = block_cb->indr.sch; in tc_block_indr_cleanup()
653 block_cb->indr.binder_type, in tc_block_indr_cleanup()
658 list_del(&block_cb->driver_list); in tc_block_indr_cleanup()
659 list_move(&block_cb->list, &bo.cb_list); in tc_block_indr_cleanup()
1446 struct flow_block_cb *block_cb, *next; in tcf_block_bind() local
1451 list_for_each_entry(block_cb, &bo->cb_list, list) { in tcf_block_bind()
1452 err = tcf_block_playback_offloads(block, block_cb->cb, in tcf_block_bind()
[all …]
Dact_ct.c323 struct flow_block_cb *block_cb, *tmp_cb; in tcf_ct_flow_table_cleanup_work() local
334 list_for_each_entry_safe(block_cb, tmp_cb, &block->cb_list, list) { in tcf_ct_flow_table_cleanup_work()
335 list_del(&block_cb->list); in tcf_ct_flow_table_cleanup_work()
336 flow_block_cb_free(block_cb); in tcf_ct_flow_table_cleanup_work()
/kernel/linux/linux-5.10/drivers/net/ethernet/broadcom/bnxt/
Dbnxt_tc.c1890 void (*cleanup)(struct flow_block_cb *block_cb)) in bnxt_tc_setup_indr_block() argument
1893 struct flow_block_cb *block_cb; in bnxt_tc_setup_indr_block() local
1908 block_cb = flow_indr_block_cb_alloc(bnxt_tc_setup_indr_block_cb, in bnxt_tc_setup_indr_block()
1912 if (IS_ERR(block_cb)) { in bnxt_tc_setup_indr_block()
1915 return PTR_ERR(block_cb); in bnxt_tc_setup_indr_block()
1918 flow_block_cb_add(block_cb, f); in bnxt_tc_setup_indr_block()
1919 list_add_tail(&block_cb->driver_list, &bnxt_block_cb_list); in bnxt_tc_setup_indr_block()
1926 block_cb = flow_block_cb_lookup(f->block, in bnxt_tc_setup_indr_block()
1929 if (!block_cb) in bnxt_tc_setup_indr_block()
1932 flow_indr_block_cb_remove(block_cb, f); in bnxt_tc_setup_indr_block()
[all …]
/kernel/linux/linux-5.10/net/dsa/
Dslave.c1205 struct flow_block_cb *block_cb; in dsa_slave_setup_tc_block() local
1222 block_cb = flow_block_cb_alloc(cb, dev, dev, NULL); in dsa_slave_setup_tc_block()
1223 if (IS_ERR(block_cb)) in dsa_slave_setup_tc_block()
1224 return PTR_ERR(block_cb); in dsa_slave_setup_tc_block()
1226 flow_block_cb_add(block_cb, f); in dsa_slave_setup_tc_block()
1227 list_add_tail(&block_cb->driver_list, &dsa_slave_block_cb_list); in dsa_slave_setup_tc_block()
1230 block_cb = flow_block_cb_lookup(f->block, cb, dev); in dsa_slave_setup_tc_block()
1231 if (!block_cb) in dsa_slave_setup_tc_block()
1234 flow_block_cb_remove(block_cb, f); in dsa_slave_setup_tc_block()
1235 list_del(&block_cb->driver_list); in dsa_slave_setup_tc_block()