/Linux-v5.15/net/core/ |
D | fib_rules.c | 37 bool fib_rule_matchall(const struct fib_rule *rule) in fib_rule_matchall() argument 39 if (rule->iifindex || rule->oifindex || rule->mark || rule->tun_id || in fib_rule_matchall() 40 rule->flags) in fib_rule_matchall() 42 if (rule->suppress_ifgroup != -1 || rule->suppress_prefixlen != -1) in fib_rule_matchall() 44 if (!uid_eq(rule->uid_range.start, fib_kuid_range_unset.start) || in fib_rule_matchall() 45 !uid_eq(rule->uid_range.end, fib_kuid_range_unset.end)) in fib_rule_matchall() 47 if (fib_rule_port_range_set(&rule->sport_range)) in fib_rule_matchall() 49 if (fib_rule_port_range_set(&rule->dport_range)) in fib_rule_matchall() 86 struct fib_rule *rule; in fib_default_rule_pref() local 91 rule = list_entry(pos->next, struct fib_rule, list); in fib_default_rule_pref() [all …]
|
D | flow_offload.c | 11 struct flow_rule *rule; in flow_rule_alloc() local 14 rule = kzalloc(struct_size(rule, action.entries, num_actions), in flow_rule_alloc() 16 if (!rule) in flow_rule_alloc() 19 rule->action.num_entries = num_actions; in flow_rule_alloc() 24 rule->action.entries[i].hw_stats = FLOW_ACTION_HW_STATS_DONT_CARE; in flow_rule_alloc() 26 return rule; in flow_rule_alloc() 37 void flow_rule_match_meta(const struct flow_rule *rule, in flow_rule_match_meta() argument 40 FLOW_DISSECTOR_MATCH(rule, FLOW_DISSECTOR_KEY_META, out); in flow_rule_match_meta() 44 void flow_rule_match_basic(const struct flow_rule *rule, in flow_rule_match_basic() argument 47 FLOW_DISSECTOR_MATCH(rule, FLOW_DISSECTOR_KEY_BASIC, out); in flow_rule_match_basic() [all …]
|
/Linux-v5.15/drivers/net/dsa/sja1105/ |
D | sja1105_vl.c | 12 struct sja1105_rule *rule, in sja1105_insert_gate_entry() argument 23 e->rule = rule; in sja1105_insert_gate_entry() 95 struct sja1105_rule *rule; in sja1105_compose_gating_subschedule() local 102 list_for_each_entry(rule, &priv->flow_block.rules, list) { in sja1105_compose_gating_subschedule() 103 if (rule->type != SJA1105_RULE_VL) in sja1105_compose_gating_subschedule() 105 if (rule->vl.type != SJA1105_VL_TIME_TRIGGERED) in sja1105_compose_gating_subschedule() 108 if (max_cycle_time < rule->vl.cycle_time) { in sja1105_compose_gating_subschedule() 109 max_cycle_time = rule->vl.cycle_time; in sja1105_compose_gating_subschedule() 110 its_base_time = rule->vl.base_time; in sja1105_compose_gating_subschedule() 124 list_for_each_entry(rule, &priv->flow_block.rules, list) { in sja1105_compose_gating_subschedule() [all …]
|
D | sja1105_flower.c | 10 struct sja1105_rule *rule; in sja1105_rule_find() local 12 list_for_each_entry(rule, &priv->flow_block.rules, list) in sja1105_rule_find() 13 if (rule->cookie == cookie) in sja1105_rule_find() 14 return rule; in sja1105_rule_find() 36 struct sja1105_rule *rule = sja1105_rule_find(priv, cookie); in sja1105_setup_bcast_policer() local 43 if (!rule) { in sja1105_setup_bcast_policer() 44 rule = kzalloc(sizeof(*rule), GFP_KERNEL); in sja1105_setup_bcast_policer() 45 if (!rule) in sja1105_setup_bcast_policer() 48 rule->cookie = cookie; in sja1105_setup_bcast_policer() 49 rule->type = SJA1105_RULE_BCAST_POLICER; in sja1105_setup_bcast_policer() [all …]
|
/Linux-v5.15/drivers/net/ethernet/marvell/prestera/ |
D | prestera_acl.c | 169 u16 prestera_acl_rule_ruleset_id_get(const struct prestera_acl_rule *rule) in prestera_acl_rule_ruleset_id_get() argument 171 return rule->block->ruleset->id; in prestera_acl_rule_ruleset_id_get() 196 struct prestera_acl_rule *rule; in prestera_acl_rule_create() local 198 rule = kzalloc(sizeof(*rule), GFP_KERNEL); in prestera_acl_rule_create() 199 if (!rule) in prestera_acl_rule_create() 202 INIT_LIST_HEAD(&rule->match_list); in prestera_acl_rule_create() 203 INIT_LIST_HEAD(&rule->action_list); in prestera_acl_rule_create() 204 rule->cookie = cookie; in prestera_acl_rule_create() 205 rule->block = block; in prestera_acl_rule_create() 207 return rule; in prestera_acl_rule_create() [all …]
|
D | prestera_flower.c | 9 struct prestera_acl_rule *rule, in prestera_flower_parse_actions() argument 39 err = prestera_acl_rule_action_add(rule, &a_entry); in prestera_flower_parse_actions() 47 static int prestera_flower_parse_meta(struct prestera_acl_rule *rule, in prestera_flower_parse_meta() argument 83 return prestera_acl_rule_match_add(rule, &m_entry); in prestera_flower_parse_meta() 87 struct prestera_acl_rule *rule, in prestera_flower_parse() argument 113 prestera_acl_rule_priority_set(rule, f->common.prio); in prestera_flower_parse() 116 err = prestera_flower_parse_meta(rule, f, block); in prestera_flower_parse() 145 err = prestera_acl_rule_match_add(rule, &m_entry); in prestera_flower_parse() 154 err = prestera_acl_rule_match_add(rule, &m_entry); in prestera_flower_parse() 173 err = prestera_acl_rule_match_add(rule, &m_entry); in prestera_flower_parse() [all …]
|
D | prestera_acl.h | 98 u32 prestera_acl_rule_priority_get(struct prestera_acl_rule *rule); 99 void prestera_acl_rule_priority_set(struct prestera_acl_rule *rule, 101 u16 prestera_acl_rule_ruleset_id_get(const struct prestera_acl_rule *rule); 103 prestera_acl_rule_action_list_get(struct prestera_acl_rule *rule); 104 u8 prestera_acl_rule_action_len(struct prestera_acl_rule *rule); 105 u8 prestera_acl_rule_match_len(struct prestera_acl_rule *rule); 106 int prestera_acl_rule_action_add(struct prestera_acl_rule *rule, 109 prestera_acl_rule_match_list_get(struct prestera_acl_rule *rule); 110 int prestera_acl_rule_match_add(struct prestera_acl_rule *rule, 112 void prestera_acl_rule_destroy(struct prestera_acl_rule *rule); [all …]
|
/Linux-v5.15/net/ipv4/ |
D | fib_rules.c | 48 static bool fib4_rule_matchall(const struct fib_rule *rule) in fib4_rule_matchall() argument 50 struct fib4_rule *r = container_of(rule, struct fib4_rule, common); in fib4_rule_matchall() 54 return fib_rule_matchall(rule); in fib4_rule_matchall() 57 bool fib4_rule_default(const struct fib_rule *rule) in fib4_rule_default() argument 59 if (!fib4_rule_matchall(rule) || rule->action != FR_ACT_TO_TBL || in fib4_rule_default() 60 rule->l3mdev) in fib4_rule_default() 62 if (rule->table != RT_TABLE_LOCAL && rule->table != RT_TABLE_MAIN && in fib4_rule_default() 63 rule->table != RT_TABLE_DEFAULT) in fib4_rule_default() 94 if (arg.rule) in __fib_lookup() 95 res->tclassid = ((struct fib4_rule *)arg.rule)->tclassid; in __fib_lookup() [all …]
|
/Linux-v5.15/drivers/net/ethernet/netronome/nfp/flower/ |
D | match.c | 25 struct flow_rule *rule) in nfp_flower_compile_tci() argument 29 if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_VLAN)) { in nfp_flower_compile_tci() 32 flow_rule_match_vlan(rule, &match); in nfp_flower_compile_tci() 54 struct flow_rule *rule, u8 key_type, bool qinq_sup) in nfp_flower_compile_meta_tci() argument 62 nfp_flower_compile_tci(ext, msk, rule); in nfp_flower_compile_meta_tci() 97 struct flow_rule *rule) in nfp_flower_compile_mac() argument 99 if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_ETH_ADDRS)) { in nfp_flower_compile_mac() 103 flow_rule_match_eth_addrs(rule, &match); in nfp_flower_compile_mac() 119 struct flow_rule *rule, in nfp_flower_compile_mpls() argument 122 if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_MPLS)) { in nfp_flower_compile_mpls() [all …]
|
D | conntrack.c | 23 static struct flow_action_entry *get_flow_act(struct flow_rule *rule, 58 flow_action_for_each(i, act, &flow->rule->action) { in is_pre_ct_flow() 67 struct flow_rule *rule = flow_cls_offload_flow_rule(flow); in is_post_ct_flow() local 68 struct flow_dissector *dissector = rule->match.dissector; in is_post_ct_flow() 72 flow_rule_match_ct(rule, &ct); in is_post_ct_flow() 82 unsigned int ovlp_keys = entry1->rule->match.dissector->used_keys & in nfp_ct_merge_check() 83 entry2->rule->match.dissector->used_keys; in nfp_ct_merge_check() 92 flow_rule_match_control(entry1->rule, &match1); in nfp_ct_merge_check() 93 flow_rule_match_control(entry2->rule, &match2); in nfp_ct_merge_check() 102 flow_rule_match_basic(entry1->rule, &match1); in nfp_ct_merge_check() [all …]
|
/Linux-v5.15/security/safesetid/ |
D | securityfs.c | 32 struct setid_rule *rule) in parse_policy_line() argument 53 if (rule->type == UID){ in parse_policy_line() 54 rule->src_id.uid = make_kuid(file->f_cred->user_ns, parsed_parent); in parse_policy_line() 55 rule->dst_id.uid = make_kuid(file->f_cred->user_ns, parsed_child); in parse_policy_line() 56 if (!uid_valid(rule->src_id.uid) || !uid_valid(rule->dst_id.uid)) in parse_policy_line() 58 } else if (rule->type == GID){ in parse_policy_line() 59 rule->src_id.gid = make_kgid(file->f_cred->user_ns, parsed_parent); in parse_policy_line() 60 rule->dst_id.gid = make_kgid(file->f_cred->user_ns, parsed_child); in parse_policy_line() 61 if (!gid_valid(rule->src_id.gid) || !gid_valid(rule->dst_id.gid)) in parse_policy_line() 75 struct setid_rule *rule; in __release_ruleset() local [all …]
|
/Linux-v5.15/drivers/pnp/ |
D | manager.c | 23 unsigned char rule, in pnp_find_resource() argument 32 res->flags |= rule & IORESOURCE_BITS; in pnp_find_resource() 38 static int pnp_assign_port(struct pnp_dev *dev, struct pnp_port *rule, int idx) in pnp_assign_port() argument 42 res = pnp_find_resource(dev, rule->flags, IORESOURCE_IO, idx); in pnp_assign_port() 51 res->flags = rule->flags | IORESOURCE_AUTO; in pnp_assign_port() 55 if (!rule->size) { in pnp_assign_port() 61 res->start = rule->min; in pnp_assign_port() 62 res->end = res->start + rule->size - 1; in pnp_assign_port() 65 res->start += rule->align; in pnp_assign_port() 66 res->end = res->start + rule->size - 1; in pnp_assign_port() [all …]
|
/Linux-v5.15/net/ipv6/ |
D | fib6_rules.c | 31 static bool fib6_rule_matchall(const struct fib_rule *rule) in fib6_rule_matchall() argument 33 struct fib6_rule *r = container_of(rule, struct fib6_rule, common); in fib6_rule_matchall() 37 return fib_rule_matchall(rule); in fib6_rule_matchall() 40 bool fib6_rule_default(const struct fib_rule *rule) in fib6_rule_default() argument 42 if (!fib6_rule_matchall(rule) || rule->action != FR_ACT_TO_TBL || in fib6_rule_default() 43 rule->l3mdev) in fib6_rule_default() 45 if (rule->table != RT6_TABLE_LOCAL && rule->table != RT6_TABLE_MAIN) in fib6_rule_default() 132 static int fib6_rule_saddr(struct net *net, struct fib_rule *rule, int flags, in fib6_rule_saddr() argument 135 struct fib6_rule *r = (struct fib6_rule *)rule; in fib6_rule_saddr() 140 if ((rule->flags & FIB_RULE_FIND_SADDR) && in fib6_rule_saddr() [all …]
|
/Linux-v5.15/kernel/ |
D | auditfilter.c | 84 struct audit_krule *erule = &e->rule; in audit_free_rule() 118 entry->rule.fields = fields; in audit_init_entry() 210 struct audit_field *arch = entry->rule.arch_f; in audit_match_signal() 216 entry->rule.mask) && in audit_match_signal() 218 entry->rule.mask)); in audit_match_signal() 224 entry->rule.mask)); in audit_match_signal() 227 entry->rule.mask)); in audit_match_signal() 235 static inline struct audit_entry *audit_to_entry_common(struct audit_rule_data *rule) in audit_to_entry_common() argument 242 listnr = rule->flags & ~AUDIT_FILTER_PREPEND; in audit_to_entry_common() 258 if (unlikely(rule->action == AUDIT_POSSIBLE)) { in audit_to_entry_common() [all …]
|
/Linux-v5.15/include/net/ |
D | fib_rules.h | 53 struct fib_rule *rule; member 103 struct fib_rule *rule; member 126 static inline void fib_rule_get(struct fib_rule *rule) in fib_rule_get() argument 128 refcount_inc(&rule->refcnt); in fib_rule_get() 131 static inline void fib_rule_put(struct fib_rule *rule) in fib_rule_put() argument 133 if (refcount_dec_and_test(&rule->refcnt)) in fib_rule_put() 134 kfree_rcu(rule, rcu); in fib_rule_put() 138 static inline u32 fib_rule_get_table(struct fib_rule *rule, in fib_rule_get_table() argument 141 return rule->l3mdev ? arg->table : rule->table; in fib_rule_get_table() 144 static inline u32 fib_rule_get_table(struct fib_rule *rule, in fib_rule_get_table() argument [all …]
|
/Linux-v5.15/Documentation/networking/ |
D | tls-offload-reorder-bad.svg | 1 …rule="nonzero"/></clipPath><g clip-path="url(#p.0)"><path fill="#000000" fill-opacity="0.0" d="m0 …
|
D | tls-offload-reorder-good.svg | 1 …rule="nonzero"/></clipPath><g clip-path="url(#p.0)"><path fill="#000000" fill-opacity="0.0" d="m0 …
|
/Linux-v5.15/security/apparmor/ |
D | audit.c | 167 struct aa_audit_rule *rule = vrule; in aa_audit_rule_free() local 169 if (rule) { in aa_audit_rule_free() 170 if (!IS_ERR(rule->label)) in aa_audit_rule_free() 171 aa_put_label(rule->label); in aa_audit_rule_free() 172 kfree(rule); in aa_audit_rule_free() 178 struct aa_audit_rule *rule; in aa_audit_rule_init() local 189 rule = kzalloc(sizeof(struct aa_audit_rule), GFP_KERNEL); in aa_audit_rule_init() 191 if (!rule) in aa_audit_rule_init() 195 rule->label = aa_label_parse(&root_ns->unconfined->label, rulestr, in aa_audit_rule_init() 197 if (IS_ERR(rule->label)) { in aa_audit_rule_init() [all …]
|
/Linux-v5.15/drivers/net/ethernet/mellanox/mlx5/core/steering/ |
D | dr_rule.c | 368 dr_rule_rehash_htbl(struct mlx5dr_rule *rule, in dr_rule_rehash_htbl() argument 376 struct mlx5dr_matcher *matcher = rule->matcher; in dr_rule_rehash_htbl() 488 static struct mlx5dr_ste_htbl *dr_rule_rehash(struct mlx5dr_rule *rule, in dr_rule_rehash() argument 494 struct mlx5dr_domain *dmn = rule->matcher->tbl->dmn; in dr_rule_rehash() 503 return dr_rule_rehash_htbl(rule, nic_rule, cur_htbl, ste_location, in dr_rule_rehash() 549 static void dr_rule_remove_action_members(struct mlx5dr_rule *rule) in dr_rule_remove_action_members() argument 554 list_for_each_entry_safe(action_mem, tmp, &rule->rule_actions_list, list) { in dr_rule_remove_action_members() 561 static int dr_rule_add_action_members(struct mlx5dr_rule *rule, in dr_rule_add_action_members() argument 575 list_add_tail(&action_mem->list, &rule->rule_actions_list); in dr_rule_add_action_members() 582 dr_rule_remove_action_members(rule); in dr_rule_add_action_members() [all …]
|
/Linux-v5.15/drivers/net/ethernet/mellanox/mlxsw/ |
D | spectrum_flower.c | 243 struct flow_rule *rule = flow_cls_offload_flow_rule(f); in mlxsw_sp_flower_parse_meta() local 248 if (!flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_META)) in mlxsw_sp_flower_parse_meta() 251 flow_rule_match_meta(rule, &match); in mlxsw_sp_flower_parse_meta() 287 flow_rule_match_ipv4_addrs(f->rule, &match); in mlxsw_sp_flower_parse_ipv4() 302 flow_rule_match_ipv6_addrs(f->rule, &match); in mlxsw_sp_flower_parse_ipv6() 335 const struct flow_rule *rule = flow_cls_offload_flow_rule(f); in mlxsw_sp_flower_parse_ports() local 338 if (!flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_PORTS)) in mlxsw_sp_flower_parse_ports() 347 flow_rule_match_ports(rule, &match); in mlxsw_sp_flower_parse_ports() 362 const struct flow_rule *rule = flow_cls_offload_flow_rule(f); in mlxsw_sp_flower_parse_tcp() local 365 if (!flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_TCP)) in mlxsw_sp_flower_parse_tcp() [all …]
|
D | spectrum_acl.c | 724 struct mlxsw_sp_acl_rule *rule; in mlxsw_sp_acl_rule_create() local 728 rule = kzalloc(sizeof(*rule) + ops->rule_priv_size, in mlxsw_sp_acl_rule_create() 730 if (!rule) { in mlxsw_sp_acl_rule_create() 734 rule->cookie = cookie; in mlxsw_sp_acl_rule_create() 735 rule->ruleset = ruleset; in mlxsw_sp_acl_rule_create() 737 rule->rulei = mlxsw_sp_acl_rulei_create(mlxsw_sp->acl, afa_block); in mlxsw_sp_acl_rule_create() 738 if (IS_ERR(rule->rulei)) { in mlxsw_sp_acl_rule_create() 739 err = PTR_ERR(rule->rulei); in mlxsw_sp_acl_rule_create() 743 return rule; in mlxsw_sp_acl_rule_create() 746 kfree(rule); in mlxsw_sp_acl_rule_create() [all …]
|
D | spectrum2_mr_tcam.c | 184 mlxsw_sp2_mr_tcam_rule_parse(struct mlxsw_sp_acl_rule *rule, in mlxsw_sp2_mr_tcam_rule_parse() argument 190 rulei = mlxsw_sp_acl_rule_rulei(rule); in mlxsw_sp2_mr_tcam_rule_parse() 215 struct mlxsw_sp_acl_rule *rule; in mlxsw_sp2_mr_tcam_route_create() local 223 rule = mlxsw_sp_acl_rule_create(mlxsw_sp, ruleset, in mlxsw_sp2_mr_tcam_route_create() 226 if (IS_ERR(rule)) in mlxsw_sp2_mr_tcam_route_create() 227 return PTR_ERR(rule); in mlxsw_sp2_mr_tcam_route_create() 229 mlxsw_sp2_mr_tcam_rule_parse(rule, key, prio); in mlxsw_sp2_mr_tcam_route_create() 230 err = mlxsw_sp_acl_rule_add(mlxsw_sp, rule); in mlxsw_sp2_mr_tcam_route_create() 237 mlxsw_sp_acl_rule_destroy(mlxsw_sp, rule); in mlxsw_sp2_mr_tcam_route_create() 248 struct mlxsw_sp_acl_rule *rule; in mlxsw_sp2_mr_tcam_route_destroy() local [all …]
|
/Linux-v5.15/drivers/net/ethernet/aquantia/atlantic/ |
D | aq_filters.c | 70 struct aq_rx_filter *rule; in aq_rule_already_exists() local 74 hlist_for_each_entry_safe(rule, aq_node2, in aq_rule_already_exists() 76 if (rule->aq_fsp.location == fsp->location) in aq_rule_already_exists() 78 if (aq_match_filter(&rule->aq_fsp, fsp)) { in aq_rule_already_exists() 434 struct aq_rx_filter *rule = NULL; in aq_del_fvlan_by_vlan() local 437 hlist_for_each_entry_safe(rule, aq_node2, in aq_del_fvlan_by_vlan() 439 if (be16_to_cpu(rule->aq_fsp.h_ext.vlan_tci) == vlan_id) in aq_del_fvlan_by_vlan() 442 if (rule && rule->type == aq_rx_filter_vlan && in aq_del_fvlan_by_vlan() 443 be16_to_cpu(rule->aq_fsp.h_ext.vlan_tci) == vlan_id) { in aq_del_fvlan_by_vlan() 446 cmd.fs.location = rule->aq_fsp.location; in aq_del_fvlan_by_vlan() [all …]
|
/Linux-v5.15/drivers/net/ethernet/mellanox/mlx5/core/lib/ |
D | fs_ttc.c | 47 if (!IS_ERR_OR_NULL(ttc->rules[i].rule)) { in mlx5_cleanup_ttc_rules() 48 mlx5_del_flow_rules(ttc->rules[i].rule); in mlx5_cleanup_ttc_rules() 49 ttc->rules[i].rule = NULL; in mlx5_cleanup_ttc_rules() 199 struct mlx5_flow_handle *rule; in mlx5_generate_ttc_rule() local 225 rule = mlx5_add_flow_rules(ft, spec, &flow_act, dest, 1); in mlx5_generate_ttc_rule() 226 if (IS_ERR(rule)) { in mlx5_generate_ttc_rule() 227 err = PTR_ERR(rule); in mlx5_generate_ttc_rule() 232 return err ? ERR_PTR(err) : rule; in mlx5_generate_ttc_rule() 248 struct mlx5_ttc_rule *rule = &rules[tt]; in mlx5_generate_ttc_table_rules() local 250 rule->rule = mlx5_generate_ttc_rule(dev, ft, ¶ms->dests[tt], in mlx5_generate_ttc_table_rules() [all …]
|
/Linux-v5.15/net/decnet/ |
D | dn_rules.c | 63 res->r = arg.rule; in dn_fib_lookup() 68 static int dn_fib_rule_action(struct fib_rule *rule, struct flowi *flp, in dn_fib_rule_action() argument 75 switch(rule->action) { in dn_fib_rule_action() 93 tbl = dn_fib_get_table(rule->table, 0); in dn_fib_rule_action() 108 static int dn_fib_rule_match(struct fib_rule *rule, struct flowi *fl, int flags) in dn_fib_rule_match() argument 110 struct dn_fib_rule *r = (struct dn_fib_rule *)rule; in dn_fib_rule_match() 122 static int dn_fib_rule_configure(struct fib_rule *rule, struct sk_buff *skb, in dn_fib_rule_configure() argument 128 struct dn_fib_rule *r = (struct dn_fib_rule *)rule; in dn_fib_rule_configure() 135 if (rule->table == RT_TABLE_UNSPEC) { in dn_fib_rule_configure() 136 if (rule->action == FR_ACT_TO_TBL) { in dn_fib_rule_configure() [all …]
|