diff options
author | Nobuhiro MIKI <nmiki@yahoo-corp.jp> | 2023-03-29 14:51:18 +0900 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2023-03-29 22:16:04 +0200 |
commit | 7381fd440a88ae92ca3bbc6b2ee34c5d5861a061 (patch) | |
tree | 14b653a9c07c42dea92340c4d3e4c78e1c417710 /python | |
parent | 03fc1ad78521544c7269355ec72fec8c2373b96d (diff) | |
download | openvswitch-7381fd440a88ae92ca3bbc6b2ee34c5d5861a061.tar.gz |
odp: Add SRv6 tunnel actions.
This patch adds ODP actions for SRv6 and its tests.
Signed-off-by: Nobuhiro MIKI <nmiki@yahoo-corp.jp>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'python')
-rw-r--r-- | python/ovs/flow/odp.py | 8 | ||||
-rw-r--r-- | python/ovs/tests/test_odp.py | 16 |
2 files changed, 24 insertions, 0 deletions
diff --git a/python/ovs/flow/odp.py b/python/ovs/flow/odp.py index db63afc8d..88aee17fb 100644 --- a/python/ovs/flow/odp.py +++ b/python/ovs/flow/odp.py @@ -474,6 +474,14 @@ class ODPFlow(Flow): } ) ), + "srv6": nested_kv_decoder( + KVDecoders( + { + "segments_left": decode_int, + "segs": decode_default, + } + ) + ), } ) ), diff --git a/python/ovs/tests/test_odp.py b/python/ovs/tests/test_odp.py index f8017ca8a..a50d3185c 100644 --- a/python/ovs/tests/test_odp.py +++ b/python/ovs/tests/test_odp.py @@ -453,6 +453,22 @@ def test_odp_fields(input_string, expected): ], ), ( + "actions:tnl_push(header(srv6(segments_left=1,segs(2001:cafe::90,2001:cafe::91))))", # noqa: E501 + [ + KeyValue( + "tnl_push", + { + "header": { + "srv6": { + "segments_left": 1, + "segs": "2001:cafe::90,2001:cafe::91", + } + } + }, + ), + ], + ), + ( "actions:clone(1),clone(clone(push_vlan(vid=12,pcp=0),2),1)", [ KeyValue("clone", [{"output": {"port": 1}}]), |