| /Linux-v6.1/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 | 12 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-v6.1/drivers/net/ethernet/engleder/ |
| D | tsnep_rxnfc.c | 9 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-v6.1/drivers/net/dsa/sja1105/ |
| 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 …]
|
| 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 …]
|
| /Linux-v6.1/security/selinux/include/ |
| D | audit.h | 19 * 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 25 * Returns 0 if successful, -errno if not. On success, the rule structure 29 int selinux_audit_rule_init(u32 field, u32 op, char *rulestr, void **rule); 32 * selinux_audit_rule_free - free an selinux audit rule structure. 33 * @rule: pointer to the audit rule to be freed 35 * This will free all memory associated with the given rule. [all …]
|
| /Linux-v6.1/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() 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-v6.1/net/ipv6/ |
| D | fib6_rules.c | 32 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() 139 * we check the result if it meets requirement of the rule. in fib6_rule_saddr() [all …]
|
| /Linux-v6.1/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() 64 /* Error, rule->type is an invalid type */ in parse_policy_line() [all …]
|
| /Linux-v6.1/net/ipv4/ |
| D | fib_rules.c | 49 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 …]
|
| /Linux-v6.1/kernel/ |
| D | auditfilter.c | 86 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() 237 /* Common user-space to kernel rule translation. */ 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() [all …]
|
| /Linux-v6.1/drivers/net/ethernet/sfc/ |
| D | tc.c | 101 static void efx_tc_delete_rule(struct efx_nic *efx, struct efx_tc_flow_rule *rule) in efx_tc_delete_rule() argument 103 efx_mae_delete_rule(efx, rule->fw_id); in efx_tc_delete_rule() 106 efx_tc_free_action_set_list(efx, &rule->acts, true); in efx_tc_delete_rule() 107 rule->fw_id = MC_CMD_MAE_ACTION_RULE_INSERT_OUT_ACTION_RULE_ID_NULL; in efx_tc_delete_rule() 112 struct efx_tc_flow_rule *rule = ptr; in efx_tc_flow_free() local 116 "tc rule %lx still present at teardown, removing\n", in efx_tc_flow_free() 117 rule->cookie); in efx_tc_flow_free() 119 efx_mae_delete_rule(efx, rule->fw_id); in efx_tc_flow_free() 122 efx_tc_free_action_set_list(efx, &rule->acts, true); in efx_tc_flow_free() 124 kfree(rule); in efx_tc_flow_free() [all …]
|
| /Linux-v6.1/drivers/net/ethernet/mellanox/mlx5/core/steering/ |
| D | dr_rule.c | 225 /* Link old STEs rule to the new ste */ in dr_rule_rehash_copy_ste_ctrl() 367 dr_rule_rehash_htbl(struct mlx5dr_rule *rule, in dr_rule_rehash_htbl() argument 375 struct mlx5dr_matcher *matcher = rule->matcher; in dr_rule_rehash_htbl() 487 static struct mlx5dr_ste_htbl *dr_rule_rehash(struct mlx5dr_rule *rule, in dr_rule_rehash() argument 493 struct mlx5dr_domain *dmn = rule->matcher->tbl->dmn; in dr_rule_rehash() 502 return dr_rule_rehash_htbl(rule, nic_rule, cur_htbl, ste_location, in dr_rule_rehash() 548 static void dr_rule_remove_action_members(struct mlx5dr_rule *rule) in dr_rule_remove_action_members() argument 553 list_for_each_entry_safe(action_mem, tmp, &rule->rule_actions_list, list) { in dr_rule_remove_action_members() 560 static int dr_rule_add_action_members(struct mlx5dr_rule *rule, in dr_rule_add_action_members() argument 574 list_add_tail(&action_mem->list, &rule->rule_actions_list); in dr_rule_add_action_members() [all …]
|
| /Linux-v6.1/drivers/pnp/ |
| D | manager.c | 23 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-v6.1/drivers/net/ethernet/marvell/prestera/ |
| D | prestera_flower.c | 35 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 …]
|
| D | prestera_acl.c | 383 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-v6.1/include/net/ |
| D | fib_rules.h | 53 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 …]
|
| /Linux-v6.1/tools/testing/selftests/drivers/net/mlxsw/ |
| D | tc_restrictions.sh | 42 # 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-v6.1/Documentation/networking/ |
| 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 …
|
| 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 …
|
| /Linux-v6.1/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ |
| D | macsec_fs.c | 54 struct mlx5_flow_handle *rule; member 82 struct mlx5_flow_handle *rule[RX_NUM_OF_RULES_PER_SA]; member 224 /* reserve entry for the match all miss group and rule */ in macsec_fs_auto_group_table_create() 250 struct mlx5_flow_handle *rule; in macsec_fs_tx_create() local 294 /* Tx crypto table MKE rule - MKE packets shouldn't be offloaded */ in macsec_fs_tx_create() 303 rule = mlx5_add_flow_rules(ft_crypto->t, spec, &flow_act, NULL, 0); in macsec_fs_tx_create() 304 if (IS_ERR(rule)) { in macsec_fs_tx_create() 305 err = PTR_ERR(rule); in macsec_fs_tx_create() 306 netdev_err(netdev, "Failed to add MACsec TX MKE rule, err=%d\n", err); in macsec_fs_tx_create() 309 tx_fs->crypto_mke_rule = rule; in macsec_fs_tx_create() [all …]
|
| /Linux-v6.1/net/netfilter/ |
| D | nf_tables_core.c | 40 const struct nft_rule_dp *rule, in nft_trace_packet() argument 45 info->rule = rule; in nft_trace_packet() 121 const struct nft_rule_dp *rule, in nft_trace_verdict() argument 125 info->rule = rule; in nft_trace_verdict() 187 const struct nft_rule_dp *rule; member 217 #define nft_rule_expr_first(rule) (struct nft_expr *)&rule->data[0] argument 219 #define nft_rule_expr_last(rule) (struct nft_expr *)&rule->data[rule->dlen] argument 220 #define nft_rule_next(rule) (void *)rule + sizeof(*rule) + rule->dlen argument 222 #define nft_rule_dp_for_each_expr(expr, last, rule) \ argument 223 for ((expr) = nft_rule_expr_first(rule), (last) = nft_rule_expr_last(rule); \ [all …]
|
| /Linux-v6.1/drivers/net/ethernet/mellanox/mlxsw/ |
| D | spectrum_flower.c | 113 * to ingress/egress in future. Ingress rule is in mlxsw_sp_flower_parse_actions() 181 NL_SET_ERR_MSG_MOD(extack, "Multiple mirror actions per rule are not supported"); in mlxsw_sp_flower_parse_actions() 230 NL_SET_ERR_MSG_MOD(extack, "Multiple police actions per rule are not supported"); in mlxsw_sp_flower_parse_actions() 254 NL_SET_ERR_MSG_MOD(extack, "Multiple sample actions per rule are not supported"); in mlxsw_sp_flower_parse_actions() 288 struct flow_rule *rule = flow_cls_offload_flow_rule(f); in mlxsw_sp_flower_parse_meta() local 293 if (!flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_META)) in mlxsw_sp_flower_parse_meta() 296 flow_rule_match_meta(rule, &match); in mlxsw_sp_flower_parse_meta() 332 flow_rule_match_ipv4_addrs(f->rule, &match); in mlxsw_sp_flower_parse_ipv4() 347 flow_rule_match_ipv6_addrs(f->rule, &match); in mlxsw_sp_flower_parse_ipv6() 380 const struct flow_rule *rule = flow_cls_offload_flow_rule(f); in mlxsw_sp_flower_parse_ports() local [all …]
|
| D | spectrum_acl.c | 61 struct rhash_head ht_node; /* Member of rule HT */ 799 struct mlxsw_sp_acl_rule *rule; in mlxsw_sp_acl_rule_create() local 803 rule = kzalloc(sizeof(*rule) + ops->rule_priv_size, in mlxsw_sp_acl_rule_create() 805 if (!rule) { in mlxsw_sp_acl_rule_create() 809 rule->cookie = cookie; in mlxsw_sp_acl_rule_create() 810 rule->ruleset = ruleset; in mlxsw_sp_acl_rule_create() 812 rule->rulei = mlxsw_sp_acl_rulei_create(mlxsw_sp->acl, afa_block); in mlxsw_sp_acl_rule_create() 813 if (IS_ERR(rule->rulei)) { in mlxsw_sp_acl_rule_create() 814 err = PTR_ERR(rule->rulei); in mlxsw_sp_acl_rule_create() 818 return rule; in mlxsw_sp_acl_rule_create() [all …]
|
| /Linux-v6.1/drivers/net/ethernet/mellanox/mlx5/core/ |
| D | en_arfs.c | 83 struct mlx5_flow_handle *rule; member 225 fs_err(fs, "%s: add rule failed, arfs type=%d\n", __func__, type); in arfs_add_default_rule() 427 if (arfs_rule->rule) in arfs_may_expire_flow() 428 mlx5_del_flow_rules(arfs_rule->rule); in arfs_may_expire_flow() 438 struct arfs_rule *rule; in arfs_del_rules() local 444 mlx5e_for_each_arfs_rule(rule, htmp, arfs->arfs_tables, i, j) { in arfs_del_rules() 445 hlist_del_init(&rule->hlist); in arfs_del_rules() 446 hlist_add_head(&rule->hlist, &del_list); in arfs_del_rules() 450 hlist_for_each_entry_safe(rule, htmp, &del_list, hlist) { in arfs_del_rules() 451 cancel_work_sync(&rule->arfs_work); in arfs_del_rules() [all …]
|