From f8bf621362cc7fa45731c87ef485f7fb298e1e13 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Wed, 16 Jun 2021 18:45:56 +0200 Subject: src: queue: allow use of MAP statement for queue number retrieval This allows to chose a queue number at run time using map statements, e.g.: queue flags bypass to ip saddr map { 192.168.7/24 : 0, 192.168.0/24 : 1 } Signed-off-by: Florian Westphal --- tests/py/any/queue.t.json | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'tests/py/any/queue.t.json') diff --git a/tests/py/any/queue.t.json b/tests/py/any/queue.t.json index 18ed3c81..162bdff8 100644 --- a/tests/py/any/queue.t.json +++ b/tests/py/any/queue.t.json @@ -140,3 +140,37 @@ } ] +# queue flags bypass to oifname map { "eth0" : 0, "ppp0" : 2, "eth1" : 2 } +[ + { + "queue": { + "flags": "bypass", + "num": { + "map": { + "data": { + "set": [ + [ + "eth0", + 0 + ], + [ + "ppp0", + 2 + ], + [ + "eth1", + 2 + ] + ] + }, + "key": { + "meta": { + "key": "oifname" + } + } + } + } + } + } +] + -- cgit v1.2.3