/linux/tools/testing/selftests/tc-testing/tc-tests/filters/ |
H A D | fw.json | 4 "name": "Add fw filter with prio at 32-bit maxixum", 6 "filter", 15 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 65535 fw action ok", 17 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 65535 protocol all fw", 26 "name": "Add fw filter with prio exceeding 32-bit maxixum", 28 "filter", 37 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 65536 fw action ok", 39 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 65536 protocol all fw", 48 "name": "Add fw filter with action ok", 50 "filter", [all …]
|
H A D | flow.json | 4 "name": "Add flow filter with map key and ops", 6 "filter", 15 …"cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 protocol ip flow map key ds… 17 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 protocol ip prio 1 flow", 18 …"matchPattern": "filter parent ffff: protocol ip pref 1 flow chain [0-9]+ handle 0x1 map keys dst … 26 "name": "Add flow filter with map key or ops", 28 "filter", 37 …"cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 protocol ip flow map key ds… 39 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 protocol ip prio 1 flow", 40 …"matchPattern": "filter parent ffff: protocol ip pref 1 flow chain [0-9]+ handle 0x1 map keys dst.… [all …]
|
H A D | matchall.json | 4 "name": "Add ingress matchall filter for protocol ipv4 and action PASS", 6 "filter", 15 …"cmdUnderTest": "$TC filter add dev $DUMMY parent ffff: handle 0x1 prio 1 protocol ip matchall act… 17 "verifyCmd": "$TC filter get dev $DUMMY parent ffff: handle 1 prio 1 protocol ip matchall", 18 …"matchPattern": "^filter parent ffff: protocol ip pref 1 matchall.*handle 0x1.*gact action pass.*r… 26 "name": "Add egress matchall filter for protocol ipv4 and action PASS", 28 "filter", 37 …"cmdUnderTest": "$TC filter add dev $DUMMY parent 1: handle 0x1 prio 1 protocol ip matchall action… 39 "verifyCmd": "$TC filter get dev $DUMMY parent 1: handle 1 prio 1 protocol ip matchall", 40 …"matchPattern": "^filter parent 1: protocol ip pref 1 matchall.*handle 0x1.*gact action pass.*ref … [all …]
|
H A D | u32.json | 6 "filter", 15 …"cmdUnderTest": "$TC filter add dev $DEV1 ingress protocol ip prio 1 u32 match ip src 127.0.0.1/32… 17 "verifyCmd": "$TC filter show dev $DEV1 ingress", 18 …"matchPattern": "filter protocol ip pref 1 u32 chain (0[ ]+$|0 fh 800: ht divisor 1|0 fh 800::800 … 28 "filter", 37 …"cmdUnderTest": "$TC filter replace dev $DEV1 ingress protocol ip prio 1 u32 match ip src 127.0.0.… 39 "verifyCmd": "$TC filter show dev $DEV1 ingress", 40 "matchPattern": "filter protocol ip pref 1 u32 chain 0", 50 "filter", 58 …"$TC filter add dev $DEV1 ingress protocol ip prio 1 u32 match ip src 127.0.0.3/32 flowid 1:3 acti… [all …]
|
H A D | bpf.json | 4 "name": "Add cBPF filter with valid bytecode", 6 "filter", 7 "bpf-filter" 15 …"cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 100 bpf bytecode … 17 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 protocol ip prio 100 bpf", 18 …"matchPattern": "filter parent ffff: protocol ip pref 100 bpf chain [0-9]+ handle 0x1.*bytecode '4… 26 "name": "Add cBPF filter with invalid bytecode", 28 "filter", 29 "bpf-filter" 37 …"cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 100 bpf bytecode … [all …]
|
H A D | flower.json | 6 "filter", 17 "verifyCmd": "$TC -s filter show dev $DEV2 ingress", 18 "matchPattern": "filter protocol ip pref 1 flower chain 0 handle", 29 "filter", 42 "verifyCmd": "$TC -s filter show dev $DEV2 ingress", 43 "matchPattern": "filter protocol ip pref 1 flower chain 0 handle", 54 "filter", 67 "verifyCmd": "$TC -s filter show dev $DEV2 ingress", 68 "matchPattern": "filter protocol ip pref 1 flower chain 0 handle", 79 "filter", [all …]
|
/linux/tools/testing/selftests/net/forwarding/ |
H A D | tc_flower.sh | 44 tc filter add dev $h2 ingress protocol ip pref 1 handle 101 flower \ 46 tc filter add dev $h2 ingress protocol ip pref 2 handle 102 flower \ 53 check_fail $? "Matched on a wrong filter" 56 check_fail $? "Did not match on correct filter" 58 tc filter del dev $h2 ingress protocol ip pref 1 handle 101 flower 59 tc filter del dev $h2 ingress protocol ip pref 2 handle 102 flower 70 tc filter add dev $h2 ingress protocol ip pref 1 handle 101 flower \ 72 tc filter add dev $h2 ingress protocol ip pref 2 handle 102 flower \ 79 check_fail $? "Matched on a wrong filter" 82 check_fail $? "Did not match on correct filter" [all …]
|
H A D | tc_chains.sh | 38 tc filter add dev $h2 ingress chain 1 protocol ip pref 1 handle 1101 \ 45 check_fail $? "matched on filter in unreachable chain" 47 tc filter del dev $h2 ingress chain 1 protocol ip pref 1 handle 1101 \ 57 tc filter add dev $h2 ingress chain 1 protocol ip pref 1 handle 1101 \ 59 tc filter add dev $h2 ingress protocol ip pref 2 handle 102 flower \ 61 tc filter add dev $h2 ingress protocol ip pref 1 handle 101 flower \ 68 check_fail $? "Matched on a wrong filter" 71 check_err $? "Did not match on correct filter with goto chain action" 74 check_err $? "Did not match on correct filter in chain 1" 76 tc filter del dev $h2 ingress protocol ip pref 1 handle 101 flower [all …]
|
H A D | tc_actions.sh | 66 tc filter add dev $h2 ingress protocol ip pref 1 handle 101 flower \ 75 tc filter add dev $swp1 ingress protocol $protocol pref 1 handle 101 \ 85 tc filter del dev $swp1 ingress protocol $protocol pref 1 handle 101 \ 87 tc filter del dev $h2 ingress protocol ip pref 1 handle 101 flower 96 tc filter add dev $swp1 ingress protocol ip pref 2 handle 102 flower \ 105 tc filter add dev $swp1 ingress protocol ip pref 1 handle 101 flower \ 117 tc filter del dev $swp1 ingress protocol ip pref 2 handle 102 flower 118 tc filter del dev $swp1 ingress protocol ip pref 1 handle 101 flower 131 tc filter add dev $swp1 ingress protocol ip pref 1 handle 101 flower \ 133 tc filter add dev $swp1 ingress protocol ip pref 3 handle 103 flower \ [all …]
|
/linux/tools/testing/selftests/tc-testing/tc-tests/infra/ |
H A D | actions.json | 4 "name": "Reference pedit action object in filter", 16 …"cmdUnderTest": "$TC filter add dev $DUMMY parent ffff: handle 0x1 prio 1 protocol ip matchall act… 18 "verifyCmd": "$TC filter get dev $DUMMY parent ffff: handle 1 prio 1 protocol ip matchall", 19 "matchPattern": "^filter parent ffff: protocol ip pref 1 matchall.*handle 0x1.*", 27 "name": "Reference mpls action object in filter", 39 …"cmdUnderTest": "$TC filter add dev $DUMMY parent ffff: handle 0x1 prio 1 protocol ip matchall act… 41 "verifyCmd": "$TC filter get dev $DUMMY parent ffff: handle 1 prio 1 protocol ip matchall", 42 "matchPattern": "^filter parent ffff: protocol ip pref 1 matchall.*handle 0x1.*", 50 "name": "Reference bpf action object in filter", 62 …"cmdUnderTest": "$TC filter add dev $DUMMY parent ffff: handle 0x1 prio 1 protocol ip matchall act… [all …]
|
/linux/tools/perf/util/ |
H A D | strfilter.h | 4 /* General purpose glob matching filter */ 9 /* A node of string filter */ 16 /* String filter */ 22 * strfilter__new - Create a new string filter 23 * @rules: Filter rule, which is a combination of glob expressions. 34 * @filter: Original string filter 35 * @rules: Filter rule to be appended at left of the root of 36 * @filter by using logical-or. 39 * Parse @rules and join it to the @filter by using logical-or. 42 int strfilter__or(struct strfilter *filter, [all …]
|
H A D | strfilter.c | 30 void strfilter__delete(struct strfilter *filter) in strfilter__delete() argument 32 if (filter) { in strfilter__delete() 33 strfilter_node__delete(filter->root); in strfilter__delete() 34 free(filter); in strfilter__delete() 157 * Parse filter rule and return new strfilter. 162 struct strfilter *filter = zalloc(sizeof(*filter)); in strfilter__new() local 165 if (filter) in strfilter__new() 166 filter->root = strfilter_node__new(rules, &ep); in strfilter__new() 168 if (!filter || !filter->root || *ep != '\0') { in strfilter__new() 171 strfilter__delete(filter); in strfilter__new() [all …]
|
/linux/tools/perf/tests/shell/ |
H A D | record_bpf_filter.sh | 23 echo "Checking BPF-filter privilege" 25 if ! perf record -e task-clock --filter 'period > 1' \ 30 echo "try 'sudo perf record --setup-filter pin' first." 31 echo "bpf-filter test [Skipped permission]" 35 echo "bpf-filter test [Skipped missing BPF support]" 42 echo "Basic bpf-filter test" 44 if ! perf record -e task-clock -c 10000 --filter 'ip < 0xffffffff00000000' \ 47 echo "Basic bpf-filter test [Failed record]" 55 echo "Basic bpf-filter test [Skipped unsupported kernel]" 59 echo "Basic bpf-filter test [Failed invalid output]" [all …]
|
/linux/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/ |
H A D | tc_flower.sh | 97 # filter is matched 101 tc filter add dev $h2 ingress protocol ip pref 1 handle 101 flower \ 108 check_err $? "Single filter - did not match" 110 tc filter add dev $h2 ingress protocol ip pref 2 handle 102 flower \ 125 tc filter del dev $h2 ingress protocol ip pref 1 handle 101 flower 131 check_err $? "Single filter - did not match after delete" 133 tc filter del dev $h2 ingress protocol ip pref 2 handle 102 flower 143 # filter is matched 147 tc filter add dev $h2 ingress protocol ip pref 1 handle 101 flower \ 149 tc filter add dev $h2 ingress protocol ip pref 2 handle 102 flower \ [all …]
|
/linux/kernel/ |
H A D | seccomp.c | 41 #include <linux/filter.h> 64 /* The struct pid of the task whose filter triggered the notification */ 67 /* The "cookie" for this request; this is unique for this filter. */ 145 * filter->notify_lock. 160 * struct action_cache - per-filter cache of seccomp actions per 164 * filter will always allow the syscall, for the 167 * filter will always allow the syscall, for the 194 * A filter's reference count is incremented for each directly 195 * attached task, once for the dependent filter, and if 197 * the filter can be freed. [all …]
|
/linux/tools/testing/selftests/drivers/net/mlxsw/ |
H A D | tc_restrictions.sh | 47 tc filter add block 22 protocol ip pref 1 handle 101 flower \ 59 tc filter del block 22 protocol ip pref 1 handle 101 flower 64 tc filter add block 22 protocol ip pref 1 handle 101 flower \ 73 tc filter add block 22 protocol ip pref 1 handle 101 flower \ 77 tc filter del block 22 protocol ip pref 1 handle 101 flower 95 tc filter add block 22 protocol ip pref 1 handle 101 flower \ 108 tc filter del block 22 protocol ip pref 1 handle 101 flower 113 tc filter add block 22 protocol ip pref 1 handle 101 flower \ 123 tc filter add block 22 protocol ip pref 1 handle 101 flower \ 130 tc filter add block 22 protocol ip pref 1 handle 101 flower \ [all …]
|
/linux/drivers/net/ethernet/mscc/ |
H A D | ocelot_vcap.c | 331 struct ocelot_vcap_filter *filter) in is2_action_set() argument 334 struct ocelot_vcap_action *a = &filter->action; in is2_action_set() 346 struct ocelot_vcap_filter *filter) in is2_entry_set() argument 349 struct ocelot_vcap_key_vlan *tag = &filter->vlan; in is2_entry_set() 366 if (filter->prio != 0) in is2_entry_set() 371 vcap_key_set(vcap, &data, VCAP_IS2_HK_PAG, filter->pag, 0xff); in is2_entry_set() 373 (filter->lookup == 0) ? OCELOT_VCAP_BIT_1 : in is2_entry_set() 376 ~filter->ingress_port_mask); in is2_entry_set() 379 vcap_key_bit_set(vcap, &data, VCAP_IS2_HK_L2_MC, filter->dmac_mc); in is2_entry_set() 380 vcap_key_bit_set(vcap, &data, VCAP_IS2_HK_L2_BC, filter->dmac_bc); in is2_entry_set() [all …]
|
H A D | ocelot_mrp.c | 39 struct ocelot_vcap_filter *filter; in ocelot_mrp_del_vcap() local 42 filter = ocelot_vcap_block_find_filter_by_id(block_vcap_is2, id, in ocelot_mrp_del_vcap() 44 if (!filter) in ocelot_mrp_del_vcap() 47 return ocelot_vcap_filter_del(ocelot, filter); in ocelot_mrp_del_vcap() 54 struct ocelot_vcap_filter *filter; in ocelot_mrp_redirect_add_vcap() local 57 filter = kzalloc(sizeof(*filter), GFP_KERNEL); in ocelot_mrp_redirect_add_vcap() 58 if (!filter) in ocelot_mrp_redirect_add_vcap() 61 filter->key_type = OCELOT_VCAP_KEY_ETYPE; in ocelot_mrp_redirect_add_vcap() 62 filter->prio = 1; in ocelot_mrp_redirect_add_vcap() 63 filter->id.cookie = OCELOT_VCAP_IS2_MRP_REDIRECT(ocelot, src_port); in ocelot_mrp_redirect_add_vcap() [all …]
|
/linux/drivers/net/ipa/ |
H A D | ipa_table.c | 25 * DOC: IPA Filter and Route Tables 28 * filter and routing rules. An entry in either of these tables is a little 32 * Separate tables (both filter and route) are used for IPv4 and IPv6. There 33 * is normally another set of "hashed" filter and route tables, which are 38 * an object (such as a route or filter table) in IPA-resident memory must 39 * 128-byte aligned. An object in system memory (such as a route or filter 41 * route or filter rules in system memory. 46 * filter or route table rules. 48 * Each filter rule is associated with an AP or modem TX endpoint, though 50 * filter table is a bitmap indicating which endpoints have entries in [all …]
|
/linux/include/media/ |
H A D | dmxdev.h | 40 * enum dmxdev_type - type of demux filter type. 42 * @DMXDEV_TYPE_NONE: no filter set. 43 * @DMXDEV_TYPE_SEC: section filter. 44 * @DMXDEV_TYPE_PES: Program Elementary Stream (PES) filter. 55 * @DMXDEV_STATE_FREE: indicates that the filter is freed. 56 * @DMXDEV_STATE_ALLOCATED: indicates that the filter was allocated 58 * @DMXDEV_STATE_SET: indicates that the filter parameters are set. 59 * @DMXDEV_STATE_GO: indicates that the filter is running. 61 * and the filter is now disabled. 90 * struct dmxdev_filter - digital TV dmxdev filter [all …]
|
/linux/lib/kunit/ |
H A D | attributes.c | 31 * @filter: function to indicate whether a given attribute value passes a 32 * filter 40 int (*filter)(void *attr, const char *input, int *err); member 82 /* Filter Methods */ 87 * Returns whether the inputted integer value matches the filter given 105 pr_err("kunit executor: invalid filter operation: %s\n", op); in int_filter() 110 * Returns whether the inputted enum value "attr" matches the filter given 130 pr_err("kunit executor: filter value not found: %s\n", input); in attr_enum_filter() 141 pr_err("kunit executor: invalid filter input: %s\n", input); in attr_enum_filter() 154 * Returns whether the inputted string value (attr) matches the filter given [all …]
|
/linux/kernel/trace/ |
H A D | trace_events_filter.c | 19 "### global filter ###\n" \ 115 C(INVALID_FILTER, "Meaningless filter expression"), \ 121 C(NO_FILTER, "No filter found") 145 * struct prog_entry - a singe entry in the filter program 836 /* Filter predicate for fixed sized arrays of characters */ 861 /* Filter predicate for char * pointers */ 874 /* Filter predicate for char * pointers in user space*/ 888 * Filter predicate for dynamic sized arrays of characters. 913 * Filter predicate for relative dynamic sized arrays of characters. 935 /* Filter predicate for CPUs. */ [all …]
|
/linux/tools/perf/tests/ |
H A D | hists_filter.c | 73 /* make sure it has no filter at first */ in add_hist_entries() 179 /* now applying thread filter for 'bash' */ in test__hists_filter() 184 pr_info("Histogram for thread filter\n"); in test__hists_filter() 196 /* but filter stats are changed */ in test__hists_filter() 197 TEST_ASSERT_VAL("Unmatched nr samples for thread filter", in test__hists_filter() 199 TEST_ASSERT_VAL("Unmatched nr hist entries for thread filter", in test__hists_filter() 201 TEST_ASSERT_VAL("Unmatched total period for thread filter", in test__hists_filter() 204 /* remove thread filter first */ in test__hists_filter() 208 /* now applying dso filter for 'kernel' */ in test__hists_filter() 213 pr_info("Histogram for dso filter\n"); in test__hists_filter() [all …]
|
/linux/drivers/net/ethernet/intel/ice/ |
H A D | ice_fltr.c | 8 * ice_fltr_free_list - free filter lists helper 12 * Helper function to free filter lists previously created using 26 * ice_fltr_add_entry_to_list - allocate and add filter entry to list 28 * @info: filter info struct that gets added to the passed in list 219 * ice_fltr_add_mac_to_list - add MAC filter info to exsisting list 221 * @list: list to add filter info to 223 * @action: filter action 244 * ice_fltr_add_vlan_to_list - add VLAN filter info to exsisting list 246 * @list: list to add filter info to 247 * @vlan: VLAN filter details [all …]
|
/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | bloom_filter_map.c | 17 if (!ASSERT_LT(fd, 0, "bpf_map_create bloom filter invalid key size")) in test_fail_cases() 22 if (!ASSERT_LT(fd, 0, "bpf_map_create bloom filter invalid value size 0")) in test_fail_cases() 27 if (!ASSERT_LT(fd, 0, "bpf_map_create bloom filter invalid value too large")) in test_fail_cases() 32 if (!ASSERT_LT(fd, 0, "bpf_map_create bloom filter invalid max entries size")) in test_fail_cases() 35 /* Bloom filter maps do not support BPF_F_NO_PREALLOC */ in test_fail_cases() 38 if (!ASSERT_LT(fd, 0, "bpf_map_create bloom filter invalid flags")) in test_fail_cases() 42 if (!ASSERT_GE(fd, 0, "bpf_map_create bloom filter")) in test_fail_cases() 47 ASSERT_EQ(err, -EINVAL, "bpf_map_update_elem bloom filter invalid flags"); in test_fail_cases() 50 ASSERT_EQ(err, -EINVAL, "bpf_map_update_elem bloom filter invalid flags"); in test_fail_cases() 53 ASSERT_EQ(err, -EINVAL, "bpf_map_update_elem bloom filter invalid flags"); in test_fail_cases() [all …]
|