From e9493a323726da383ffae413d4b526a15ed15142 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Thu, 11 Jan 2018 16:30:24 +0100 Subject: tests: add test cases for vmap binop transfer they fail with 'BUG: invalid binary operation 5'. Signed-off-by: Florian Westphal --- tests/py/ip/ip.t.payload | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'tests/py/ip/ip.t.payload') 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 ] -- cgit v1.2.3