Add missing actions.
Acked-by: Simon Horman <[email protected]>
Signed-off-by: Adrian Moreno <[email protected]>
---
python/ovs/flow/odp.py | 9 +++++++++
python/ovs/tests/test_odp.py | 12 ++++++++++++
2 files changed, 21 insertions(+)
diff --git a/python/ovs/flow/odp.py b/python/ovs/flow/odp.py
index ef7e5d6b8..46697a1bc 100644
--- a/python/ovs/flow/odp.py
+++ b/python/ovs/flow/odp.py
@@ -204,6 +204,7 @@ class ODPFlow(Flow):
"""Generate the arguments for the action KVDecoders."""
_decoders = {
"drop": decode_flag,
+ "meter": decode_int,
"lb_output": decode_int,
"trunc": decode_int,
"recirc": decode_int,
@@ -334,6 +335,14 @@ class ODPFlow(Flow):
)
),
**ODPFlow._tnl_action_decoder_args(),
+ "hash": nested_kv_decoder(
+ KVDecoders(
+ {
+ "l4": decode_int,
+ "sym_l4": decode_int,
+ }
+ )
+ ),
}
_decoders["sample"] = nested_kv_decoder(
diff --git a/python/ovs/tests/test_odp.py b/python/ovs/tests/test_odp.py
index a50d3185c..d60947a5c 100644
--- a/python/ovs/tests/test_odp.py
+++ b/python/ovs/tests/test_odp.py
@@ -534,6 +534,18 @@ def test_odp_fields(input_string, expected):
),
],
),
+ (
+ "actions:meter(1),hash(l4(0))",
+ [
+ KeyValue("meter", 1),
+ KeyValue(
+ "hash",
+ {
+ "l4": 0,
+ }
+ ),
+ ],
+ ),
],
)
def test_odp_actions(input_string, expected):
--
2.43.0
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev