the following script:
# tc qdisc add dev crash0 clsact
# tc filter add dev crash0 egress matchall \
> action police rate 3mbit burst 250k pass index 90
# tc actions replace action police \
> rate 3mbit burst 250k goto chain 42 index 90 cookie c1a0c1a0
# tc actions show action police rate 3mbit burst
had the following output:
Error: Failed to init TC action chain.
We have an error talking to the kernel
total acts 1
action order 0: police 0x5a rate 3Mbit burst 250Kb mtu 2Kb action goto chain 42 overhead 0b
ref 2 bind 1
cookie c1a0c1a0
Then, when crash0 starts transmitting more than 3Mbit/s, the following
kernel crash is observed:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
#PF error: [normal kernel read fault]
PGD 800000007a779067 P4D 800000007a779067 PUD 2ad96067 PMD 0
Oops: 0000 [#1] SMP PTI
CPU: 3 PID: 5032 Comm: netperf Not tainted 5.0.0-rc4.gotochain_crash+ #533
Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011
RIP: 0010:tcf_action_exec+0xb8/0x100
Code: 00 00 00 20 74 1d 83 f8 03 75 09 49 83 c4 08 4d 39 ec 75 bc 48 83 c4 10 5b 5d 41 5c 41 5d 41 5e 41 5f c3 49 8b 97 a8 00 00 00 <48> 8b 12 48 89 55 00 48 83 c4 10 5b 5d 41 5c 41 5d 41 5e 41 5f c3
RSP: 0018:ffffb0e04064fa60 EFLAGS: 00010246
RAX: 000000002000002a RBX: ffff93bb3322cce0 RCX: 0000000000000005
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff93bb3322cce0
RBP: ffffb0e04064fb00 R08: 0000000000000022 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000001 R12: ffff93bb3beed300
R13: ffff93bb3beed308 R14: 0000000000000001 R15: ffff93bb3b64d000
FS: 00007f0bc6be5740(0000) GS:ffff93bb3db80000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 00000000746a8001 CR4: 00000000001606e0
Call Trace:
tcf_classify+0x58/0x120
__dev_queue_xmit+0x40a/0x890
? ipt_do_table+0x31c/0x420 [ip_tables]
? ip_finish_output2+0x16f/0x430
ip_finish_output2+0x16f/0x430
? ip_output+0x69/0xe0
ip_output+0x69/0xe0
? ip_forward_options+0x1a0/0x1a0
__tcp_transmit_skb+0x563/0xa40
tcp_write_xmit+0x243/0xfa0
__tcp_push_pending_frames+0x32/0xf0
tcp_sendmsg_locked+0x404/0xd30
tcp_sendmsg+0x27/0x40
sock_sendmsg+0x36/0x40
__sys_sendto+0x10e/0x140
? __sys_connect+0x87/0xf0
? syscall_trace_enter+0x1df/0x2e0
? __audit_syscall_exit+0x216/0x260
__x64_sys_sendto+0x24/0x30
do_syscall_64+0x5b/0x180
entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7f0bc5ffbafd
Code: 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 8b 05 ae c4 2c 00 85 c0 75 2d 45 31 c9 45 31 c0 4c 63 d1 48 63 ff b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 8b 15 63 63 2c 00 f7 d8 64 89 02 48
RSP: 002b:00007fffef94b7f8 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 0000000000004000 RCX: 00007f0bc5ffbafd
RDX: 0000000000004000 RSI: 00000000017e5420 RDI: 0000000000000004
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004
R13: 00000000017e51d0 R14: 0000000000000010 R15: 0000000000000006
Modules linked in: act_police veth ip6table_filter ip6_tables iptable_filter binfmt_misc ext4 snd_hda_codec_generic mbcache crct10dif_pclmul jbd2 crc32_pclmul ghash_clmulni_intel snd_hda_intel snd_hda_codec snd_hwdep snd_hda_core snd_seq snd_seq_device snd_pcm aesni_intel crypto_simd cryptd glue_helper snd_timer snd joydev pcspkr virtio_balloon soundcore i2c_piix4 nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables xfs ata_generic pata_acpi qxl drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm drm virtio_blk virtio_net virtio_console net_failover failover crc32c_intel ata_piix libata serio_raw virtio_pci virtio_ring virtio floppy dm_mirror dm_region_hash dm_log dm_mod
CR2: 0000000000000000
Validating the control action within tcf_police_init() proved to fix the
above issue. A TDC selftest is added to verify the correct behavior.
Fixes: db50514f9a ("net: sched: add termination action to allow goto chain")
Fixes: 97763dc0f4 ("net_sched: reject unknown tcfa_action values")
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
769 lines
24 KiB
JSON
769 lines
24 KiB
JSON
[
|
|
{
|
|
"id": "49aa",
|
|
"name": "Add valid basic police action",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
]
|
|
],
|
|
"cmdUnderTest": "$TC actions add action police rate 1kbit burst 10k index 1",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC actions ls action police",
|
|
"matchPattern": "action order [0-9]*: police 0x1 rate 1Kbit burst 10Kb",
|
|
"matchCount": "1",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
},
|
|
{
|
|
"id": "3abe",
|
|
"name": "Add police action with duplicate index",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
],
|
|
"$TC actions add action police rate 4Mbit burst 120k index 9"
|
|
],
|
|
"cmdUnderTest": "$TC actions add action police rate 8kbit burst 24k index 9",
|
|
"expExitCode": "255",
|
|
"verifyCmd": "$TC actions ls action police",
|
|
"matchPattern": "action order [0-9]*: police 0x9",
|
|
"matchCount": "1",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
},
|
|
{
|
|
"id": "49fa",
|
|
"name": "Add valid police action with mtu",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
]
|
|
],
|
|
"cmdUnderTest": "$TC actions add action police rate 90kbit burst 10k mtu 1k index 98",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC actions get action police index 98",
|
|
"matchPattern": "action order [0-9]*: police 0x62 rate 90Kbit burst 10Kb mtu 1Kb",
|
|
"matchCount": "1",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
},
|
|
{
|
|
"id": "7943",
|
|
"name": "Add valid police action with peakrate",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
]
|
|
],
|
|
"cmdUnderTest": "$TC actions add action police rate 90kbit burst 10k mtu 2kb peakrate 100kbit index 3",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC actions ls action police",
|
|
"matchPattern": "action order [0-9]*: police 0x3 rate 90Kbit burst 10Kb mtu 2Kb peakrate 100Kbit",
|
|
"matchCount": "1",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
},
|
|
{
|
|
"id": "055e",
|
|
"name": "Add police action with peakrate and no mtu",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
]
|
|
],
|
|
"cmdUnderTest": "$TC actions add action police rate 5kbit burst 6kb peakrate 10kbit index 9",
|
|
"expExitCode": "255",
|
|
"verifyCmd": "$TC actions ls action police",
|
|
"matchPattern": "action order [0-9]*: police 0x9 rate 5Kb burst 10Kb",
|
|
"matchCount": "0",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
},
|
|
{
|
|
"id": "f057",
|
|
"name": "Add police action with valid overhead",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
]
|
|
],
|
|
"cmdUnderTest": "$TC actions add action police rate 1mbit burst 100k overhead 64 index 64",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC actions get action police index 64",
|
|
"matchPattern": "action order [0-9]*: police 0x40 rate 1Mbit burst 100Kb mtu 2Kb action reclassify overhead 64b",
|
|
"matchCount": "1",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
},
|
|
{
|
|
"id": "7ffb",
|
|
"name": "Add police action with ethernet linklayer type",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
]
|
|
],
|
|
"cmdUnderTest": "$TC actions add action police rate 2mbit burst 200k linklayer ethernet index 8",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC actions show action police",
|
|
"matchPattern": "action order [0-9]*: police 0x8 rate 2Mbit burst 200Kb mtu 2Kb action reclassify overhead 0b",
|
|
"matchCount": "1",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
},
|
|
{
|
|
"id": "3dda",
|
|
"name": "Add police action with atm linklayer type",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
]
|
|
],
|
|
"cmdUnderTest": "$TC actions add action police rate 2mbit burst 200k linklayer atm index 8",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC actions show action police",
|
|
"matchPattern": "action order [0-9]*: police 0x8 rate 2Mbit burst 200Kb mtu 2Kb action reclassify overhead 0b linklayer atm",
|
|
"matchCount": "1",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
},
|
|
{
|
|
"id": "551b",
|
|
"name": "Add police actions with conform-exceed control continue/drop",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
]
|
|
],
|
|
"cmdUnderTest": "$TC actions add action police rate 3mbit burst 250k conform-exceed continue/drop index 1",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC actions get action police index 1",
|
|
"matchPattern": "action order [0-9]*: police 0x1 rate 3Mbit burst 250Kb mtu 2Kb action continue/drop",
|
|
"matchCount": "1",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
},
|
|
{
|
|
"id": "0c70",
|
|
"name": "Add police actions with conform-exceed control pass/reclassify",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
]
|
|
],
|
|
"cmdUnderTest": "$TC actions add action police rate 3mbit burst 250k conform-exceed pass/reclassify index 4",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC actions ls action police",
|
|
"matchPattern": "action order [0-9]*: police 0x4 rate 3Mbit burst 250Kb mtu 2Kb action pass/reclassify",
|
|
"matchCount": "1",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
},
|
|
{
|
|
"id": "d946",
|
|
"name": "Add police actions with conform-exceed control pass/pipe",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
]
|
|
],
|
|
"cmdUnderTest": "$TC actions add action police rate 3mbit burst 250k conform-exceed pass/pipe index 5",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC actions ls action police",
|
|
"matchPattern": "action order [0-9]*: police 0x5 rate 3Mbit burst 250Kb mtu 2Kb action pass/pipe",
|
|
"matchCount": "1",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
},
|
|
{
|
|
"id": "ddd6",
|
|
"name": "Add police action with invalid rate value",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
]
|
|
],
|
|
"cmdUnderTest": "$TC actions add action police rate 3tb burst 250k conform-exceed pass/pipe index 5",
|
|
"expExitCode": "255",
|
|
"verifyCmd": "$TC actions ls action police",
|
|
"matchPattern": "action order [0-9]*: police 0x5 rate 3Tb burst 250Kb mtu 2Kb action pass/pipe",
|
|
"matchCount": "0",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
},
|
|
{
|
|
"id": "f61c",
|
|
"name": "Add police action with invalid burst value",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
]
|
|
],
|
|
"cmdUnderTest": "$TC actions add action police rate 3kbit burst 250P conform-exceed pass/pipe index 5",
|
|
"expExitCode": "255",
|
|
"verifyCmd": "$TC actions ls action police",
|
|
"matchPattern": "action order [0-9]*: police 0x5 rate 3Kbit burst 250Pb mtu 2Kb action pass/pipe",
|
|
"matchCount": "0",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
},
|
|
{
|
|
"id": "6aaf",
|
|
"name": "Add police actions with conform-exceed control pass/pipe [with numeric values]",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
]
|
|
],
|
|
"cmdUnderTest": "$TC actions add action police rate 3mbit burst 250k conform-exceed 0/3 index 1",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC actions get action police index 1",
|
|
"matchPattern": "action order [0-9]*: police 0x1 rate 3Mbit burst 250Kb mtu 2Kb action pass/pipe",
|
|
"matchCount": "1",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
},
|
|
{
|
|
"id": "29b1",
|
|
"name": "Add police actions with conform-exceed control <invalid>/drop",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
]
|
|
],
|
|
"cmdUnderTest": "$TC actions add action police rate 3mbit burst 250k conform-exceed 10/drop index 1",
|
|
"expExitCode": "255",
|
|
"verifyCmd": "$TC actions ls action police",
|
|
"matchPattern": "action order [0-9]*: police 0x1 rate 3Mbit burst 250Kb mtu 2Kb action ",
|
|
"matchCount": "0",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
},
|
|
{
|
|
"id": "c26f",
|
|
"name": "Add police action with invalid peakrate value",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
]
|
|
],
|
|
"cmdUnderTest": "$TC actions add action police rate 90kbit burst 10k mtu 2kb peakrate 100T index 1",
|
|
"expExitCode": "255",
|
|
"verifyCmd": "$TC actions ls action police",
|
|
"matchPattern": "action order [0-9]*: police 0x1 rate 90Kbit burst 10Kb mtu 2Kb peakrate 100Tbit",
|
|
"matchCount": "0",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
},
|
|
{
|
|
"id": "db04",
|
|
"name": "Add police action with invalid mtu value",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
]
|
|
],
|
|
"cmdUnderTest": "$TC actions add action police rate 10kbit burst 10k mtu 2Pbit index 1",
|
|
"expExitCode": "255",
|
|
"verifyCmd": "$TC actions ls action police",
|
|
"matchPattern": "action order [0-9]*: police 0x1 rate 10Kbit burst 1Kb mtu 2Pb",
|
|
"matchCount": "0",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
},
|
|
{
|
|
"id": "f3c9",
|
|
"name": "Add police action with cookie",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
]
|
|
],
|
|
"cmdUnderTest": "$TC actions add action police rate 10mbit burst 10k index 1 cookie a1b1c1d1e1f12233bb",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC actions get action police index 1",
|
|
"matchPattern": "action order [0-9]*: police 0x1 rate 10Mbit burst 10Kb mtu 2Kb.*cookie a1b1c1d1e1f12233bb",
|
|
"matchCount": "1",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
},
|
|
{
|
|
"id": "d190",
|
|
"name": "Add police action with maximum index",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
]
|
|
],
|
|
"cmdUnderTest": "$TC actions add action police rate 10mbit burst 10k index 4294967295",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC actions get action police index 4294967295",
|
|
"matchPattern": "action order [0-9]*: police 0xffffffff rate 10Mbit burst 10Kb mtu 2Kb",
|
|
"matchCount": "1",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
},
|
|
{
|
|
"id": "336e",
|
|
"name": "Delete police action",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
],
|
|
"$TC actions add action police rate 5mbit burst 2m index 12"
|
|
],
|
|
"cmdUnderTest": "$TC actions delete action police index 12",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC actions ls action police",
|
|
"matchPattern": "action order [0-9]*: police 0xc rate 5Mb burst 2Mb",
|
|
"matchCount": "0",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
},
|
|
{
|
|
"id": "77fa",
|
|
"name": "Get single police action from many actions",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
],
|
|
"$TC actions add action police rate 1mbit burst 100k index 1",
|
|
"$TC actions add action police rate 2mbit burst 200k index 2",
|
|
"$TC actions add action police rate 3mbit burst 300k index 3",
|
|
"$TC actions add action police rate 4mbit burst 400k index 4",
|
|
"$TC actions add action police rate 5mbit burst 500k index 5",
|
|
"$TC actions add action police rate 6mbit burst 600k index 6",
|
|
"$TC actions add action police rate 7mbit burst 700k index 7",
|
|
"$TC actions add action police rate 8mbit burst 800k index 8"
|
|
],
|
|
"cmdUnderTest": "$TC actions get action police index 4",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC actions get action police index 4",
|
|
"matchPattern": "action order [0-9]*: police 0x4 rate 4Mbit burst 400Kb",
|
|
"matchCount": "1",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
},
|
|
{
|
|
"id": "aa43",
|
|
"name": "Get single police action without specifying index",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
],
|
|
"$TC actions add action police rate 1mbit burst 100k index 1"
|
|
],
|
|
"cmdUnderTest": "$TC actions get action police",
|
|
"expExitCode": "255",
|
|
"verifyCmd": "$TC actions get action police",
|
|
"matchPattern": "action order [0-9]*: police",
|
|
"matchCount": "0",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
},
|
|
{
|
|
"id": "858b",
|
|
"name": "List police actions",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
],
|
|
"$TC actions add action police rate 1mbit burst 100k index 1",
|
|
"$TC actions add action police rate 2mbit burst 200k index 2",
|
|
"$TC actions add action police rate 3mbit burst 300k index 3",
|
|
"$TC actions add action police rate 4mbit burst 400k index 4",
|
|
"$TC actions add action police rate 5mbit burst 500k index 5",
|
|
"$TC actions add action police rate 6mbit burst 600k index 6",
|
|
"$TC actions add action police rate 7mbit burst 700k index 7",
|
|
"$TC actions add action police rate 8mbit burst 800k index 8"
|
|
],
|
|
"cmdUnderTest": "$TC actions list action police",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC actions ls action police",
|
|
"matchPattern": "action order [0-9]*: police 0x[1-8] rate [1-8]Mbit burst [1-8]00Kb",
|
|
"matchCount": "8",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
},
|
|
{
|
|
"id": "1c3a",
|
|
"name": "Flush police actions",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
"$TC actions add action police rate 1mbit burst 100k index 1",
|
|
"$TC actions add action police rate 2mbit burst 200k index 2",
|
|
"$TC actions add action police rate 3mbit burst 300k index 3",
|
|
"$TC actions add action police rate 4mbit burst 400k index 4",
|
|
"$TC actions add action police rate 5mbit burst 500k index 5",
|
|
"$TC actions add action police rate 6mbit burst 600k index 6",
|
|
"$TC actions add action police rate 7mbit burst 700k index 7",
|
|
"$TC actions add action police rate 8mbit burst 800k index 8"
|
|
],
|
|
"cmdUnderTest": "$TC actions flush action police",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC actions ls action police",
|
|
"matchPattern": "action order [0-9]*: police",
|
|
"matchCount": "0",
|
|
"teardown": [
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"id": "7326",
|
|
"name": "Add police action with control continue",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
]
|
|
],
|
|
"cmdUnderTest": "$TC actions add action police rate 7mbit burst 1m continue index 1",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC actions get action police index 1",
|
|
"matchPattern": "action order [0-9]*: police 0x1 rate 7Mbit burst 1024Kb mtu 2Kb action continue",
|
|
"matchCount": "1",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
},
|
|
{
|
|
"id": "34fa",
|
|
"name": "Add police action with control drop",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
]
|
|
],
|
|
"cmdUnderTest": "$TC actions add action police rate 7mbit burst 1m drop index 1",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC actions ls action police",
|
|
"matchPattern": "action order [0-9]*: police 0x1 rate 7Mbit burst 1024Kb mtu 2Kb action drop",
|
|
"matchCount": "1",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
},
|
|
{
|
|
"id": "8dd5",
|
|
"name": "Add police action with control ok",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
]
|
|
],
|
|
"cmdUnderTest": "$TC actions add action police rate 7mbit burst 1m ok index 1",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC actions ls action police",
|
|
"matchPattern": "action order [0-9]*: police 0x1 rate 7Mbit burst 1024Kb mtu 2Kb action pass",
|
|
"matchCount": "1",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
},
|
|
{
|
|
"id": "b9d1",
|
|
"name": "Add police action with control reclassify",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
]
|
|
],
|
|
"cmdUnderTest": "$TC actions add action police rate 7mbit burst 1m reclassify index 1",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC actions get action police index 1",
|
|
"matchPattern": "action order [0-9]*: police 0x1 rate 7Mbit burst 1024Kb mtu 2Kb action reclassify",
|
|
"matchCount": "1",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
},
|
|
{
|
|
"id": "c534",
|
|
"name": "Add police action with control pipe",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
]
|
|
],
|
|
"cmdUnderTest": "$TC actions add action police rate 7mbit burst 1m pipe index 1",
|
|
"expExitCode": "0",
|
|
"verifyCmd": "$TC actions ls action police",
|
|
"matchPattern": "action order [0-9]*: police 0x1 rate 7Mbit burst 1024Kb mtu 2Kb action pipe",
|
|
"matchCount": "1",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
},
|
|
{
|
|
"id": "b48b",
|
|
"name": "Add police action with exceed goto chain control action",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
]
|
|
],
|
|
"cmdUnderTest": "$TC actions add action police rate 1mbit burst 1k conform-exceed pass / goto chain 42",
|
|
"expExitCode": "255",
|
|
"verifyCmd": "$TC actions ls action police",
|
|
"matchPattern": "action order [0-9]*: police 0x1 rate 1Mbit burst 1Kb mtu 2Kb action pass/goto chain 42",
|
|
"matchCount": "0",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
},
|
|
{
|
|
"id": "689e",
|
|
"name": "Replace police action with invalid goto chain control",
|
|
"category": [
|
|
"actions",
|
|
"police"
|
|
],
|
|
"setup": [
|
|
[
|
|
"$TC actions flush action police",
|
|
0,
|
|
1,
|
|
255
|
|
],
|
|
"$TC actions add action police rate 3mbit burst 250k drop index 90"
|
|
],
|
|
"cmdUnderTest": "$TC actions replace action police rate 3mbit burst 250k goto chain 42 index 90 cookie c1a0c1a0",
|
|
"expExitCode": "255",
|
|
"verifyCmd": "$TC actions get action police index 90",
|
|
"matchPattern": "action order [0-9]*: police 0x5a rate 3Mbit burst 250Kb mtu 2Kb action drop",
|
|
"matchCount": "1",
|
|
"teardown": [
|
|
"$TC actions flush action police"
|
|
]
|
|
}
|
|
]
|