| /f-stack/freebsd/kern/ |
| H A D | kern_rctl.c | 342 switch (rule->rr_per) { in rctl_proc_rule_to_racct() 370 available = rule->rr_amount - racct->r_resources[rule->rr_resource]; in rctl_available_resource() 385 struct rctl_rule *rule; in rctl_throttle_decay() local 1015 if (rule == NULL) in rctl_rule_alloc() 1028 return (rule); in rctl_rule_alloc() 1099 TASK_INIT(&rule->rr_task, 0, rctl_rule_free, rule); in rctl_rule_release() 1265 *rulep = rule; in rctl_string_to_rule() 1532 if (rule->rr_per != rule->rr_subject_type) in rctl_rule_to_sbuf() 1907 rule->rr_per = rule->rr_subject_type; in sys_rctl_add_rule() 2131 if (rule == NULL) in rctl_proc_fork() [all …]
|
| /f-stack/dpdk/examples/ipsec-secgw/ |
| H A D | flow.c | 135 memset(rule, 0, sizeof(*rule)); in parse_flow_tokens() 138 rule->is_ipv4 = 1; in parse_flow_tokens() 140 rule->is_ipv4 = 0; in parse_flow_tokens() 152 if (rule->is_ipv4) { in parse_flow_tokens() 169 if (rule->is_ipv4) { in parse_flow_tokens() 223 .index = rule->queue, in flow_init_single() 229 if (rule->is_ipv4) { in flow_init_single() 247 rule->flow = rte_flow_create(rule->port, &attr, pattern, action, &err); in flow_init_single() 248 if (rule->flow == NULL) in flow_init_single() 265 if (rule->is_ipv4) { in flow_init() [all …]
|
| H A D | sa.c | 307 rule = &sa_in[*ri]; in parse_sa_tokens() 314 rule = &sa_out[*ri]; in parse_sa_tokens() 405 rule->cipher_key); in parse_sa_tokens() 418 memcpy(&rule->salt, in parse_sa_tokens() 473 rule->auth_key); in parse_sa_tokens() 526 rule->cipher_key); in parse_sa_tokens() 534 memcpy(&rule->salt, in parse_sa_tokens() 724 rule->fdir_flag = 1; in parse_sa_tokens() 742 rule->fdir_qid); in parse_sa_tokens() 746 rule->fdir_qid); in parse_sa_tokens() [all …]
|
| H A D | sp6.c | 554 rule->field[IP6_SRC0].mask_range.u32 in print_one_ip6_rule() 577 rule->field[IP6_SRCP].value.u16, in print_one_ip6_rule() 579 rule->field[IP6_DSTP].value.u16, in print_one_ip6_rule() 581 rule->field[IP6_PROTO].value.u8, in print_one_ip6_rule() 585 rule->data.category_mask, in print_one_ip6_rule() 586 rule->data.priority, in print_one_ip6_rule() 587 rule->data.userdata); in print_one_ip6_rule() 595 for (i = 0; i < num; i++, rule++) { in dump_ip6_rules() 597 print_one_ip6_rule(rule, extra); in dump_ip6_rules() 743 struct acl6_rules *rule; in sp6_spi_present() local [all …]
|
| H A D | sp4.c | 446 rule->field[SRCP_FIELD_IPV4].value.u16, in print_one_ip4_rule() 448 rule->field[DSTP_FIELD_IPV4].value.u16, in print_one_ip4_rule() 450 rule->field[PROTO_FIELD_IPV4].value.u8, in print_one_ip4_rule() 454 rule->data.category_mask, in print_one_ip4_rule() 455 rule->data.priority, in print_one_ip4_rule() 456 rule->data.userdata); in print_one_ip4_rule() 464 for (i = 0; i < num; i++, rule++) { in dump_ip4_rules() 466 print_one_ip4_rule(rule, extra); in dump_ip4_rules() 613 struct acl4_rules *rule; in sp4_spi_present() local 628 if (rule != NULL) { in sp4_spi_present() [all …]
|
| /f-stack/freebsd/security/mac_portacl/ |
| H A D | mac_portacl.c | 115 struct rule { struct 143 struct rule *rule; in toast_rules() local 175 parse_rule_element(char *element, struct rule **rule) in parse_rule_element() argument 234 *rule = NULL; in parse_rule_element() 236 *rule = new; in parse_rule_element() 270 rule_printf(struct sbuf *sb, struct rule *rule) 303 struct rule *rule; 311 for (rule = TAILQ_FIRST(&rule_head); rule != NULL; 312 rule = TAILQ_NEXT(rule, r_entries)) { 383 struct rule *rule; in rules_check() local [all …]
|
| /f-stack/freebsd/security/mac_bsdextended/ |
| H A D | mac_bsdextended.c | 260 <= rule->mbr_subject.mbs_gid_max && in ugidfw_rulecheck() 262 >= rule->mbr_subject.mbs_gid_min) { in ugidfw_rulecheck() 289 if (rule->mbr_object.mbo_neg & MBO_UID_DEFINED) in ugidfw_rulecheck() 298 if (rule->mbr_object.mbo_neg & MBO_GID_DEFINED) in ugidfw_rulecheck() 306 &rule->mbr_object.mbo_fsid) == 0); in ugidfw_rulecheck() 313 if (rule->mbr_object.mbo_flags & MBO_SUID) { in ugidfw_rulecheck() 315 if (rule->mbr_object.mbo_neg & MBO_SUID) in ugidfw_rulecheck() 321 if (rule->mbr_object.mbo_flags & MBO_SGID) { in ugidfw_rulecheck() 323 if (rule->mbr_object.mbo_neg & MBO_SGID) in ugidfw_rulecheck() 333 if (rule->mbr_object.mbo_neg & MBO_UID_SUBJECT) in ugidfw_rulecheck() [all …]
|
| /f-stack/dpdk/drivers/net/hns3/ |
| H A D | hns3_flow.c | 278 rule->nb_queues = 1; in hns3_handle_action_queue() 365 rule, error); in hns3_handle_actions() 377 rule->fd_id = mark->id; in hns3_handle_actions() 393 rule->act_cnt = *act_count; in hns3_handle_actions() 491 rule->key_conf.vlan_num++; in hns3_parse_vlan() 842 rule->key_conf.outer_vlan_num = rule->key_conf.vlan_num; in hns3_handle_tunnel() 843 rule->key_conf.vlan_num = 0; in hns3_handle_tunnel() 846 if (rule->input_set & in hns3_handle_tunnel() 853 rule->key_conf.spec.outer_proto = rule->key_conf.spec.ip_proto; in hns3_handle_tunnel() 854 rule->key_conf.mask.outer_proto = rule->key_conf.mask.ip_proto; in hns3_handle_tunnel() [all …]
|
| H A D | hns3_fdir.c | 552 key_conf = &rule->key_conf; in hns3_fd_convert_tuple() 712 uint8_t vf_id = rule->vf_id; in hns3_config_key() 730 cur_key_y, rule); in hns3_config_key() 748 rule->queue_id, ret); in hns3_config_key() 755 rule->queue_id, ret); in hns3_config_key() 763 ad_data.ad_id = rule->location; in hns3_config_action() 784 ad_data.rule_id = rule->fd_id; in hns3_config_action() 970 rule->location, in hns3_fdir_filter_program() 1000 rule->location = ret; in hns3_fdir_filter_program() 1011 rule->location, in hns3_fdir_filter_program() [all …]
|
| /f-stack/dpdk/lib/librte_flow_classify/ |
| H A D | rte_flow_classify.c | 420 if (!rule) in allocate_acl_ipv4_5tuple_rule() 421 return rule; in allocate_acl_ipv4_5tuple_rule() 477 return rule; in allocate_acl_ipv4_5tuple_rule() 512 if (!rule) in rte_flow_classify_table_entry_add() 544 &rule->entry, in rte_flow_classify_table_entry_add() 548 free(rule); in rte_flow_classify_table_entry_add() 555 return rule; in rte_flow_classify_table_entry_add() 558 free(rule); in rte_flow_classify_table_entry_add() 569 if (!cls || !rule) in rte_flow_classify_table_entry_delete() 581 &rule->entry); in rte_flow_classify_table_entry_delete() [all …]
|
| /f-stack/freebsd/netpfil/pf/ |
| H A D | pf_ioctl.c | 376 rule = TAILQ_NEXT(rule, entries); in pf_get_kpool() 443 if (rule->pqid != rule->qid) in pf_free_rule() 1172 out->rule.nr = in->rule.ptr->nr; in pf_src_node_copy() 1462 bzero(rule, sizeof(*rule)); in pf_krule_to_rule() 1864 error = pf_rule_to_krule(&pr->rule, rule); in pfioctl() 1931 rule->pqid = rule->qid; in pfioctl() 1941 if (rule->rt && !rule->direction) in pfioctl() 2074 while ((rule != NULL) && (rule->nr != pr->nr)) in pfioctl() 2075 rule = TAILQ_NEXT(rule, entries); in pfioctl() 2082 pf_krule_to_rule(rule, &pr->rule); in pfioctl() [all …]
|
| /f-stack/dpdk/drivers/net/hinic/ |
| H A D | hinic_pmd_flow.c | 859 struct hinic_fdir_rule *rule, in hinic_normal_item_check_ip() argument 1289 (void)memset(rule, 0, in hinic_tunnel_inner_item_check_l4() 1604 struct hinic_fdir_rule *rule, in hinic_parse_fdir_filter() argument 1610 rule, error); in hinic_parse_fdir_filter() 1615 rule, error); in hinic_parse_fdir_filter() 1620 rule, error); in hinic_parse_fdir_filter() 2400 fdir_info->qid = rule->queue; in hinic_fdir_info_init() 2415 fdir_info->qid = rule->queue; in hinic_fdir_info_init() 3072 flow->rule = fdir_rule_ptr; in hinic_flow_create() 3111 pmd_flow->rule; in hinic_flow_destroy() [all …]
|
| /f-stack/dpdk/drivers/net/ixgbe/ |
| H A D | ixgbe_flow.c | 1466 rule->soft_id = 0; in ixgbe_parse_fdir_act_attr() 1731 memset(rule, 0, in ixgbe_parse_fdir_filter_normal() 1836 rule->b_mask = TRUE; in ixgbe_parse_fdir_filter_normal() 1906 rule->b_mask = TRUE; in ixgbe_parse_fdir_filter_normal() 2641 rule->b_mask = TRUE; in ixgbe_parse_fdir_filter_tunnel() 2656 memset(rule, 0, in ixgbe_parse_fdir_filter_tunnel() 3345 pmd_flow->rule; in ixgbe_flow_destroy() 3358 pmd_flow->rule; in ixgbe_flow_destroy() 3372 pmd_flow->rule; in ixgbe_flow_destroy() 3399 pmd_flow->rule; in ixgbe_flow_destroy() [all …]
|
| /f-stack/dpdk/app/test/ |
| H A D | test_flow_classify.c | 239 if (rule) { in test_invalid_parameters() 262 if (rule) { in test_invalid_parameters() 318 if (!rule) { in test_valid_parameters() 369 if (rule) { in test_invalid_patterns() 397 if (rule) { in test_invalid_patterns() 445 if (rule) { in test_invalid_actions() 657 if (!rule) { in test_query_udp() 664 rule, &udp_classify_stats); in test_query_udp() 724 if (!rule) { in test_query_tcp() 731 rule, &tcp_classify_stats); in test_query_tcp() [all …]
|
| H A D | test_lpm6_data.h | 1100 const struct rules_tbl_entry *rule, int rule_num) in get_next_hop() argument 1107 if (rule[i].depth >= max_depth) { in get_next_hop() 1108 result = check_lpm6_rule(ip, rule[i].ip, rule[i].depth); in get_next_hop() 1110 *next_hop = rule[i].next_hop; in get_next_hop() 1111 max_depth = rule[i].depth; in get_next_hop()
|
| /f-stack/freebsd/netpfil/ipfw/ |
| H A D | ip_fw_sockopt.c | 211 return (rule); in ipfw_alloc_rule() 829 *head = rule; in ipfw_reap_add() 1108 for (l = rule->cmd_len, cmdlen = 0, cmd = rule->cmd; in move_objects() 1135 for (l = rule->cmd_len, cmdlen = 0, cmd = rule->cmd; in move_objects() 1154 for (l = rule->cmd_len, cmdlen = 0, cmd = rule->cmd; in move_objects() 1223 l = rule->cmd_len - rule->act_ofs; in ipfw_get_action() 1691 if (rule->act_ofs >= rule->cmd_len) { in check_ipfw_rule1() 1693 rule->act_ofs, rule->cmd_len - 1); in check_ipfw_rule1() 1719 l = sizeof(*rule) + rule->cmd_len * 4 - 4; in check_ipfw_rule0() 1724 if (rule->act_ofs >= rule->cmd_len) { in check_ipfw_rule0() [all …]
|
| H A D | ip_fw_dynamic.c | 1339 rule = NULL; in ipfw_dyn_lookup_state() 1447 if (rule != NULL && (V_set_disable & (1 << rule->set))) { in ipfw_dyn_lookup_state() 1448 rule = NULL; in ipfw_dyn_lookup_state() 1787 s = dyn_lookup_ipv4_parent(pkt, rule, rule->id, in dyn_get_parent_state() 1796 s = dyn_add_ipv4_parent(rule, rule->id, in dyn_get_parent_state() 1810 s = dyn_lookup_ipv6_parent(pkt, zoneid, rule, rule->id, in dyn_get_parent_state() 1819 s = dyn_add_ipv6_parent(rule, rule->id, in dyn_get_parent_state() 2200 rule = ((struct dyn_ipv4_state *)rule)->limit->parent; in dyn_match_ipv4_state() 2225 rule = ((struct dyn_ipv6_state *)rule)->limit->parent; in dyn_match_ipv6_state() 2249 void *rule; in dyn_expire_states() local [all …]
|
| /f-stack/dpdk/doc/guides/prog_guide/ |
| H A D | lpm_lib.rst | 24 * Add LPM rule: The LPM rule is provided as input. 25 …If there is no rule with the same prefix present in the table, then the new rule is added to the L… 26 …If a rule with the same prefix is already present in the table, the next hop of the rule is update… 29 * Delete LPM rule: The prefix of the LPM rule is provided as input. 33 …The algorithm selects the rule that represents the best match for the given key and returns the ne… 35 the algorithm picks the rule with the highest depth as the best match rule, 82 * depth of the rule (length) 88 The depth or length of the rule is the number of bits of the rule that is stored in a specific entr… 151 When deleting a rule, a replacement rule is searched for. Replacement rule is an existing rule that… 155 value with the replacement rule. [all …]
|
| H A D | lpm6_lib.rst | 34 * Add LPM rule: The LPM rule is provided as input. 35 …If there is no rule with the same prefix present in the table, then the new rule is added to the L… 36 …If a rule with the same prefix is already present in the table, the next hop of the rule is update… 39 * Delete LPM rule: The prefix of the LPM rule is provided as input. 43 …The algorithm selects the rule that represents the best match for the given key and returns the ne… 45 the algorithm picks the rule with the highest depth as the best match rule, 46 …which means the rule has the highest number of most significant bits matching between the input ke… 60 that directly depends on the length of the rule and 94 * depth of the rule (length) 104 The depth or length of the rule is the number of bits of the rule that is stored in a specific entr… [all …]
|
| H A D | flow_classify_lib.rst | 11 a particular Flow rule only. 85 * Validate the flow classify rule 90 * Flow rule attributes 114 * Flow rule attributes 140 * @param[in] rule 141 * Flow classify rule 150 * Query flow classifier for given rule. 158 * @param[in] rule 159 * Flow classify rule 328 parses the Flow rule. [all …]
|
| /f-stack/dpdk/drivers/net/dpaa2/mc/ |
| H A D | dpdmux.c | 538 const struct dpdmux_l2_rule *rule) in dpdmux_if_remove_l2_rule() argument 550 cmd_params->mac_addr5 = rule->mac_addr[5]; in dpdmux_if_remove_l2_rule() 551 cmd_params->mac_addr4 = rule->mac_addr[4]; in dpdmux_if_remove_l2_rule() 552 cmd_params->mac_addr3 = rule->mac_addr[3]; in dpdmux_if_remove_l2_rule() 553 cmd_params->mac_addr2 = rule->mac_addr[2]; in dpdmux_if_remove_l2_rule() 554 cmd_params->mac_addr1 = rule->mac_addr[1]; in dpdmux_if_remove_l2_rule() 578 const struct dpdmux_l2_rule *rule) in dpdmux_if_add_l2_rule() argument 842 struct dpdmux_rule_cfg *rule, in dpdmux_add_custom_cls_entry() argument 854 cmd_params->key_size = rule->key_size; in dpdmux_add_custom_cls_entry() 880 struct dpdmux_rule_cfg *rule) in dpdmux_remove_custom_cls_entry() argument [all …]
|
| /f-stack/dpdk/examples/ip_pipeline/examples/ |
| H A D | route_ecmp.cli | 48 pipeline PIPELINE0 table 0 rule add match default action fwd port 4 49 pipeline PIPELINE0 table 0 rule add match lpm ipv4 100.0.0.0 10 action fwd table 1 balance 0 0 0 0 … 50 pipeline PIPELINE0 table 0 rule add match lpm ipv4 100.64.0.0 10 action fwd table 1 balance 1 1 1 1… 51 pipeline PIPELINE0 table 0 rule add match lpm ipv4 100.128.0.0 10 action fwd table 1 balance 2 2 2 … 52 pipeline PIPELINE0 table 0 rule add match lpm ipv4 100.192.0.0 10 action fwd table 1 balance 3 3 3 … 54 pipeline PIPELINE0 table 1 rule add match array 0 action fwd port 0 encap ether a0:a1:a2:a3:a4:a5 0… 55 pipeline PIPELINE0 table 1 rule add match array 1 action fwd port 1 encap ether b0:b1:b2:b3:b4:b5 1… 56 pipeline PIPELINE0 table 1 rule add match array 2 action fwd port 2 encap ether c0:c1:c2:c3:c4:c5 2… 57 pipeline PIPELINE0 table 1 rule add match array 3 action fwd port 3 encap ether d0:d1:d2:d3:d4:d5 3…
|
| /f-stack/app/nginx-1.16.1/src/stream/ |
| H A D | ngx_stream_access_module.c | 183 ngx_stream_access_rule_t *rule; in ngx_stream_access_inet() local 185 rule = ascf->rules->elts; in ngx_stream_access_inet() 190 addr, rule[i].mask, rule[i].addr); in ngx_stream_access_inet() 192 if ((addr & rule[i].mask) == rule[i].addr) { in ngx_stream_access_inet() 193 return ngx_stream_access_found(s, rule[i].deny); in ngx_stream_access_inet() 294 ngx_stream_access_rule_t *rule; in ngx_stream_access_rule() local 340 rule = ngx_array_push(ascf->rules); in ngx_stream_access_rule() 341 if (rule == NULL) { in ngx_stream_access_rule() 345 rule->mask = cidr.u.in.mask; in ngx_stream_access_rule() 346 rule->addr = cidr.u.in.addr; in ngx_stream_access_rule() [all …]
|
| /f-stack/app/nginx-1.16.1/src/http/modules/ |
| H A D | ngx_http_access_module.c | 187 ngx_http_access_rule_t *rule; in ngx_http_access_inet() local 189 rule = alcf->rules->elts; in ngx_http_access_inet() 194 addr, rule[i].mask, rule[i].addr); in ngx_http_access_inet() 196 if ((addr & rule[i].mask) == rule[i].addr) { in ngx_http_access_inet() 197 return ngx_http_access_found(r, rule[i].deny); in ngx_http_access_inet() 304 ngx_http_access_rule_t *rule; in ngx_http_access_rule() local 350 rule = ngx_array_push(alcf->rules); in ngx_http_access_rule() 351 if (rule == NULL) { in ngx_http_access_rule() 355 rule->mask = cidr.u.in.mask; in ngx_http_access_rule() 356 rule->addr = cidr.u.in.addr; in ngx_http_access_rule() [all …]
|
| /f-stack/dpdk/drivers/net/mvpp2/ |
| H A D | mrvl_flow.c | 379 key_field = &flow->rule.fields[flow->rule.num_fields]; in mrvl_parse_mac() 447 key_field = &flow->rule.fields[flow->rule.num_fields]; in mrvl_parse_type() 481 key_field = &flow->rule.fields[flow->rule.num_fields]; in mrvl_parse_vlan_id() 515 key_field = &flow->rule.fields[flow->rule.num_fields]; in mrvl_parse_vlan_pri() 549 key_field = &flow->rule.fields[flow->rule.num_fields]; in mrvl_parse_ip4_dscp() 601 key_field = &flow->rule.fields[flow->rule.num_fields]; in mrvl_parse_ip4_addr() 666 key_field = &flow->rule.fields[flow->rule.num_fields]; in mrvl_parse_ip4_proto() 715 key_field = &flow->rule.fields[flow->rule.num_fields]; in mrvl_parse_ip6_addr() 781 key_field = &flow->rule.fields[flow->rule.num_fields]; in mrvl_parse_ip6_flow() 815 key_field = &flow->rule.fields[flow->rule.num_fields]; in mrvl_parse_ip6_next_hdr() [all …]
|