mirror of
https://github.com/openvswitch/ovs
synced 2025-10-29 15:28:56 +00:00
python: Fix datapath flow decoders.
Fix the following erros in odp decoding: - Missing push_mpls action - Typos in collector_set_id, tp_src/tp_dst and csum - Missing two fields in vxlan match Signed-off-by: Adrian Moreno <amorenoz@redhat.com> Acked-by: Mike Pattrick <mkp@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
committed by
Ilya Maximets
parent
9855f35dd2
commit
c627cfd9cb
@@ -225,7 +225,7 @@ class ODPFlow(Flow):
|
|||||||
KVDecoders(
|
KVDecoders(
|
||||||
{
|
{
|
||||||
"probability": decode_int,
|
"probability": decode_int,
|
||||||
"collector_sed_id": decode_int,
|
"collector_set_id": decode_int,
|
||||||
"obs_domain_id": decode_int,
|
"obs_domain_id": decode_int,
|
||||||
"obs_point_id": decode_int,
|
"obs_point_id": decode_int,
|
||||||
"output_port": decode_default,
|
"output_port": decode_default,
|
||||||
@@ -303,6 +303,21 @@ class ODPFlow(Flow):
|
|||||||
),
|
),
|
||||||
"pop_nsh": decode_flag,
|
"pop_nsh": decode_flag,
|
||||||
"tnl_pop": decode_int,
|
"tnl_pop": decode_int,
|
||||||
|
"pop_mpls": KVDecoders({"eth_type": decode_int}),
|
||||||
|
**dict.fromkeys(
|
||||||
|
["push_mpls", "add_mpls"],
|
||||||
|
nested_kv_decoder(
|
||||||
|
KVDecoders(
|
||||||
|
{
|
||||||
|
"label": decode_int,
|
||||||
|
"tc": decode_int,
|
||||||
|
"ttl": decode_int,
|
||||||
|
"bos": decode_int,
|
||||||
|
"eth_type": decode_int,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
),
|
||||||
|
),
|
||||||
"ct_clear": decode_flag,
|
"ct_clear": decode_flag,
|
||||||
"ct": nested_kv_decoder(
|
"ct": nested_kv_decoder(
|
||||||
KVDecoders(
|
KVDecoders(
|
||||||
@@ -412,7 +427,7 @@ class ODPFlow(Flow):
|
|||||||
{
|
{
|
||||||
"src": decode_int,
|
"src": decode_int,
|
||||||
"dst": decode_int,
|
"dst": decode_int,
|
||||||
"dsum": Mask16,
|
"csum": Mask16,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
@@ -499,8 +514,8 @@ class ODPFlow(Flow):
|
|||||||
"src": IPMask,
|
"src": IPMask,
|
||||||
"dst": IPMask,
|
"dst": IPMask,
|
||||||
"proto": Mask8,
|
"proto": Mask8,
|
||||||
"tcp_src": Mask16,
|
"tp_src": Mask16,
|
||||||
"tcp_dst": Mask16,
|
"tp_dst": Mask16,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
@@ -541,6 +556,8 @@ class ODPFlow(Flow):
|
|||||||
"vxlan": nested_kv_decoder(
|
"vxlan": nested_kv_decoder(
|
||||||
KVDecoders(
|
KVDecoders(
|
||||||
{
|
{
|
||||||
|
"flags": decode_int,
|
||||||
|
"vni": decode_int,
|
||||||
"gbp": nested_kv_decoder(
|
"gbp": nested_kv_decoder(
|
||||||
KVDecoders(
|
KVDecoders(
|
||||||
{
|
{
|
||||||
@@ -548,7 +565,7 @@ class ODPFlow(Flow):
|
|||||||
"flags": Mask8,
|
"flags": Mask8,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
)
|
),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user