summaryrefslogtreecommitdiffstats
path: root/tests/py/ip/ip.t.payload
diff options
context:
space:
mode:
Diffstat (limited to 'tests/py/ip/ip.t.payload')
-rw-r--r--tests/py/ip/ip.t.payload20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/py/ip/ip.t.payload b/tests/py/ip/ip.t.payload
index f14f33bc..e9de690d 100644
--- a/tests/py/ip/ip.t.payload
+++ b/tests/py/ip/ip.t.payload
@@ -40,6 +40,16 @@ ip test-ip4 input
[ bitwise reg 1 = (reg=1 & 0x000000fc ) ^ 0x00000000 ]
[ lookup reg 1 set __set%d 0x1 ]
+# ip dscp vmap { cs1 : continue , cs4 : accept } counter
+__map%d test-ip4 b size 2
+__map%d test-ip4 0
+ element 00000020 : 0 [end] element 00000080 : 0 [end]
+ip test-ip4 input
+ [ payload load 1b @ network header + 1 => reg 1 ]
+ [ bitwise reg 1 = (reg=1 & 0x000000fc ) ^ 0x00000000 ]
+ [ lookup reg 1 set __map%d dreg 0 ]
+ [ counter pkts 0 bytes 0 ]
+
# ip length 232
ip test-ip4 input
[ payload load 2b @ network header + 2 => reg 1 ]
@@ -523,6 +533,16 @@ ip test-ip4 input
[ bitwise reg 1 = (reg=1 & 0x0000000f ) ^ 0x00000000 ]
[ cmp eq reg 1 0x0000000f ]
+# ip hdrlength vmap { 0-4 : drop, 5 : accept, 6 : continue } counter
+__map%d test-ip4 f size 4
+__map%d test-ip4 0
+ element 00000000 : 0 [end] element 00000005 : 0 [end] element 00000006 : 0 [end] element 00000007 : 1 [end]
+ip test-ip4 input
+ [ payload load 1b @ network header + 0 => reg 1 ]
+ [ bitwise reg 1 = (reg=1 & 0x0000000f ) ^ 0x00000000 ]
+ [ lookup reg 1 set __map%d dreg 0 ]
+ [ counter pkts 0 bytes 0 ]
+
# iif "lo" ip daddr set 127.0.0.1
ip test-ip4 input
[ meta load iif => reg 1 ]