Home
last modified time | relevance | path

Searched refs:flowtable (Results 1 – 8 of 8) sorted by relevance

/Linux-v5.15/Documentation/networking/
Dnf_flowtable.rst4 Netfilter's flowtable infrastructure
7 This documentation describes the Netfilter flowtable infrastructure which allows
8 you to define a fastpath through the flowtable datapath. This infrastructure
9 also provides hardware offload support. The flowtable supports for the layer 3
17 flowtable through your ruleset. The flowtable infrastructure provides a rule
18 action that allows you to specify when to add a flow to the flowtable.
20 A packet that finds a matching entry in the flowtable (ie. flowtable hit) is
24 there is no matching entry in the flowtable (ie. flowtable miss), the packet
27 The flowtable uses a resizable hashtable. Lookups are based on the following
32 The 'flow add' action allows you to populate the flowtable, the user selectively
[all …]
/Linux-v5.15/net/netfilter/
Dnf_flow_table_offload.c24 struct nf_flowtable *flowtable; member
725 const struct nf_flowtable *flowtable = offload->flowtable; in nf_flow_offload_rule_alloc() local
754 if (flowtable->type->action(net, flow, dir, flow_rule) < 0) in nf_flow_offload_rule_alloc()
794 struct net *net = read_pnet(&offload->flowtable->net); in nf_flow_offload_alloc()
824 static int nf_flow_offload_tuple(struct nf_flowtable *flowtable, in nf_flow_offload_tuple() argument
843 down_read(&flowtable->flow_block_lock); in nf_flow_offload_tuple()
852 up_read(&flowtable->flow_block_lock); in nf_flow_offload_tuple()
864 return nf_flow_offload_tuple(offload->flowtable, offload->flow, in flow_offload_tuple_add()
867 &offload->flowtable->flow_block.cb_list); in flow_offload_tuple_add()
873 nf_flow_offload_tuple(offload->flowtable, offload->flow, NULL, dir, in flow_offload_tuple_del()
[all …]
Dnft_flow_offload.c19 struct nft_flowtable *flowtable; member
92 unsigned char *ha, struct nf_flowtable *flowtable) in nft_dev_path_info() argument
160 if (nf_flowtable_hw_offload(flowtable) && in nft_dev_path_info()
276 struct nf_flowtable *flowtable = &priv->flowtable->data; in nft_flow_offload_eval() local
316 if (nft_flow_route(pkt, ct, &route, dir, priv->flowtable) < 0) in nft_flow_offload_eval()
331 ret = flow_offload_add(flowtable, flow); in nft_flow_offload_eval()
368 struct nft_flowtable *flowtable; in nft_flow_offload_init() local
373 flowtable = nft_flowtable_lookup(ctx->table, tb[NFTA_FLOW_TABLE_NAME], in nft_flow_offload_init()
375 if (IS_ERR(flowtable)) in nft_flow_offload_init()
376 return PTR_ERR(flowtable); in nft_flow_offload_init()
[all …]
Dnf_flow_table_core.c574 int nf_flow_table_init(struct nf_flowtable *flowtable) in nf_flow_table_init() argument
578 INIT_DELAYED_WORK(&flowtable->gc_work, nf_flow_offload_work_gc); in nf_flow_table_init()
579 flow_block_init(&flowtable->flow_block); in nf_flow_table_init()
580 init_rwsem(&flowtable->flow_block_lock); in nf_flow_table_init()
582 err = rhashtable_init(&flowtable->rhashtable, in nf_flow_table_init()
588 &flowtable->gc_work, HZ); in nf_flow_table_init()
591 list_add(&flowtable->list, &flowtables); in nf_flow_table_init()
613 void nf_flow_table_gc_cleanup(struct nf_flowtable *flowtable, in nf_flow_table_gc_cleanup() argument
616 nf_flow_table_iterate(flowtable, nf_flow_table_do_cleanup, dev); in nf_flow_table_gc_cleanup()
617 flush_delayed_work(&flowtable->gc_work); in nf_flow_table_gc_cleanup()
[all …]
Dnf_tables_api.c520 struct nft_flowtable *flowtable) in nft_trans_flowtable_add() argument
530 nft_activate_next(ctx->net, flowtable); in nft_trans_flowtable_add()
532 nft_trans_flowtable(trans) = flowtable; in nft_trans_flowtable_add()
539 struct nft_flowtable *flowtable) in nft_delflowtable() argument
543 err = nft_trans_flowtable_add(ctx, NFT_MSG_DELFLOWTABLE, flowtable); in nft_delflowtable()
547 nft_deactivate_next(ctx->net, flowtable); in nft_delflowtable()
1167 struct nft_flowtable *flowtable, *nft; in nft_flush_table() local
1200 list_for_each_entry_safe(flowtable, nft, &ctx->table->flowtables, list) { in nft_flush_table()
1201 if (!nft_is_active_next(ctx->net, flowtable)) in nft_flush_table()
1204 err = nft_delflowtable(ctx, flowtable); in nft_flush_table()
[all …]
/Linux-v5.15/include/net/netfilter/
Dnf_flow_table.h83 static inline bool nf_flowtable_hw_offload(struct nf_flowtable *flowtable) in nf_flowtable_hw_offload() argument
85 return flowtable->flags & NF_FLOWTABLE_HW_OFFLOAD; in nf_flowtable_hw_offload()
267 void nf_flow_table_gc_cleanup(struct nf_flowtable *flowtable,
295 void nf_flow_offload_add(struct nf_flowtable *flowtable,
297 void nf_flow_offload_del(struct nf_flowtable *flowtable,
299 void nf_flow_offload_stats(struct nf_flowtable *flowtable,
302 void nf_flow_table_offload_flush(struct nf_flowtable *flowtable);
303 int nf_flow_table_offload_setup(struct nf_flowtable *flowtable,
Dnf_tables.h1296 struct nft_flowtable *flowtable,
1551 struct nft_flowtable *flowtable; member
1558 (((struct nft_trans_flowtable *)trans->data)->flowtable)
/Linux-v5.15/tools/testing/selftests/netfilter/
Dnft_flowtable.sh153 flowtable f1 {