diff mbox series

[ovs-dev,v2,3/6] python: ovs: flow: Add dp hash and meter actions.

Message ID 20231220175803.2098495-4-amorenoz@redhat.com
State Changes Requested
Headers show
Series python: Miscelaneous flow parsing fixes. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/intel-ovs-compilation success test: success

Commit Message

Adrián Moreno Dec. 20, 2023, 5:57 p.m. UTC
Add missing actions.

Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
---
 python/ovs/flow/odp.py | 9 +++++++++
 1 file changed, 9 insertions(+)
diff mbox series

Patch

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(