Home
last modified time | relevance | path

Searched refs:rule (Results 1 – 25 of 697) sorted by relevance

12345678910>>...28

/openbmc/linux/net/core/
H A Dfib_rules.c37 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 …]
H A Dflow_offload.c12 struct flow_rule *rule; in flow_rule_alloc() local
15 rule = kzalloc(struct_size(rule, action.entries, num_actions), in flow_rule_alloc()
17 if (!rule) in flow_rule_alloc()
20 rule->action.num_entries = num_actions; in flow_rule_alloc()
25 rule->action.entries[i].hw_stats = FLOW_ACTION_HW_STATS_DONT_CARE; in flow_rule_alloc()
27 return rule; in flow_rule_alloc()
58 void flow_rule_match_meta(const struct flow_rule *rule, in flow_rule_match_meta() argument
61 FLOW_DISSECTOR_MATCH(rule, FLOW_DISSECTOR_KEY_META, out); in flow_rule_match_meta()
65 void flow_rule_match_basic(const struct flow_rule *rule, in flow_rule_match_basic() argument
68 FLOW_DISSECTOR_MATCH(rule, FLOW_DISSECTOR_KEY_BASIC, out); in flow_rule_match_basic()
[all …]
/openbmc/linux/drivers/net/ethernet/engleder/
H A Dtsnep_rxnfc.c9 struct tsnep_rxnfc_rule *rule) in tsnep_enable_rule() argument
15 rx_assign |= (rule->queue_index << TSNEP_RX_ASSIGN_QUEUE_SHIFT) & in tsnep_enable_rule()
19 TSNEP_RX_ASSIGN_ETHER_TYPE_OFFSET * rule->location; in tsnep_enable_rule()
20 iowrite16(rule->filter.ether_type, addr); in tsnep_enable_rule()
24 TSNEP_RX_ASSIGN_OFFSET * rule->location; in tsnep_enable_rule()
29 struct tsnep_rxnfc_rule *rule) in tsnep_disable_rule() argument
34 TSNEP_RX_ASSIGN_OFFSET * rule->location; in tsnep_disable_rule()
41 struct tsnep_rxnfc_rule *rule; in tsnep_get_rule() local
43 list_for_each_entry(rule, &adapter->rxnfc_rules, list) { in tsnep_get_rule()
44 if (rule->location == location) in tsnep_get_rule()
[all …]
/openbmc/linux/drivers/net/dsa/sja1105/
H A Dsja1105_vl.c12 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 …]
H A Dsja1105_flower.c10 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 …]
/openbmc/linux/net/ipv4/
H A Dfib_rules.c49 static bool fib4_rule_matchall(const struct fib_rule *rule) in fib4_rule_matchall() argument
51 struct fib4_rule *r = container_of(rule, struct fib4_rule, common); in fib4_rule_matchall()
55 return fib_rule_matchall(rule); in fib4_rule_matchall()
58 bool fib4_rule_default(const struct fib_rule *rule) in fib4_rule_default() argument
60 if (!fib4_rule_matchall(rule) || rule->action != FR_ACT_TO_TBL || in fib4_rule_default()
61 rule->l3mdev) in fib4_rule_default()
63 if (rule->table != RT_TABLE_LOCAL && rule->table != RT_TABLE_MAIN && in fib4_rule_default()
64 rule->table != RT_TABLE_DEFAULT) in fib4_rule_default()
95 if (arg.rule) in __fib_lookup()
96 res->tclassid = ((struct fib4_rule *)arg.rule)->tclassid; in __fib_lookup()
[all …]
/openbmc/linux/drivers/net/ethernet/netronome/nfp/flower/
H A Dmatch.c25 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()
104 flow_rule_match_eth_addrs(rule, &match); in nfp_flower_compile_mac()
121 struct flow_rule *rule, in nfp_flower_compile_mpls() argument
124 if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_MPLS)) { in nfp_flower_compile_mpls()
[all …]
/openbmc/linux/security/safesetid/
H A Dsecurityfs.c32 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 …]
/openbmc/linux/drivers/pnp/
H A Dmanager.c23 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 …]
/openbmc/linux/kernel/
H A Dauditfilter.c86 struct audit_krule *erule = &e->rule; in audit_free_rule()
120 entry->rule.fields = fields; in audit_init_entry()
213 struct audit_field *arch = entry->rule.arch_f; in audit_match_signal()
219 entry->rule.mask) && in audit_match_signal()
221 entry->rule.mask)); in audit_match_signal()
227 entry->rule.mask)); in audit_match_signal()
230 entry->rule.mask)); in audit_match_signal()
238 static inline struct audit_entry *audit_to_entry_common(struct audit_rule_data *rule) in audit_to_entry_common() argument
245 listnr = rule->flags & ~AUDIT_FILTER_PREPEND; in audit_to_entry_common()
262 if (unlikely(rule->action == AUDIT_POSSIBLE)) { in audit_to_entry_common()
[all …]
/openbmc/linux/net/ipv6/
H A Dfib6_rules.c32 static bool fib6_rule_matchall(const struct fib_rule *rule) in fib6_rule_matchall() argument
34 struct fib6_rule *r = container_of(rule, struct fib6_rule, common); in fib6_rule_matchall()
38 return fib_rule_matchall(rule); in fib6_rule_matchall()
41 bool fib6_rule_default(const struct fib_rule *rule) in fib6_rule_default() argument
43 if (!fib6_rule_matchall(rule) || rule->action != FR_ACT_TO_TBL || in fib6_rule_default()
44 rule->l3mdev) in fib6_rule_default()
46 if (rule->table != RT6_TABLE_LOCAL && rule->table != RT6_TABLE_MAIN) in fib6_rule_default()
133 static int fib6_rule_saddr(struct net *net, struct fib_rule *rule, int flags, in fib6_rule_saddr() argument
136 struct fib6_rule *r = (struct fib6_rule *)rule; in fib6_rule_saddr()
141 if ((rule->flags & FIB_RULE_FIND_SADDR) && in fib6_rule_saddr()
[all …]
/openbmc/qemu/authz/
H A Dlist.c36 QAuthZListRule *rule = rules->value; in qauthz_list_is_allowed() local
37 QAuthZListFormat format = rule->has_format ? rule->format : in qauthz_list_is_allowed()
40 trace_qauthz_list_check_rule(authz, rule->match, identity, in qauthz_list_is_allowed()
41 format, rule->policy); in qauthz_list_is_allowed()
44 if (g_str_equal(rule->match, identity)) { in qauthz_list_is_allowed()
45 return rule->policy == QAUTHZ_LIST_POLICY_ALLOW; in qauthz_list_is_allowed()
49 if (g_pattern_match_simple(rule->match, identity)) { in qauthz_list_is_allowed()
50 return rule->policy == QAUTHZ_LIST_POLICY_ALLOW; in qauthz_list_is_allowed()
156 QAuthZListRule *rule; in qauthz_list_append_rule() local
160 rule = g_new0(QAuthZListRule, 1); in qauthz_list_append_rule()
[all …]
/openbmc/linux/include/net/
H A Dfib_rules.h53 struct fib_rule *rule; member
102 struct fib_rule *rule; member
105 static inline void fib_rule_get(struct fib_rule *rule) in fib_rule_get() argument
107 refcount_inc(&rule->refcnt); in fib_rule_get()
110 static inline void fib_rule_put(struct fib_rule *rule) in fib_rule_put() argument
112 if (refcount_dec_and_test(&rule->refcnt)) in fib_rule_put()
113 kfree_rcu(rule, rcu); in fib_rule_put()
117 static inline u32 fib_rule_get_table(struct fib_rule *rule, in fib_rule_get_table() argument
120 return rule->l3mdev ? arg->table : rule->table; in fib_rule_get_table()
123 static inline u32 fib_rule_get_table(struct fib_rule *rule, in fib_rule_get_table() argument
[all …]
/openbmc/linux/drivers/net/ethernet/microchip/vcap/
H A Dvcap_api_client.h165 void vcap_free_rule(struct vcap_rule *rule);
167 int vcap_val_rule(struct vcap_rule *rule, u16 l3_proto);
169 int vcap_add_rule(struct vcap_rule *rule);
173 struct vcap_rule *vcap_copy_rule(struct vcap_rule *rule);
177 int vcap_mod_rule(struct vcap_rule *rule);
180 int vcap_set_rule_set_keyset(struct vcap_rule *rule,
183 int vcap_set_rule_set_actionset(struct vcap_rule *rule,
186 void vcap_rule_set_counter_id(struct vcap_rule *rule, u32 counter_id);
189 int vcap_rule_add_key_bit(struct vcap_rule *rule, enum vcap_key_field key,
191 int vcap_rule_add_key_u32(struct vcap_rule *rule, enum vcap_key_field key,
[all …]
/openbmc/linux/drivers/net/ethernet/marvell/prestera/
H A Dprestera_flower.c35 struct prestera_acl_rule *rule, in prestera_flower_parse_goto_action() argument
45 if (rule->re_arg.jump.valid) in prestera_flower_parse_goto_action()
53 rule->re_arg.jump.valid = 1; in prestera_flower_parse_goto_action()
54 rule->re_arg.jump.i.index = prestera_acl_ruleset_index_get(ruleset); in prestera_flower_parse_goto_action()
56 rule->jump_ruleset = ruleset; in prestera_flower_parse_goto_action()
62 struct prestera_acl_rule *rule, in prestera_flower_parse_actions() argument
82 rule->re_arg.count.valid = true; in prestera_flower_parse_actions()
84 &rule->re_arg.count.client); in prestera_flower_parse_actions()
95 if (rule->re_arg.accept.valid) in prestera_flower_parse_actions()
98 rule->re_arg.accept.valid = 1; in prestera_flower_parse_actions()
[all …]
H A Dprestera_acl.c383 struct prestera_acl_rule *rule; in prestera_acl_ruleset_prio_refresh() local
388 list_for_each_entry(rule, &acl->rules, list) { in prestera_acl_ruleset_prio_refresh()
389 if (ruleset->ingress != rule->ruleset->ingress) in prestera_acl_ruleset_prio_refresh()
391 if (ruleset->ht_key.chain_index != rule->chain_index) in prestera_acl_ruleset_prio_refresh()
394 ruleset->prio.min = min(ruleset->prio.min, rule->priority); in prestera_acl_ruleset_prio_refresh()
395 ruleset->prio.max = max(ruleset->prio.max, rule->priority); in prestera_acl_ruleset_prio_refresh()
400 prestera_acl_rule_keymask_pcl_id_set(struct prestera_acl_rule *rule, u16 pcl_id) in prestera_acl_rule_keymask_pcl_id_set() argument
402 struct prestera_acl_match *r_match = &rule->re_key.match; in prestera_acl_rule_keymask_pcl_id_set()
439 struct prestera_acl_rule *rule; in prestera_acl_rule_create() local
441 rule = kzalloc(sizeof(*rule), GFP_KERNEL); in prestera_acl_rule_create()
[all …]
/openbmc/bmcweb/http/
H A Drouting.hpp348 DynamicRule& newRuleDynamic(const std::string& rule) in newRuleDynamic() argument
351 std::make_unique<DynamicRule>(rule); in newRuleDynamic()
359 auto& newRuleTagged(const std::string& rule) in newRuleTagged() argument
364 std::unique_ptr<RuleT> ruleObject = std::make_unique<RuleT>(rule); in newRuleTagged()
372 std::unique_ptr<RuleT> ruleObject = std::make_unique<RuleT>(rule); in newRuleTagged()
380 std::unique_ptr<RuleT> ruleObject = std::make_unique<RuleT>(rule); in newRuleTagged()
388 std::unique_ptr<RuleT> ruleObject = std::make_unique<RuleT>(rule); in newRuleTagged()
397 std::unique_ptr<RuleT> ruleObject = std::make_unique<RuleT>(rule); in newRuleTagged()
406 std::unique_ptr<RuleT> ruleObject = std::make_unique<RuleT>(rule); in newRuleTagged()
422 void internalAdd(std::string_view rule, BaseRule* ruleObject) in internalAdd()
[all …]
/openbmc/linux/Documentation/networking/
H A Dtls-offload-reorder-good.svg1rule="nonzero"/></clipPath><g clip-path="url(#p.0)"><path fill="#000000" fill-opacity="0.0" d="m0 …
H A Dtls-offload-reorder-bad.svg1rule="nonzero"/></clipPath><g clip-path="url(#p.0)"><path fill="#000000" fill-opacity="0.0" d="m0 …
/openbmc/u-boot/drivers/ddr/altera/
H A Dsdram_gen5.c17 u32 rule; /* SDRAM protection rule number: 0-19 */ member
111 int ruleno = prule->rule; in sdram_set_rule()
149 int ruleno = prule->rule; in sdram_get_rule()
177 struct sdram_prot_rule rule; in sdram_set_protection_config() local
184 memset(&rule, 0, sizeof(rule)); in sdram_set_protection_config()
187 rule.rule = rules; in sdram_set_protection_config()
188 sdram_set_rule(&rule); in sdram_set_protection_config()
192 rule.sdram_start = sdram_start; in sdram_set_protection_config()
193 rule.sdram_end = sdram_end; in sdram_set_protection_config()
194 rule.lo_prot_id = 0x0; in sdram_set_protection_config()
[all …]
/openbmc/linux/security/apparmor/
H A Daudit.c211 struct aa_audit_rule *rule = vrule; in aa_audit_rule_free() local
213 if (rule) { in aa_audit_rule_free()
214 if (!IS_ERR(rule->label)) in aa_audit_rule_free()
215 aa_put_label(rule->label); in aa_audit_rule_free()
216 kfree(rule); in aa_audit_rule_free()
222 struct aa_audit_rule *rule; in aa_audit_rule_init() local
233 rule = kzalloc(sizeof(struct aa_audit_rule), gfp); in aa_audit_rule_init()
235 if (!rule) in aa_audit_rule_init()
239 rule->label = aa_label_parse(&root_ns->unconfined->label, rulestr, in aa_audit_rule_init()
241 if (IS_ERR(rule->label)) { in aa_audit_rule_init()
[all …]
/openbmc/linux/drivers/net/ethernet/mellanox/mlx5/core/steering/
H A Ddr_rule.c394 dr_rule_rehash_htbl(struct mlx5dr_rule *rule, in dr_rule_rehash_htbl() argument
402 struct mlx5dr_matcher *matcher = rule->matcher; in dr_rule_rehash_htbl()
515 static struct mlx5dr_ste_htbl *dr_rule_rehash(struct mlx5dr_rule *rule, in dr_rule_rehash() argument
521 struct mlx5dr_domain *dmn = rule->matcher->tbl->dmn; in dr_rule_rehash()
530 return dr_rule_rehash_htbl(rule, nic_rule, cur_htbl, ste_location, in dr_rule_rehash()
576 static void dr_rule_remove_action_members(struct mlx5dr_rule *rule) in dr_rule_remove_action_members() argument
581 list_for_each_entry_safe(action_mem, tmp, &rule->rule_actions_list, list) { in dr_rule_remove_action_members()
588 static int dr_rule_add_action_members(struct mlx5dr_rule *rule, in dr_rule_add_action_members() argument
602 list_add_tail(&action_mem->list, &rule->rule_actions_list); in dr_rule_add_action_members()
609 dr_rule_remove_action_members(rule); in dr_rule_add_action_members()
[all …]
/openbmc/linux/net/netfilter/
H A Dnf_tables_core.c46 const struct nft_rule_dp *rule, in __nft_trace_packet() argument
55 nft_trace_notify(pkt, verdict, rule, info); in __nft_trace_packet()
61 const struct nft_rule_dp *rule, in nft_trace_packet() argument
66 __nft_trace_packet(pkt, verdict, rule, info, type); in nft_trace_packet()
113 const struct nft_rule_dp *rule, in __nft_trace_verdict() argument
135 __nft_trace_packet(pkt, &regs->verdict, rule, info, type); in __nft_trace_verdict()
140 const struct nft_rule_dp *rule, in nft_trace_verdict() argument
144 __nft_trace_verdict(pkt, info, rule, regs); in nft_trace_verdict()
203 const struct nft_rule_dp *rule; member
243 #define nft_rule_expr_first(rule) (struct nft_expr *)&rule->data[0] argument
[all …]
/openbmc/qemu/block/
H A Dblkdebug.c188 struct BlkdebugRule *rule; in add_rule() local
205 rule = g_malloc0(sizeof(*rule)); in add_rule()
206 *rule = (struct BlkdebugRule) { in add_rule()
215 rule->options.inject.error = qemu_opt_get_number(opts, "errno", EIO); in add_rule()
216 rule->options.inject.once = qemu_opt_get_bool(opts, "once", 0); in add_rule()
217 rule->options.inject.immediately = in add_rule()
220 rule->options.inject.offset = in add_rule()
228 g_free(rule); in add_rule()
232 rule->options.inject.iotype_mask = (1ull << iotype); in add_rule()
235 rule->options.inject.iotype_mask = in add_rule()
[all …]
/openbmc/phosphor-power/phosphor-regulators/test/
H A Drule_tests.cpp45 Rule rule("set_voltage_rule", std::move(actions)); in TEST() local
46 EXPECT_EQ(rule.getID(), "set_voltage_rule"); in TEST()
47 EXPECT_EQ(rule.getActions().size(), 2); in TEST()
67 Rule rule("set_voltage_rule", std::move(actions)); in TEST() local
68 rule.execute(env); in TEST()
92 Rule rule("set_voltage_rule", std::move(actions)); in TEST() local
93 EXPECT_EQ(rule.execute(env), false); in TEST()
111 Rule rule("set_voltage_rule", std::move(actions)); in TEST() local
112 EXPECT_EQ(rule.getActions().size(), 2); in TEST()
113 EXPECT_EQ(rule.getActions()[0].get(), action1); in TEST()
[all …]

12345678910>>...28