Home
last modified time | relevance | path

Searched full:rule (Results 1 – 25 of 986) sorted by relevance

12345678910>>...40

/linux/net/core/
H A Dfib_rules.c38 bool fib_rule_matchall(const struct fib_rule *rule) in fib_rule_matchall() argument
40 if (READ_ONCE(rule->iifindex) || READ_ONCE(rule->oifindex) || in fib_rule_matchall()
41 rule->mark || rule->tun_id || rule->flags) in fib_rule_matchall()
43 if (rule->suppress_ifgroup != -1 || rule->suppress_prefixlen != -1) in fib_rule_matchall()
45 if (!uid_eq(rule->uid_range.start, fib_kuid_range_unset.start) || in fib_rule_matchall()
46 !uid_eq(rule->uid_range.end, fib_kuid_range_unset.end)) in fib_rule_matchall()
48 if (fib_rule_port_range_set(&rule->sport_range)) in fib_rule_matchall()
50 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 …]
/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()
22 /* enable rule after all settings are done */ 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()
[all …]
/linux/scripts/gendwarfksyms/
H A Dkabi.c16 * The rule section consists of four null-terminated strings per
23 * Type of the kABI rule. Must be one of the tags defined below.
26 * Rule-dependent target, typically the fully qualified name of
30 * Rule-dependent value.
38 * Rule: declonly
45 * Rule: enumerator_ignore
51 * Rule: enumerator_value
58 * Rule: byte_size
65 * Rule: type_string
82 struct rule { struct
[all …]
/linux/drivers/net/ethernet/microchip/vcap/
H A Dvcap_api_client.h16 /* Client supplied VCAP rule key control part */
18 struct list_head list; /* For insertion into a rule */
63 /* Client supplied VCAP rule field data */
77 /* Client supplied VCAP rule key (value, mask) */
83 /* Client supplied VCAP rule action control part */
85 struct list_head list; /* For insertion into a rule */
156 /* VCAP rule operations */
157 /* Allocate a rule and fill in the basic information */
164 /* Free mem of a rule owned by client */
165 void vcap_free_rule(struct vcap_rule *rule);
[all …]
H A Dvcap_api.c33 /* Moving a rule in the VCAP address space */
363 /* Read key data from a VCAP address and discover if there are any rule keysets
532 vcap_copy_from_client_keyfield(struct vcap_rule *rule, in vcap_copy_from_client_keyfield() argument
536 struct vcap_rule_internal *ri = to_intrule(rule); in vcap_copy_from_client_keyfield()
587 vcap_copy_from_client_actionfield(struct vcap_rule *rule, in vcap_copy_from_client_actionfield() argument
591 struct vcap_rule_internal *ri = to_intrule(rule); in vcap_copy_from_client_actionfield()
666 /* Iterate over the keyfields (key, mask) in the rule in vcap_encode_rule_keyset()
670 pr_err("%s:%d: no keyfields in the rule\n", __func__, __LINE__); in vcap_encode_rule_keyset()
825 /* Iterate over the actionfields in the rule in vcap_encode_rule_actionset()
829 pr_warn("%s:%d: no actionfields in the rule\n", in vcap_encode_rule_actionset()
[all …]
/linux/drivers/net/dsa/sja1105/
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 …]
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 …]
/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 …]
/linux/security/selinux/include/
H A Daudit.h19 * selinux_audit_rule_init - alloc/init an selinux audit rule structure.
20 * @field: the field this rule refers to
21 * @op: the operator the rule uses
22 * @rulestr: the text "target" of the rule
23 * @rule: pointer to the new rule structure returned via this
26 * Returns 0 if successful, -errno if not. On success, the rule structure
30 int selinux_audit_rule_init(u32 field, u32 op, char *rulestr, void **rule,
34 * selinux_audit_rule_free - free an selinux audit rule structure.
35 * @rule: pointer to the audit rule to be freed
37 * This will free all memory associated with the given rule.
[all …]
/linux/drivers/net/dsa/microchip/
H A Dksz9477_tc_flower.c12 * ksz9477_flower_parse_key_l2 - Parse Layer 2 key from flow rule and configure
17 * @rule: Pointer to the flow_rule.
21 * This function parses the Layer 2 key from the flow rule and configures
29 struct flow_rule *rule, in ksz9477_flower_parse_key_l2() argument
40 if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_BASIC)) { in ksz9477_flower_parse_key_l2()
43 flow_rule_match_basic(rule, &match); in ksz9477_flower_parse_key_l2()
56 if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_ETH_ADDRS)) { in ksz9477_flower_parse_key_l2()
57 flow_rule_match_eth_addrs(rule, &ematch); in ksz9477_flower_parse_key_l2()
95 * ksz9477_flower_parse_key - Parse flow rule keys for a specified port on a
98 * @port: The port number to parse the flow rule keys for.
[all …]
/linux/drivers/net/ethernet/google/gve/
H A Dgve_flow_rule.c12 struct gve_adminq_queried_flow_rule *rule) in gve_fill_ethtool_flow_spec() argument
14 struct gve_adminq_flow_rule *flow_rule = &rule->flow_rule; in gve_fill_ethtool_flow_spec()
107 struct gve_adminq_flow_rule *rule) in gve_generate_flow_rule() argument
129 rule->action = cpu_to_be16(fsp->ring_cookie); in gve_generate_flow_rule()
135 rule->flow_type = cpu_to_be16(flow_type_lut[flow_type]); in gve_generate_flow_rule()
141 rule->key.src_ip[0] = fsp->h_u.tcp_ip4_spec.ip4src; in gve_generate_flow_rule()
142 rule->key.dst_ip[0] = fsp->h_u.tcp_ip4_spec.ip4dst; in gve_generate_flow_rule()
143 rule->key.src_port = fsp->h_u.tcp_ip4_spec.psrc; in gve_generate_flow_rule()
144 rule->key.dst_port = fsp->h_u.tcp_ip4_spec.pdst; in gve_generate_flow_rule()
145 rule->mask.src_ip[0] = fsp->m_u.tcp_ip4_spec.ip4src; in gve_generate_flow_rule()
[all …]
/linux/drivers/pnp/
H A Dmanager.c23 unsigned char rule, in pnp_find_resource() argument
29 /* when the resource already exists, set its resource bits from rule */ in pnp_find_resource()
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()
[all …]
/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
70 /* whole struct (rule->re_arg) must be initialized with 0 */ in prestera_flower_parse_actions()
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()
[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 …]
/linux/net/ipv6/
H A Dfib6_rules.c36 static bool fib6_rule_matchall(const struct fib_rule *rule) in fib6_rule_matchall() argument
38 struct fib6_rule *r = container_of(rule, struct fib6_rule, common); in fib6_rule_matchall()
42 return fib_rule_matchall(rule); in fib6_rule_matchall()
45 bool fib6_rule_default(const struct fib_rule *rule) in fib6_rule_default() argument
47 if (!fib6_rule_matchall(rule) || rule->action != FR_ACT_TO_TBL || in fib6_rule_default()
48 rule->l3mdev) in fib6_rule_default()
50 if (rule->table != RT6_TABLE_LOCAL && rule->table != RT6_TABLE_MAIN) in fib6_rule_default()
137 static int fib6_rule_saddr(struct net *net, struct fib_rule *rule, int flags, in fib6_rule_saddr() argument
140 struct fib6_rule *r = (struct fib6_rule *)rule; in fib6_rule_saddr()
143 * we check the result if it meets requirement of the rule. in fib6_rule_saddr()
[all …]
/linux/net/ipv4/
H A Dfib_rules.c51 static bool fib4_rule_matchall(const struct fib_rule *rule) in fib4_rule_matchall() argument
53 struct fib4_rule *r = container_of(rule, struct fib4_rule, common); in fib4_rule_matchall()
57 return fib_rule_matchall(rule); in fib4_rule_matchall()
60 bool fib4_rule_default(const struct fib_rule *rule) in fib4_rule_default() argument
62 if (!fib4_rule_matchall(rule) || rule->action != FR_ACT_TO_TBL || in fib4_rule_default()
63 rule->l3mdev) in fib4_rule_default()
65 if (rule->table != RT_TABLE_LOCAL && rule->table != RT_TABLE_MAIN && in fib4_rule_default()
66 rule->table != RT_TABLE_DEFAULT) in fib4_rule_default()
97 if (arg.rule) in __fib_lookup()
98 res->tclassid = ((struct fib4_rule *)arg.rule)->tclassid; in __fib_lookup()
[all …]
/linux/tools/testing/selftests/drivers/net/mlxsw/
H A Dtc_restrictions.sh42 # shared block with a drop rule.
49 check_err $? "Failed to add drop rule to ingress bound block"
62 …check_err $? "Failed to create another clsact with egress shared block after blocker drop rule rem…
66 check_fail $? "Incorrect success to add drop rule to mixed bound block"
75 check_err $? "Failed to add drop rule to egress bound shared block"
98 check_err $? "Failed to add redirect rule to ingress bound block"
111 …check_err $? "Failed to create another clsact with egress shared block after blocker redirect rule
116 check_fail $? "Incorrect success to add redirect rule to mixed bound block"
126 check_fail $? "Incorrect success to add redirect rule to egress bound shared block"
133 check_fail $? "Incorrect success to add redirect rule to egress bound block"
[all …]
/linux/include/net/
H A Dfib_rules.h57 struct fib_rule *rule; member
106 struct fib_rule *rule; member
109 static inline void fib_rule_get(struct fib_rule *rule) in fib_rule_get() argument
111 refcount_inc(&rule->refcnt); in fib_rule_get()
114 static inline void fib_rule_put(struct fib_rule *rule) in fib_rule_put() argument
116 if (refcount_dec_and_test(&rule->refcnt)) in fib_rule_put()
117 kfree_rcu(rule, rcu); in fib_rule_put()
121 static inline u32 fib_rule_get_table(struct fib_rule *rule, in fib_rule_get_table() argument
124 return rule->l3mdev ? arg->table : rule->table; in fib_rule_get_table()
127 static inline u32 fib_rule_get_table(struct fib_rule *rule, in fib_rule_get_table() argument
[all …]
/linux/Documentation/networking/
H A Dtls-offload-reorder-bad.svg1rule="nonzero"/></clipPath><g clip-path="url(#p.0)"><path fill="#000000" fill-opacity="0.0" d="m0 …
H A Dtls-offload-reorder-good.svg1rule="nonzero"/></clipPath><g clip-path="url(#p.0)"><path fill="#000000" fill-opacity="0.0" d="m0 …
/linux/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/
H A Dmlx5hws.h118 } rule; member
241 * mlx5hws_context_open - Open a context used for direct rule insertion
275 * mlx5hws_table_create - Create a new direct rule table.
288 * mlx5hws_table_destroy - Destroy direct rule table.
366 * mlx5hws_matcher_create - Create a new direct rule matcher.
392 * mlx5hws_matcher_destroy - Destroy a direct rule matcher.
401 * mlx5hws_matcher_attach_at - Attach a new action template to a direct rule matcher.
435 * mlx5hws_matcher_resize_rule_move - Enqueue moving rule operation.
437 * This function enqueues the operation of moving a rule from the source
440 * @src_matcher: Matcher that the rule belongs to.
[all …]
/linux/drivers/net/ethernet/sfc/
H A Dtc.c226 if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_##_name)) { \
229 flow_rule_match_##_tcget(rule, &fm); \
239 struct flow_rule *rule, in efx_tc_flower_parse_match() argument
243 struct flow_dissector *dissector = rule->match.dissector; in efx_tc_flower_parse_match()
252 if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_CONTROL)) { in efx_tc_flower_parse_match()
255 flow_rule_match_control(rule, &fm); in efx_tc_flower_parse_match()
321 if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_VLAN)) { in efx_tc_flower_parse_match()
324 flow_rule_match_vlan(rule, &fm); in efx_tc_flower_parse_match()
335 if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_CVLAN)) { in efx_tc_flower_parse_match()
338 flow_rule_match_cvlan(rule, &fm); in efx_tc_flower_parse_match()
[all …]
/linux/drivers/net/ethernet/mellanox/mlx5/core/en/tc/
H A Dpost_meter.c23 struct mlx5_flow_handle *rule; member
155 struct mlx5_flow_handle *rule; in mlx5e_post_meter_rate_rules_create() local
166 rule = mlx5e_post_meter_add_rule(priv, post_meter, spec, red_attr, in mlx5e_post_meter_rate_rules_create()
168 if (IS_ERR(rule)) { in mlx5e_post_meter_rate_rules_create()
169 mlx5_core_warn(priv->mdev, "Failed to create post_meter exceed rule\n"); in mlx5e_post_meter_rate_rules_create()
170 err = PTR_ERR(rule); in mlx5e_post_meter_rate_rules_create()
173 table->red_rule = rule; in mlx5e_post_meter_rate_rules_create()
179 rule = mlx5e_post_meter_add_rule(priv, post_meter, spec, green_attr, in mlx5e_post_meter_rate_rules_create()
181 if (IS_ERR(rule)) { in mlx5e_post_meter_rate_rules_create()
182 mlx5_core_warn(priv->mdev, "Failed to create post_meter notexceed rule\n"); in mlx5e_post_meter_rate_rules_create()
[all …]
/linux/net/netfilter/
H A Dnf_tables_core.c43 const struct nft_rule_dp *rule, in __nft_trace_packet() argument
52 nft_trace_notify(pkt, verdict, rule, info); in __nft_trace_packet()
58 const struct nft_rule_dp *rule, in nft_trace_packet() argument
63 __nft_trace_packet(pkt, verdict, rule, info, type); in nft_trace_packet()
110 const struct nft_rule_dp *rule, in __nft_trace_verdict() argument
132 __nft_trace_packet(pkt, &regs->verdict, rule, info, type); in __nft_trace_verdict()
137 const struct nft_rule_dp *rule, in nft_trace_verdict() argument
141 __nft_trace_verdict(pkt, info, rule, regs); in nft_trace_verdict()
200 const struct nft_rule_dp *rule; member
240 #define nft_rule_expr_first(rule) (struct nft_expr *)&rule->data[0] argument
[all …]

12345678910>>...40