/Linux-v4.19/net/core/ |
D | fib_rules.c | 26 bool fib_rule_matchall(const struct fib_rule *rule) in fib_rule_matchall() argument 28 if (rule->iifindex || rule->oifindex || rule->mark || rule->tun_id || in fib_rule_matchall() 29 rule->flags) in fib_rule_matchall() 31 if (rule->suppress_ifgroup != -1 || rule->suppress_prefixlen != -1) in fib_rule_matchall() 33 if (!uid_eq(rule->uid_range.start, fib_kuid_range_unset.start) || in fib_rule_matchall() 34 !uid_eq(rule->uid_range.end, fib_kuid_range_unset.end)) in fib_rule_matchall() 36 if (fib_rule_port_range_set(&rule->sport_range)) in fib_rule_matchall() 38 if (fib_rule_port_range_set(&rule->dport_range)) in fib_rule_matchall() 75 struct fib_rule *rule; in fib_default_rule_pref() local 80 rule = list_entry(pos->next, struct fib_rule, list); in fib_default_rule_pref() [all …]
|
/Linux-v4.19/net/ipv4/ |
D | fib_rules.c | 50 static bool fib4_rule_matchall(const struct fib_rule *rule) in fib4_rule_matchall() argument 52 struct fib4_rule *r = container_of(rule, struct fib4_rule, common); in fib4_rule_matchall() 56 return fib_rule_matchall(rule); in fib4_rule_matchall() 59 bool fib4_rule_default(const struct fib_rule *rule) in fib4_rule_default() argument 61 if (!fib4_rule_matchall(rule) || rule->action != FR_ACT_TO_TBL || in fib4_rule_default() 62 rule->l3mdev) in fib4_rule_default() 64 if (rule->table != RT_TABLE_LOCAL && rule->table != RT_TABLE_MAIN && in fib4_rule_default() 65 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-v4.19/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-v4.19/net/ipv6/ |
D | fib6_rules.c | 33 static bool fib6_rule_matchall(const struct fib_rule *rule) in fib6_rule_matchall() argument 35 struct fib6_rule *r = container_of(rule, struct fib6_rule, common); in fib6_rule_matchall() 39 return fib_rule_matchall(rule); in fib6_rule_matchall() 42 bool fib6_rule_default(const struct fib_rule *rule) in fib6_rule_default() argument 44 if (!fib6_rule_matchall(rule) || rule->action != FR_ACT_TO_TBL || in fib6_rule_default() 45 rule->l3mdev) in fib6_rule_default() 47 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-v4.19/kernel/ |
D | auditfilter.c | 97 struct audit_krule *erule = &e->rule; in audit_free_rule() 131 entry->rule.fields = fields; in audit_init_entry() 223 struct audit_field *arch = entry->rule.arch_f; in audit_match_signal() 229 entry->rule.mask) && in audit_match_signal() 231 entry->rule.mask)); in audit_match_signal() 237 entry->rule.mask)); in audit_match_signal() 240 entry->rule.mask)); in audit_match_signal() 248 static inline struct audit_entry *audit_to_entry_common(struct audit_rule_data *rule) in audit_to_entry_common() argument 255 listnr = rule->flags & ~AUDIT_FILTER_PREPEND; in audit_to_entry_common() 271 if (unlikely(rule->action == AUDIT_POSSIBLE)) { in audit_to_entry_common() [all …]
|
D | audit_fsnotify.c | 40 struct audit_krule *rule; member 110 audit_mark->rule = krule; in audit_alloc_mark() 126 struct audit_krule *rule = audit_mark->rule; in audit_mark_log_rule_change() local 138 audit_log_key(ab, rule->filterkey); in audit_mark_log_rule_change() 139 audit_log_format(ab, " list=%d res=1", rule->listnr); in audit_mark_log_rule_change() 158 struct audit_krule *rule = audit_mark->rule; in audit_autoremove_mark_rule() local 159 struct audit_entry *entry = container_of(rule, struct audit_entry, rule); in audit_autoremove_mark_rule()
|
D | audit_tree.c | 497 static void audit_tree_log_remove_rule(struct audit_krule *rule) in audit_tree_log_remove_rule() argument 508 audit_log_untrustedstring(ab, rule->tree->pathname); in audit_tree_log_remove_rule() 509 audit_log_key(ab, rule->filterkey); in audit_tree_log_remove_rule() 510 audit_log_format(ab, " list=%d res=1", rule->listnr); in audit_tree_log_remove_rule() 516 struct audit_krule *rule, *next; in kill_rules() local 519 list_for_each_entry_safe(rule, next, &tree->rules, rlist) { in kill_rules() 520 entry = container_of(rule, struct audit_entry, rule); in kill_rules() 522 list_del_init(&rule->rlist); in kill_rules() 523 if (rule->tree) { in kill_rules() 525 audit_tree_log_remove_rule(rule); in kill_rules() [all …]
|
/Linux-v4.19/security/apparmor/ |
D | audit.c | 173 struct aa_audit_rule *rule = vrule; in aa_audit_rule_free() local 175 if (rule) { in aa_audit_rule_free() 176 if (!IS_ERR(rule->label)) in aa_audit_rule_free() 177 aa_put_label(rule->label); in aa_audit_rule_free() 178 kfree(rule); in aa_audit_rule_free() 184 struct aa_audit_rule *rule; in aa_audit_rule_init() local 195 rule = kzalloc(sizeof(struct aa_audit_rule), GFP_KERNEL); in aa_audit_rule_init() 197 if (!rule) in aa_audit_rule_init() 201 rule->label = aa_label_parse(&root_ns->unconfined->label, rulestr, in aa_audit_rule_init() 203 if (IS_ERR(rule->label)) { in aa_audit_rule_init() [all …]
|
/Linux-v4.19/include/net/ |
D | fib_rules.h | 52 struct fib_rule *rule; member 102 struct fib_rule *rule; member 123 static inline void fib_rule_get(struct fib_rule *rule) in fib_rule_get() argument 125 refcount_inc(&rule->refcnt); in fib_rule_get() 128 static inline void fib_rule_put(struct fib_rule *rule) in fib_rule_put() argument 130 if (refcount_dec_and_test(&rule->refcnt)) in fib_rule_put() 131 kfree_rcu(rule, rcu); in fib_rule_put() 135 static inline u32 fib_rule_get_table(struct fib_rule *rule, in fib_rule_get_table() argument 138 return rule->l3mdev ? arg->table : rule->table; in fib_rule_get_table() 141 static inline u32 fib_rule_get_table(struct fib_rule *rule, in fib_rule_get_table() argument [all …]
|
/Linux-v4.19/drivers/net/ethernet/mellanox/mlxsw/ |
D | spectrum_acl.c | 629 struct mlxsw_sp_acl_rule *rule; in mlxsw_sp_acl_rule_create() local 633 rule = kzalloc(sizeof(*rule) + ops->rule_priv_size(mlxsw_sp), in mlxsw_sp_acl_rule_create() 635 if (!rule) { in mlxsw_sp_acl_rule_create() 639 rule->cookie = cookie; in mlxsw_sp_acl_rule_create() 640 rule->ruleset = ruleset; in mlxsw_sp_acl_rule_create() 642 rule->rulei = mlxsw_sp_acl_rulei_create(mlxsw_sp->acl); in mlxsw_sp_acl_rule_create() 643 if (IS_ERR(rule->rulei)) { in mlxsw_sp_acl_rule_create() 644 err = PTR_ERR(rule->rulei); in mlxsw_sp_acl_rule_create() 648 return rule; in mlxsw_sp_acl_rule_create() 651 kfree(rule); in mlxsw_sp_acl_rule_create() [all …]
|
D | spectrum_flower.c | 400 struct mlxsw_sp_acl_rule *rule; in mlxsw_sp_flower_replace() local 409 rule = mlxsw_sp_acl_rule_create(mlxsw_sp, ruleset, f->cookie, in mlxsw_sp_flower_replace() 411 if (IS_ERR(rule)) { in mlxsw_sp_flower_replace() 412 err = PTR_ERR(rule); in mlxsw_sp_flower_replace() 416 rulei = mlxsw_sp_acl_rule_rulei(rule); in mlxsw_sp_flower_replace() 425 err = mlxsw_sp_acl_rule_add(mlxsw_sp, rule); in mlxsw_sp_flower_replace() 435 mlxsw_sp_acl_rule_destroy(mlxsw_sp, rule); in mlxsw_sp_flower_replace() 446 struct mlxsw_sp_acl_rule *rule; in mlxsw_sp_flower_destroy() local 454 rule = mlxsw_sp_acl_rule_lookup(mlxsw_sp, ruleset, f->cookie); in mlxsw_sp_flower_destroy() 455 if (rule) { in mlxsw_sp_flower_destroy() [all …]
|
/Linux-v4.19/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 …]
|
/Linux-v4.19/drivers/net/ethernet/mellanox/mlx5/core/diag/ |
D | fs_tracepoint.h | 237 TP_PROTO(const struct mlx5_flow_rule *rule), 238 TP_ARGS(rule), 240 __field(const struct mlx5_flow_rule *, rule) 248 __entry->rule = rule; 249 fs_get_obj(__entry->fte, rule->node.parent); 251 __entry->sw_action = rule->sw_action; 253 &rule->dest_attr, 255 if (rule->dest_attr.type & MLX5_FLOW_DESTINATION_TYPE_COUNTER && 256 rule->dest_attr.counter) 258 rule->dest_attr.counter->id; [all …]
|
/Linux-v4.19/drivers/net/ethernet/mellanox/mlx5/core/ |
D | en_arfs.c | 57 struct mlx5_flow_handle *rule; member 394 if (arfs_rule->rule) in arfs_may_expire_flow() 395 mlx5_del_flow_rules(arfs_rule->rule); in arfs_may_expire_flow() 404 struct arfs_rule *rule; in arfs_del_rules() local 410 mlx5e_for_each_arfs_rule(rule, htmp, priv->fs.arfs.arfs_tables, i, j) { in arfs_del_rules() 411 hlist_del_init(&rule->hlist); in arfs_del_rules() 412 hlist_add_head(&rule->hlist, &del_list); in arfs_del_rules() 416 hlist_for_each_entry_safe(rule, htmp, &del_list, hlist) { in arfs_del_rules() 417 cancel_work_sync(&rule->arfs_work); in arfs_del_rules() 418 if (rule->rule) in arfs_del_rules() [all …]
|
D | fs_core.c | 404 struct mlx5_flow_rule *rule; in del_sw_hw_rule() local 413 fs_get_obj(rule, node); in del_sw_hw_rule() 414 fs_get_obj(fte, rule->node.parent); in del_sw_hw_rule() 417 trace_mlx5_fs_del_rule(rule); in del_sw_hw_rule() 418 if (rule->sw_action == MLX5_FLOW_CONTEXT_ACTION_FWD_NEXT_PRIO) { in del_sw_hw_rule() 419 mutex_lock(&rule->dest_attr.ft->lock); in del_sw_hw_rule() 420 list_del(&rule->next_ft); in del_sw_hw_rule() 421 mutex_unlock(&rule->dest_attr.ft->lock); in del_sw_hw_rule() 424 if (rule->dest_attr.type == MLX5_FLOW_DESTINATION_TYPE_COUNTER && in del_sw_hw_rule() 447 kfree(rule); in del_sw_hw_rule() [all …]
|
/Linux-v4.19/security/integrity/ima/ |
D | ima_policy.c | 75 void *rule; /* LSM file metadata specific */ member 258 if (!entry->lsm[i].rule) in ima_lsm_update_rules() 263 &entry->lsm[i].rule); in ima_lsm_update_rules() 264 BUG_ON(!entry->lsm[i].rule); in ima_lsm_update_rules() 280 static bool ima_match_rules(struct ima_rule_entry *rule, struct inode *inode, in ima_match_rules() argument 286 if ((rule->flags & IMA_FUNC) && in ima_match_rules() 287 (rule->func != func && func != POST_SETATTR)) in ima_match_rules() 289 if ((rule->flags & IMA_MASK) && in ima_match_rules() 290 (rule->mask != mask && func != POST_SETATTR)) in ima_match_rules() 292 if ((rule->flags & IMA_INMASK) && in ima_match_rules() [all …]
|
/Linux-v4.19/Documentation/RCU/ |
D | listRCU.txt | 37 if (audit_filter_rules(tsk, &e->rule, NULL, &state)) { 61 if (audit_filter_rules(tsk, &e->rule, NULL, &state)) { 78 static inline int audit_del_rule(struct audit_rule *rule, 85 if (!audit_compare_rule(rule, &e->rule)) { 92 return -EFAULT; /* No matching rule */ 99 if (entry->rule.flags & AUDIT_PREPEND) { 100 entry->rule.flags &= ~AUDIT_PREPEND; 111 static inline int audit_del_rule(struct audit_rule *rule, 119 if (!audit_compare_rule(rule, &e->rule)) { 125 return -EFAULT; /* No matching rule */ [all …]
|
/Linux-v4.19/drivers/net/ethernet/sfc/falcon/ |
D | ethtool.c | 789 struct ethtool_rx_flow_spec *rule) in ef4_ethtool_get_class_rule() argument 791 struct ethtool_tcpip4_spec *ip_entry = &rule->h_u.tcp_ip4_spec; in ef4_ethtool_get_class_rule() 792 struct ethtool_tcpip4_spec *ip_mask = &rule->m_u.tcp_ip4_spec; in ef4_ethtool_get_class_rule() 793 struct ethtool_usrip4_spec *uip_entry = &rule->h_u.usr_ip4_spec; in ef4_ethtool_get_class_rule() 794 struct ethtool_usrip4_spec *uip_mask = &rule->m_u.usr_ip4_spec; in ef4_ethtool_get_class_rule() 795 struct ethtool_tcpip6_spec *ip6_entry = &rule->h_u.tcp_ip6_spec; in ef4_ethtool_get_class_rule() 796 struct ethtool_tcpip6_spec *ip6_mask = &rule->m_u.tcp_ip6_spec; in ef4_ethtool_get_class_rule() 797 struct ethtool_usrip6_spec *uip6_entry = &rule->h_u.usr_ip6_spec; in ef4_ethtool_get_class_rule() 798 struct ethtool_usrip6_spec *uip6_mask = &rule->m_u.usr_ip6_spec; in ef4_ethtool_get_class_rule() 799 struct ethhdr *mac_entry = &rule->h_u.ether_spec; in ef4_ethtool_get_class_rule() [all …]
|
/Linux-v4.19/tools/testing/selftests/net/ |
D | fib_rule_tests.sh | 71 ip rule help 2>&1 | grep -q $1 88 $IP -6 rule del $1 94 pref=$($IP -6 rule show | grep "$1 lookup $TABLE" | cut -d ":" -f 1) 95 $IP -6 rule del pref $pref 103 $IP -6 rule add $match table $RTABLE 157 $IP rule del $1 163 pref=$($IP rule show | grep "$1 lookup $TABLE" | cut -d ":" -f 1) 164 $IP rule del pref $pref 172 $IP rule add $match table $RTABLE
|
/Linux-v4.19/drivers/net/ethernet/sfc/ |
D | ethtool.c | 811 struct ethtool_rx_flow_spec *rule, in efx_ethtool_get_class_rule() argument 814 struct ethtool_tcpip4_spec *ip_entry = &rule->h_u.tcp_ip4_spec; in efx_ethtool_get_class_rule() 815 struct ethtool_tcpip4_spec *ip_mask = &rule->m_u.tcp_ip4_spec; in efx_ethtool_get_class_rule() 816 struct ethtool_usrip4_spec *uip_entry = &rule->h_u.usr_ip4_spec; in efx_ethtool_get_class_rule() 817 struct ethtool_usrip4_spec *uip_mask = &rule->m_u.usr_ip4_spec; in efx_ethtool_get_class_rule() 818 struct ethtool_tcpip6_spec *ip6_entry = &rule->h_u.tcp_ip6_spec; in efx_ethtool_get_class_rule() 819 struct ethtool_tcpip6_spec *ip6_mask = &rule->m_u.tcp_ip6_spec; in efx_ethtool_get_class_rule() 820 struct ethtool_usrip6_spec *uip6_entry = &rule->h_u.usr_ip6_spec; in efx_ethtool_get_class_rule() 821 struct ethtool_usrip6_spec *uip6_mask = &rule->m_u.usr_ip6_spec; in efx_ethtool_get_class_rule() 822 struct ethhdr *mac_entry = &rule->h_u.ether_spec; in efx_ethtool_get_class_rule() [all …]
|
/Linux-v4.19/net/netfilter/ |
D | nf_tables_core.c | 43 const struct nft_rule *rule, in nft_trace_packet() argument 47 info->rule = rule; in nft_trace_packet() 143 const struct nft_rule *rule; in nft_do_chain() local 161 rule = *rules; in nft_do_chain() 164 rule = *rules; in nft_do_chain() 165 nft_rule_for_each_expr(expr, last, rule) { in nft_do_chain() 181 nft_trace_packet(&info, chain, rule, in nft_do_chain() 193 nft_trace_packet(&info, chain, rule, in nft_do_chain() 207 nft_trace_packet(&info, chain, rule, in nft_do_chain() 215 nft_trace_packet(&info, chain, rule, in nft_do_chain()
|
/Linux-v4.19/drivers/isdn/divert/ |
D | isdn_divert.c | 39 divert_rule rule; /* used rule */ member 279 ds->rule = *newrule; /* set rule */ in insertrule() 372 return (&ds->rule); in getruleptr() 395 if (((dv->rule.callopt == 1) && (ic->command == ISDN_STAT_ICALLW)) || in isdn_divert_icall() 396 ((dv->rule.callopt == 2) && (ic->command == ISDN_STAT_ICALL))) in isdn_divert_icall() 398 if (!(dv->rule.drvid & (1L << ic->driver))) in isdn_divert_icall() 400 if ((dv->rule.si1) && (dv->rule.si1 != ic->parm.setup.si1)) in isdn_divert_icall() 402 if ((dv->rule.si2) && (dv->rule.si2 != ic->parm.setup.si2)) in isdn_divert_icall() 405 p = dv->rule.my_msn; in isdn_divert_icall() 421 if ((strcmp(dv->rule.caller, "0")) || in isdn_divert_icall() [all …]
|
/Linux-v4.19/sound/core/ |
D | pcm_drm_eld.c | 29 struct snd_pcm_hw_rule *rule) in eld_limit_rates() argument 31 struct snd_interval *r = hw_param_interval(params, rule->var); in eld_limit_rates() 34 const u8 *sad, *eld = rule->private; in eld_limit_rates() 57 struct snd_pcm_hw_rule *rule) in eld_limit_channels() argument 59 struct snd_interval *c = hw_param_interval(params, rule->var); in eld_limit_channels() 63 const u8 *sad, *eld = rule->private; in eld_limit_channels()
|
/Linux-v4.19/drivers/net/ethernet/mellanox/mlx5/core/fpga/ |
D | ipsec.c | 856 struct mlx5_fpga_ipsec_rule *rule = in _rule_search() local 860 if (rule->fte < fte) in _rule_search() 862 else if (rule->fte > fte) in _rule_search() 865 return rule; in _rule_search() 873 struct mlx5_fpga_ipsec_rule *rule; in rule_search() local 876 rule = _rule_search(&ipsec_dev->rules_rb, fte); in rule_search() 879 return rule; in rule_search() 883 struct mlx5_fpga_ipsec_rule *rule) in _rule_insert() argument 894 if (rule->fte < this->fte) in _rule_insert() 896 else if (rule->fte > this->fte) in _rule_insert() [all …]
|
/Linux-v4.19/drivers/net/ethernet/freescale/ |
D | gianfar_ethtool.c | 1099 static inline u32 vlan_tci_vid(struct ethtool_rx_flow_spec *rule) in vlan_tci_vid() argument 1101 return be16_to_cpu(rule->h_ext.vlan_tci) & VLAN_VID_MASK; in vlan_tci_vid() 1104 static inline u32 vlan_tci_vidm(struct ethtool_rx_flow_spec *rule) in vlan_tci_vidm() argument 1106 return be16_to_cpu(rule->m_ext.vlan_tci) & VLAN_VID_MASK; in vlan_tci_vidm() 1109 static inline u32 vlan_tci_cfi(struct ethtool_rx_flow_spec *rule) in vlan_tci_cfi() argument 1111 return be16_to_cpu(rule->h_ext.vlan_tci) & VLAN_CFI_MASK; in vlan_tci_cfi() 1114 static inline u32 vlan_tci_cfim(struct ethtool_rx_flow_spec *rule) in vlan_tci_cfim() argument 1116 return be16_to_cpu(rule->m_ext.vlan_tci) & VLAN_CFI_MASK; in vlan_tci_cfim() 1119 static inline u32 vlan_tci_prio(struct ethtool_rx_flow_spec *rule) in vlan_tci_prio() argument 1121 return (be16_to_cpu(rule->h_ext.vlan_tci) & VLAN_PRIO_MASK) >> in vlan_tci_prio() [all …]
|