On Tue, Aug 9, 2022 at 6:45 PM Ales Musil <[email protected]> wrote:
>
> On Mon, Aug 8, 2022 at 5:30 PM Dumitru Ceara <[email protected]> wrote:
>
> > These may change over time and, as a matter of fact, have recently changed
> > in OVS master branch with commit fcdf8ae4a350 ("lib: Print nw_frag in flow
> > key.").
> >
> > Instead, strip the flow key from the output.  To achieve that, the calls
> > to ovn-trace had to go through a bit of refactoring too.
> >
> > OVN has weekly CI jobs that run against OVS master branch.  These were
> > failing due to the flow key dump changes:
> > https://github.com/ovn-org/ovn/actions/runs/2810798237
> >
> > Signed-off-by: Dumitru Ceara <[email protected]>
> > ---
> >  tests/ofproto-macros.at |   8 +++
> >  tests/ovn-macros.at     |  16 ++++++
> >  tests/ovn-northd.at     | 116 ++++++++++++++--------------------------
> >  tests/ovn.at            |  64 ++++++++--------------
> >  4 files changed, 85 insertions(+), 119 deletions(-)
> >
> > diff --git a/tests/ofproto-macros.at b/tests/ofproto-macros.at
> > index 23d793a95..2e0bbd20b 100644
> > --- a/tests/ofproto-macros.at
> > +++ b/tests/ofproto-macros.at
> > @@ -18,6 +18,14 @@ s/cookie=0x[0-9a-fA-F]*,//
> >  '
> >  }
> >
> > +# Strips 'nw_frag=yes|no' from ovs-ofctl (or similar) output.
> > +strip_nw_frag () {
> > +    sed '
> > +s/nw_frag=yes,//
> > +s/nw_frag=no,//
> > +'
> > +}
> > +
> >  # Strips out uninteresting parts of ovs-ofctl output, as well as parts
> >  # that vary from one run to another.
> >  ofctl_strip () {
> > diff --git a/tests/ovn-macros.at b/tests/ovn-macros.at
> > index 0e58c1d56..2ba930a85 100644
> > --- a/tests/ovn-macros.at
> > +++ b/tests/ovn-macros.at
> > @@ -787,6 +787,22 @@ store_ip6_multicast_pkt() {
> >      echo ${packet} >> ${outfile}
> >  }
> >
> > +# Wrapper on top of ovn-trace, stripping some things and storing the trace
> > +# output to a file called 'trace'.  For now it strips the rows starting
> > +# with a '#'.  This should correspond to the flow key and might be
> > displayed
> > +# differently by different OVS library versions.
> > +ovn_trace() {
> > +    AT_CAPTURE_FILE([trace])
> > +    ovn-trace "$@" | tee trace | sed '/^# /d'
> > +}
> > +
> > +# Same as ovn_trace() except that it connects to an ovn-trace daemon.
> > +ovn_trace_client() {
> > +    target=$1; shift
> > +    AT_CAPTURE_FILE([trace])
> > +    ovs-appctl -t $target trace "$@" | tee trace | sed '/^# /d'
> > +}
> > +
> >  OVS_END_SHELL_HELPERS
> >
> >  m4_define([OVN_POPULATE_ARP], [AT_CHECK(ovn_populate_arp__, [0],
> > [ignore])])
> > diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
> > index ae0f66ad6..5b5eeb0ee 100644
> > --- a/tests/ovn-northd.at
> > +++ b/tests/ovn-northd.at
> > @@ -2806,8 +2806,7 @@ lsp1_inport=$(fetch_column Port_Binding tunnel_key
> > logical_port=lsp1)
> >
> >  # TCP packets should go to conntrack.
> >  flow="inport == \"lsp1\" && ${flow_eth} && ${flow_ip} && ${flow_tcp}"
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > tcp,reg14=0x${lsp1_inport},vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.1,nw_dst=66.66.66.66,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=80,tcp_flags=0
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  ct_next(ct_state=new|trk) {
> >      ct_next(ct_state=new|trk) {
> >          output("lsp2");
> > @@ -2817,8 +2816,7 @@ ct_next(ct_state=new|trk) {
> >
> >  # UDP packets should go to conntrack.
> >  flow="inport == \"lsp1\" && ${flow_eth} && ${flow_ip} && ${flow_udp}"
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > udp,reg14=0x${lsp1_inport},vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.1,nw_dst=66.66.66.66,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=80
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  ct_next(ct_state=new|trk) {
> >      ct_next(ct_state=new|trk) {
> >          output("lsp2");
> > @@ -2834,15 +2832,13 @@ ovn-nbctl --wait=sb sync
> >
> >  # TCP packets should not go to conntrack anymore.
> >  flow="inport == \"lsp1\" && ${flow_eth} && ${flow_ip} && ${flow_tcp}"
> > -AT_CHECK_UNQUOTED([ovn-trace --minimal ls "${flow}"], [0], [dnl
> > -#
> > tcp,reg14=0x${lsp1_inport},vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.1,nw_dst=66.66.66.66,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=80,tcp_flags=0
> > +AT_CHECK_UNQUOTED([ovn_trace --minimal ls "${flow}"], [0], [dnl
> >  output("lsp2");
> >  ])
> >
> >  # UDP packets still go to conntrack.
> >  flow="inport == \"lsp1\" && ${flow_eth} && ${flow_ip} && ${flow_udp}"
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > udp,reg14=0x${lsp1_inport},vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.1,nw_dst=66.66.66.66,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=80
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  ct_next(ct_state=new|trk) {
> >      ct_next(ct_state=new|trk) {
> >          output("lsp2");
> > @@ -2862,8 +2858,7 @@ ovn-nbctl --wait=sb sync
> >
> >  # TCP packets should go to conntrack.
> >  flow="inport == \"lsp1\" && ${flow_eth} && ${flow_ip} && ${flow_tcp}"
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > tcp,reg14=0x${lsp1_inport},vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.1,nw_dst=66.66.66.66,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=80,tcp_flags=0
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  ct_lb_mark {
> >      ct_lb_mark {
> >          reg0[[6]] = 0;
> > @@ -2877,8 +2872,7 @@ ct_lb_mark {
> >
> >  # UDP packets should go to conntrack.
> >  flow="inport == \"lsp1\" && ${flow_eth} && ${flow_ip} && ${flow_udp}"
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > udp,reg14=0x${lsp1_inport},vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.1,nw_dst=66.66.66.66,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=80
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  ct_lb_mark {
> >      ct_lb_mark {
> >          reg0[[6]] = 0;
> > @@ -2898,8 +2892,7 @@ ovn-nbctl --wait=sb sync
> >
> >  # TCP packets should go to conntrack for load balancing.
> >  flow="inport == \"lsp1\" && ${flow_eth} && ${flow_ip} && ${flow_tcp}"
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > tcp,reg14=0x${lsp1_inport},vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.1,nw_dst=66.66.66.66,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=80,tcp_flags=0
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  ct_lb_mark {
> >      ct_lb_mark {
> >          reg0[[6]] = 0;
> > @@ -2913,8 +2906,7 @@ ct_lb_mark {
> >
> >  # UDP packets still go to conntrack.
> >  flow="inport == \"lsp1\" && ${flow_eth} && ${flow_ip} && ${flow_udp}"
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > udp,reg14=0x${lsp1_inport},vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.1,nw_dst=66.66.66.66,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=80
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  ct_lb_mark {
> >      ct_lb_mark {
> >          reg0[[6]] = 0;
> > @@ -2958,8 +2950,7 @@ flow_udp='udp && udp.dst == 80'
> >
> >  # TCP packets should go to conntrack.
> >  flow="inport == \"lsp1\" && ${flow_eth} && ${flow_ip} && ${flow_tcp}"
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > tcp,reg14=0x${lsp1_inport},vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.1,nw_dst=66.66.66.66,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=80,tcp_flags=0
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  ct_next(ct_state=new|trk) {
> >      ct_next(ct_state=new|trk) {
> >          output("lsp2");
> > @@ -2969,8 +2960,7 @@ ct_next(ct_state=new|trk) {
> >
> >  # UDP packets should go to conntrack.
> >  flow="inport == \"lsp1\" && ${flow_eth} && ${flow_ip} && ${flow_udp}"
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > udp,reg14=0x${lsp1_inport},vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.1,nw_dst=66.66.66.66,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=80
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  ct_next(ct_state=new|trk) {
> >      ct_next(ct_state=new|trk) {
> >          output("lsp2");
> > @@ -2986,15 +2976,13 @@ ovn-nbctl --wait=sb sync
> >
> >  # TCP packets should not go to conntrack anymore.
> >  flow="inport == \"lsp1\" && ${flow_eth} && ${flow_ip} && ${flow_tcp}"
> > -AT_CHECK_UNQUOTED([ovn-trace --minimal ls "${flow}"], [0], [dnl
> > -#
> > tcp,reg14=0x${lsp1_inport},vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.1,nw_dst=66.66.66.66,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=80,tcp_flags=0
> > +AT_CHECK_UNQUOTED([ovn_trace --minimal ls "${flow}"], [0], [dnl
> >  output("lsp2");
> >  ])
> >
> >  # UDP packets still go to conntrack.
> >  flow="inport == \"lsp1\" && ${flow_eth} && ${flow_ip} && ${flow_udp}"
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > udp,reg14=0x${lsp1_inport},vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.1,nw_dst=66.66.66.66,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=80
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  ct_next(ct_state=new|trk) {
> >      ct_next(ct_state=new|trk) {
> >          output("lsp2");
> > @@ -3014,8 +3002,7 @@ ovn-nbctl --wait=sb sync
> >
> >  # TCP packets should go to conntrack.
> >  flow="inport == \"lsp1\" && ${flow_eth} && ${flow_ip} && ${flow_tcp}"
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > tcp,reg14=0x${lsp1_inport},vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.1,nw_dst=66.66.66.66,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=80,tcp_flags=0
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  ct_lb_mark {
> >      ct_lb_mark {
> >          reg0[[6]] = 0;
> > @@ -3029,8 +3016,7 @@ ct_lb_mark {
> >
> >  # UDP packets should go to conntrack.
> >  flow="inport == \"lsp1\" && ${flow_eth} && ${flow_ip} && ${flow_udp}"
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > udp,reg14=0x${lsp1_inport},vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.1,nw_dst=66.66.66.66,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=80
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  ct_lb_mark {
> >      ct_lb_mark {
> >          reg0[[6]] = 0;
> > @@ -3050,8 +3036,7 @@ ovn-nbctl --wait=sb sync
> >
> >  # TCP packets should go to conntrack for load balancing.
> >  flow="inport == \"lsp1\" && ${flow_eth} && ${flow_ip} && ${flow_tcp}"
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > tcp,reg14=0x${lsp1_inport},vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.1,nw_dst=66.66.66.66,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=80,tcp_flags=0
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  ct_lb_mark {
> >      ct_lb_mark {
> >          reg0[[6]] = 0;
> > @@ -3065,8 +3050,7 @@ ct_lb_mark {
> >
> >  # UDP packets still go to conntrack.
> >  flow="inport == \"lsp1\" && ${flow_eth} && ${flow_ip} && ${flow_udp}"
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > udp,reg14=0x${lsp1_inport},vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.1,nw_dst=66.66.66.66,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=80
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  ct_lb_mark {
> >      ct_lb_mark {
> >          reg0[[6]] = 0;
> > @@ -3106,8 +3090,7 @@ lsp1_inport=$(fetch_column Port_Binding tunnel_key
> > logical_port=lsp1)
> >
> >  # TCP packets should go to conntrack.
> >  flow="inport == \"lsp1\" && ${flow_eth} && ${flow_ip} && ${flow_tcp}"
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > tcp,reg14=0x${lsp1_inport},vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.1,nw_dst=66.66.66.66,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=80,tcp_flags=0
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  ct_next(ct_state=new|trk) {
> >      ct_next(ct_state=new|trk) {
> >          output("lsp2");
> > @@ -3124,15 +3107,13 @@ ovn-nbctl --wait=sb sync
> >
> >  # TCP packets should not go to conntrack anymore.
> >  flow="inport == \"lsp1\" && ${flow_eth} && ${flow_ip} && ${flow_tcp}"
> > -AT_CHECK_UNQUOTED([ovn-trace --minimal ls "${flow}"], [0], [dnl
> > -#
> > tcp,reg14=0x${lsp1_inport},vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.1,nw_dst=66.66.66.66,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=80,tcp_flags=0
> > +AT_CHECK_UNQUOTED([ovn_trace --minimal ls "${flow}"], [0], [dnl
> >  output("lsp2");
> >  ])
> >
> >  # UDP packets should not go to conntrack anymore.
> >  flow="inport == \"lsp1\" && ${flow_eth} && ${flow_ip} && ${flow_udp}"
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > udp,reg14=0x${lsp1_inport},vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.1,nw_dst=66.66.66.66,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=80
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  output("lsp2");
> >  ])
> >
> > @@ -4234,13 +4215,13 @@ check ovn-nbctl lsp-set-options lrp1-attachment
> > router-port=lrp1
> >  check ovn-nbctl lr-nat-add lr0 dnat 42.42.42.42 192.168.0.2
> >  check ovn-nbctl --wait=sb sync
> >
> > -AT_CHECK([ovn-trace --minimal 'inport == "sw1-port1" && eth.src ==
> > 50:54:00:00:00:03 && eth.dst == 00:00:00:00:ff:02 && ip4.dst == 42.42.42.42
> > && ip4.src == 11.0.0.2 && ip.ttl == 64' | grep "output(\"sw0-port1\")"],
> > [0], [ignore])
> > +AT_CHECK([ovn_trace --minimal 'inport == "sw1-port1" && eth.src ==
> > 50:54:00:00:00:03 && eth.dst == 00:00:00:00:ff:02 && ip4.dst == 42.42.42.42
> > && ip4.src == 11.0.0.2 && ip.ttl == 64' | grep "output(\"sw0-port1\")"],
> > [0], [ignore])
> >
> >  dnl If we remove the DNAT entry we will be unable to trace to the DNAT
> > address
> >  check ovn-nbctl lr-nat-del lr0 dnat 42.42.42.42
> >  check ovn-nbctl --wait=sb sync
> >
> > -AT_CHECK([ovn-trace --minimal 'inport == "sw1-port1" && eth.src ==
> > 50:54:00:00:00:03 && eth.dst == 00:00:00:00:ff:02 && ip4.dst == 42.42.42.42
> > && ip4.src == 11.0.0.2 && ip.ttl == 64' | grep "output(\"sw0-port1\")"],
> > [1], [ignore])
> > +AT_CHECK([ovn_trace --minimal 'inport == "sw1-port1" && eth.src ==
> > 50:54:00:00:00:03 && eth.dst == 00:00:00:00:ff:02 && ip4.dst == 42.42.42.42
> > && ip4.src == 11.0.0.2 && ip.ttl == 64' | grep "output(\"sw0-port1\")"],
> > [1], [ignore])
> >
> >  AT_CLEANUP
> >  ])
> > @@ -4273,13 +4254,13 @@ check ovn-nbctl lsp-set-options lrp1-attachment
> > router-port=lrp1
> >  check ovn-nbctl lr-nat-add lr0 dnat fd42::42 fd68::2
> >  check ovn-nbctl --wait=sb sync
> >
> > -AT_CHECK([ovn-trace --minimal 'inport == "sw1-port1" && eth.src ==
> > 50:54:00:00:00:03 && eth.dst == 00:00:00:00:ff:02 && ip6.dst == fd42::42 &&
> > ip6.src == fd11::2 && ip.ttl == 64' | grep "output(\"sw0-port1\")"], [0],
> > [ignore])
> > +AT_CHECK([ovn_trace --minimal 'inport == "sw1-port1" && eth.src ==
> > 50:54:00:00:00:03 && eth.dst == 00:00:00:00:ff:02 && ip6.dst == fd42::42 &&
> > ip6.src == fd11::2 && ip.ttl == 64' | grep "output(\"sw0-port1\")"], [0],
> > [ignore])
> >
> >  dnl If we remove the DNAT entry we will be unable to trace to the DNAT
> > address
> >  check ovn-nbctl lr-nat-del lr0 dnat fd42::42
> >  check ovn-nbctl --wait=sb sync
> >
> > -AT_CHECK([ovn-trace --minimal 'inport == "sw1-port1" && eth.src ==
> > 50:54:00:00:00:03 && eth.dst == 00:00:00:00:ff:02 && ip6.dst == fd42::42 &&
> > ip6.src == fd11::2 && ip.ttl == 64' | grep "output(\"sw0-port1\")"], [1],
> > [ignore])
> > +AT_CHECK([ovn_trace --minimal 'inport == "sw1-port1" && eth.src ==
> > 50:54:00:00:00:03 && eth.dst == 00:00:00:00:ff:02 && ip6.dst == fd42::42 &&
> > ip6.src == fd11::2 && ip.ttl == 64' | grep "output(\"sw0-port1\")"], [1],
> > [ignore])
> >
> >  AT_CLEANUP
> >  ])
> > @@ -5844,8 +5825,7 @@ check ovn-nbctl --wait=sb sync
> >
> >  flow="eth.dst == 00:00:00:00:01:00 && inport == \"rtr-ls\" && ip4.src ==
> > 42.42.42.42 && ip4.dst == 43.43.43.43 && ip.ttl == 64 && tcp && tcp.dst ==
> > 4343"
> >
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --minimal "${flow}" --lb-dst
> > 42.42.42.42:4242], [0], [dnl
> > -#
> > tcp,reg14=0x1,vlan_tci=0x0000,dl_src=00:00:00:00:00:00,dl_dst=00:00:00:00:01:00,nw_src=42.42.42.42,nw_dst=43.43.43.43,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=4343,tcp_flags=0
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --minimal "${flow}" --lb-dst
> > 42.42.42.42:4242], [0], [dnl
> >  ct_dnat /* assuming no un-dnat entry, so no change */ {
> >      ct_lb_mark /* default (use --ct to customize) */ {
> >          ip.ttl--;
> > @@ -5862,8 +5842,7 @@ ct_dnat /* assuming no un-dnat entry, so no change
> > */ {
> >  };
> >  ])
> >
> > -AT_CHECK_UNQUOTED([ovn-trace --minimal "${flow}" --lb-dst
> > 42.42.42.42:4242], [0], [dnl
> > -#
> > tcp,reg14=0x1,vlan_tci=0x0000,dl_src=00:00:00:00:00:00,dl_dst=00:00:00:00:01:00,nw_src=42.42.42.42,nw_dst=43.43.43.43,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=4343,tcp_flags=0
> > +AT_CHECK_UNQUOTED([ovn_trace --minimal "${flow}" --lb-dst
> > 42.42.42.42:4242], [0], [dnl
> >  ct_dnat /* assuming no un-dnat entry, so no change */ /* default (use
> > --ct to customize) */;
> >  ])
> >
> > @@ -6710,8 +6689,7 @@ AT_CHECK([ovn-sbctl dump-flows | grep -E "ls_.*_acl"
> > | sed 's/table=../table=??/
> >  ])
> >
> >  dnl UDP traffic should be allowed.
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > udp,reg14=0x1,vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.42,nw_dst=42.42.42.43,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=42,tp_dst=84
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  output("lsp2");
> >  ])
> >
> > @@ -6730,8 +6708,7 @@ AT_CHECK([ovn-sbctl dump-flows | grep -E "ls_.*_acl"
> > | sed 's/table=../table=??/
> >  ])
> >
> >  dnl UDP traffic should be allowed.
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > udp,reg14=0x1,vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.42,nw_dst=42.42.42.43,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=42,tp_dst=84
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  output("lsp2");
> >  ])
> >
> > @@ -6750,8 +6727,7 @@ AT_CHECK([ovn-sbctl dump-flows | grep -E "ls_.*_acl"
> > | sed 's/table=../table=??/
> >  ])
> >
> >  dnl UDP traffic should be allowed.
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > udp,reg14=0x1,vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.42,nw_dst=42.42.42.43,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=42,tp_dst=84
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  output("lsp2");
> >  ])
> >
> > @@ -6777,8 +6753,7 @@ AT_CHECK([ovn-sbctl dump-flows | grep -E "ls_.*_acl"
> > | sed 's/table=../table=??/
> >  ])
> >
> >  dnl UDP traffic should be allowed.
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > udp,reg14=0x1,vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.42,nw_dst=42.42.42.43,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=42,tp_dst=84
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  output("lsp2");
> >  ])
> >
> > @@ -6800,8 +6775,7 @@ AT_CHECK([ovn-sbctl dump-flows | grep -E "ls_.*_acl"
> > | sed 's/table=../table=??/
> >  ])
> >
> >  dnl UDP traffic should be allowed.
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > udp,reg14=0x1,vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.42,nw_dst=42.42.42.43,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=42,tp_dst=84
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  output("lsp2");
> >  ])
> >
> > @@ -6823,8 +6797,7 @@ AT_CHECK([ovn-sbctl dump-flows | grep -E "ls_.*_acl"
> > | sed 's/table=../table=??/
> >  ])
> >
> >  dnl UDP traffic should be dropped.
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > udp,reg14=0x1,vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.42,nw_dst=42.42.42.43,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=42,tp_dst=84
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  ])
> >
> >  AS_BOX([from-lport ACL allow-related, default_acl_drop true])
> > @@ -6879,8 +6852,7 @@ AT_CHECK([ovn-sbctl dump-flows | grep -E "ls_.*_acl"
> > | sed 's/table=../table=??/
> >  ])
> >
> >  dnl UDP traffic should be dropped.
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > udp,reg14=0x1,vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.42,nw_dst=42.42.42.43,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=42,tp_dst=84
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  ct_next(ct_state=new|trk);
> >  ])
> >
> > @@ -6906,8 +6878,7 @@ AT_CHECK([ovn-sbctl dump-flows | grep -E "ls_.*_acl"
> > | sed 's/table=../table=??/
> >  ])
> >
> >  dnl UDP traffic should be allowed.
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > udp,reg14=0x1,vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.42,nw_dst=42.42.42.43,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=42,tp_dst=84
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  output("lsp2");
> >  ])
> >
> > @@ -6929,8 +6900,7 @@ AT_CHECK([ovn-sbctl dump-flows | grep -E "ls_.*_acl"
> > | sed 's/table=../table=??/
> >  ])
> >
> >  dnl UDP traffic should be allowed.
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > udp,reg14=0x1,vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.42,nw_dst=42.42.42.43,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=42,tp_dst=84
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  output("lsp2");
> >  ])
> >
> > @@ -6952,8 +6922,7 @@ AT_CHECK([ovn-sbctl dump-flows | grep -E "ls_.*_acl"
> > | sed 's/table=../table=??/
> >  ])
> >
> >  dnl UDP traffic should be dropped.
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > udp,reg14=0x1,vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.42,nw_dst=42.42.42.43,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=42,tp_dst=84
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  ])
> >
> >  AS_BOX([from-lport --apply-after-lb ACL allow-related, default_acl_drop
> > true])
> > @@ -7008,8 +6977,7 @@ AT_CHECK([ovn-sbctl dump-flows | grep -E "ls_.*_acl"
> > | sed 's/table=../table=??/
> >  ])
> >
> >  dnl UDP traffic should be dropped.
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > udp,reg14=0x1,vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.42,nw_dst=42.42.42.43,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=42,tp_dst=84
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  ct_next(ct_state=new|trk);
> >  ])
> >
> > @@ -7035,8 +7003,7 @@ AT_CHECK([ovn-sbctl dump-flows | grep -E "ls_.*_acl"
> > | sed 's/table=../table=??/
> >  ])
> >
> >  dnl UDP traffic should be allowed.
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > udp,reg14=0x1,vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.42,nw_dst=42.42.42.43,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=42,tp_dst=84
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  output("lsp2");
> >  ])
> >
> > @@ -7058,8 +7025,7 @@ AT_CHECK([ovn-sbctl dump-flows | grep -E "ls_.*_acl"
> > | sed 's/table=../table=??/
> >  ])
> >
> >  dnl UDP traffic should be allowed.
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > udp,reg14=0x1,vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.42,nw_dst=42.42.42.43,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=42,tp_dst=84
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  output("lsp2");
> >  ])
> >
> > @@ -7081,8 +7047,7 @@ AT_CHECK([ovn-sbctl dump-flows | grep -E "ls_.*_acl"
> > | sed 's/table=../table=??/
> >  ])
> >
> >  dnl UDP traffic should be dropped.
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > udp,reg14=0x1,vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.42,nw_dst=42.42.42.43,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=42,tp_dst=84
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  ])
> >
> >  AS_BOX([to-lport ACL allow-related, default_acl_drop true])
> > @@ -7137,8 +7102,7 @@ AT_CHECK([ovn-sbctl dump-flows | grep -E "ls_.*_acl"
> > | sed 's/table=../table=??/
> >  ])
> >
> >  dnl UDP traffic should be dropped.
> > -AT_CHECK_UNQUOTED([ovn-trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> > -#
> > udp,reg14=0x1,vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=42.42.42.42,nw_dst=42.42.42.43,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=42,tp_dst=84
> > +AT_CHECK_UNQUOTED([ovn_trace --ct new --ct new --minimal ls "${flow}"],
> > [0], [dnl
> >  ct_next(ct_state=new|trk);
> >  ])
> >
> > diff --git a/tests/ovn.at b/tests/ovn.at
> > index 3ba6ced4e..54629acd3 100644
> > --- a/tests/ovn.at
> > +++ b/tests/ovn.at
> > @@ -2701,8 +2701,7 @@ test_packet() {
> >          echo "output(\"lp$outport\");"
> >      done > expout
> >
> > -    AT_CAPTURE_FILE([trace])
> > -    AT_CHECK([ovs-appctl -t ovn-trace trace --all lsw0 "$uflow" | tee
> > trace | sed '1,/Minimal trace/d'], [0], [expout])
> > +    AT_CHECK([ovn_trace_client ovn-trace --minimal lsw0 "$uflow"], [0],
> > [expout])
> >  }
> >
> >  # test_arp INPORT SHA SPA TPA [REPLY_HA]
> > @@ -2745,8 +2744,7 @@ output(\"lp$inport\");
> >  "
> >      fi
> >
> > -    AT_CAPTURE_FILE([trace])
> > -    AT_CHECK_UNQUOTED([ovs-appctl -t ovn-trace trace --all lsw0
> > "$request" | tee trace | sed '1,/Minimal trace/d'], [0], [$reply])
> > +    AT_CHECK_UNQUOTED([ovn_trace_client ovn-trace --minimal lsw0
> > "$request"], [0], [$reply])
> >  }
> >
> >  # Send packets between all pairs of source and destination ports:
> > @@ -2997,8 +2995,7 @@ test_packet() {
> >      if test $lout != drop; then
> >          echo "output(\"$lout\");"
> >      fi > expout
> > -    AT_CAPTURE_FILE([trace])
> > -    AT_CHECK([ovn-trace --all $(lsp_to_ls lp$inport) "$uflow" | tee trace
> > | sed '1,/Minimal trace/d'], [0], [expout])
> > +    AT_CHECK([ovn_trace --minimal $(lsp_to_ls lp$inport) "$uflow"], [0],
> > [expout])
> >
> >      # Then actually send a packet, for an end-to-end test.
> >      local packet=$(echo $dst$src | sed 's/://g')${eth}
> > @@ -3169,8 +3166,7 @@ test_packet() {
> >
> >      # First try tracing the packet.
> >      uflow="inport==\"lp-$inport\" && eth.dst==$dst && eth.src==$src &&
> > eth.type==0x$eth"
> > -    AT_CAPTURE_FILE([trace])
> > -    AT_CHECK([ovn-trace --all ls-${hv}0 "$uflow" | tee trace | sed
> > '1,/Minimal trace/d'], [0], [expout])
> > +    AT_CHECK([ovn_trace --minimal ls-${hv}0 "$uflow"], [0], [expout])
> >
> >      # Then actually send a packet, for an end-to-end test.
> >      local packet=$(echo $dst$src | sed 's/://g')${eth}
> > @@ -3302,8 +3298,7 @@ test_packet() {
> >
> >      # First try tracing the packet.
> >      uflow="inport==\"lp-$inport\" && eth.dst==$dst && eth.src==$src &&
> > eth.type==0x$eth"
> > -    AT_CAPTURE_FILE([trace])
> > -    AT_CHECK([ovn-trace --all ls-${hv}0 "$uflow" | tee trace | sed
> > '1,/Minimal trace/d' | sort], [0], [expout])
> > +    AT_CHECK([ovn_trace --minimal ls-${hv}0 "$uflow" | sort], [0],
> > [expout])
> >
> >      # Then actually send a packet, for an end-to-end test.
> >      local packet=$(echo $dst$src | sed 's/://g')${eth}
> > @@ -3432,8 +3427,7 @@ test_packet() {
> >
> >      # First try tracing the packet.
> >      uflow="inport==\"lp-$inport\" && eth.dst==$dst && eth.src==$src &&
> > eth.type==0x$eth"
> > -    AT_CAPTURE_FILE([trace])
> > -    AT_CHECK([ovn-trace --all ls-$inport "$uflow" | tee trace | sed
> > '1,/Minimal trace/d'], [0], [expout])
> > +    AT_CHECK([ovn_trace --minimal ls-$inport "$uflow"], [0], [expout])
> >
> >      # Then actually send a packet, for an end-to-end test.
> >      local packet=$(echo $dst$src | sed 's/://g')${eth}
> > @@ -3657,8 +3651,7 @@ test_packet() {
> >      # First try tracing the packet.
> >      uflow="inport==\"lsp$inport\" && eth.dst==$dst && eth.src==$src &&
> > eth.type==0x$eth && vlan.present==1"
> >      echo "output(\"$lout\");" > expout
> > -    AT_CAPTURE_FILE([trace])
> > -    AT_CHECK([ovn-trace --all ls "$uflow" | tee trace | sed '1,/Minimal
> > trace/d'], [0], [expout])
> > +    AT_CHECK([ovn_trace --minimal ls "$uflow"], [0], [expout])
> >
> >      # Then actually send a packet, for an end-to-end test.
> >      local packet=$(echo $dst$src | sed 's/://g')${eth}fefefefe
> > @@ -3738,8 +3731,7 @@ test_packet() {
> >      # First try tracing the packet.
> >      uflow="inport==\"lsp$inport\" && eth.dst==$dst && eth.src==$src &&
> > eth.type==0x$eth && vlan.present==1"
> >      echo "output(\"$lout\");" > expout
> > -    AT_CAPTURE_FILE([trace])
> > -    AT_CHECK([ovn-trace --all ls "$uflow" | tee trace | sed '1,/Minimal
> > trace/d'], [0], [expout])
> > +    AT_CHECK([ovn_trace --minimal ls "$uflow"], [0], [expout])
> >
> >      # Then actually send a packet, for an end-to-end test.
> >      payload=fefefefe
> > @@ -3816,8 +3808,7 @@ test_packet() {
> >      # First try tracing the packet.
> >      uflow="inport==\"lsp$inport\" && eth.dst==$dst && eth.src==$src &&
> > eth.type==0x$eth && vlan.present==1"
> >      echo "output(\"$lout\");" > expout
> > -    AT_CAPTURE_FILE([trace])
> > -    AT_CHECK([ovn-trace --all ls "$uflow" | tee trace | sed '1,/Minimal
> > trace/d'], [0], [expout])
> > +    AT_CHECK([ovn_trace --minimal ls "$uflow"], [0], [expout])
> >
> >      # Then actually send a packet, for an end-to-end test.
> >      local packet=$(echo $dst$src | sed 's/://g')${eth}fefefefe
> > @@ -3867,8 +3858,7 @@ test_packet() {
> >      # First try tracing the packet.
> >      uflow="inport==\"lsp$inport\" && eth.dst==$dst && eth.src==$src &&
> > eth.type==0x$eth && vlan.present==1"
> >      echo "output(\"$lout\");" > expout
> > -    AT_CAPTURE_FILE([trace])
> > -    AT_CHECK([ovn-trace --all ls "$uflow" | tee trace | sed '1,/Minimal
> > trace/d'], [0], [expout])
> > +    AT_CHECK([ovn_trace --minimal ls "$uflow"], [0], [expout])
> >
> >      # Then actually send a packet, for an end-to-end test.
> >      local packet=$(echo $dst$src | sed 's/://g')${eth}fefefefe
> > @@ -3917,7 +3907,7 @@ test_packet() {
> >
> >      # First try tracing the packet.
> >      uflow="inport==\"lsp$inport\" && eth.dst==$dst && eth.src==$src &&
> > eth.type==0x$eth && vlan.present==1"
> > -    AT_CHECK([ovn-trace --all ls "$uflow" | grep drop], [0], [ignore])
> > +    AT_CHECK([ovn_trace ls "$uflow" | grep -q drop], [0])
> >
> >      # Then actually send a packet, for an end-to-end test.
> >      local packet=$(echo $dst$src | sed 's/://g')${eth}fefefefe
> > @@ -4051,8 +4041,7 @@ test_packet() {
> >      # First try tracing the packet.
> >      uflow="inport==\"lp-$inport\" && eth.dst==$dst && eth.src==$src &&
> > eth.type==0x$eth"
> >      echo "output(\"$lout\");" > expout
> > -    AT_CAPTURE_FILE([trace])
> > -    AT_CHECK([ovn-trace --all ls1 "$uflow" | tee trace | sed '1,/Minimal
> > trace/d'], [0], [expout])
> > +    AT_CHECK([ovn_trace --minimal ls1 "$uflow"], [0], [expout])
> >
> >      # Then actually send a packet, for an end-to-end test.
> >      local packet=$(echo $dst$src | sed 's/://g')${eth}
> > @@ -9387,7 +9376,7 @@ as hv ovs-appctl -t ovn-controller inject-pkt
> > "$packet"
> >
> >  OVS_WAIT_UNTIL([ test 8 = $(grep -c 'acl_log' hv/ovn-controller.log) ])
> >
> > -AT_CHECK([grep 'acl_log' hv/ovn-controller.log | sed 's/.*name=/name=/'],
> > [0], [dnl
> > +AT_CHECK([grep 'acl_log' hv/ovn-controller.log | sed 's/.*name=/name=/' |
> > strip_nw_frag], [0], [dnl
> >  name="drop-flow", verdict=drop, severity=alert, direction=from-lport:
> > tcp,vlan_tci=0x0000,dl_src=f0:00:00:00:00:01,dl_dst=f0:00:00:00:00:02,nw_src=192.168.1.2,nw_dst=192.168.1.3,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=4361,tp_dst=81,tcp_flags=syn
> >  name="drop-flow", verdict=drop, severity=alert, direction=to-lport:
> > tcp,vlan_tci=0x0000,dl_src=f0:00:00:00:00:01,dl_dst=f0:00:00:00:00:02,nw_src=192.168.1.2,nw_dst=192.168.1.3,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=4361,tp_dst=181,tcp_flags=syn
> >  name="allow-flow", verdict=allow, severity=info, direction=from-lport:
> > tcp,vlan_tci=0x0000,dl_src=f0:00:00:00:00:01,dl_dst=f0:00:00:00:00:02,nw_src=192.168.1.2,nw_dst=192.168.1.3,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=4363,tp_dst=83,tcp_flags=syn
> > @@ -9575,11 +9564,6 @@ check ovs-vsctl add-port br-int vif1 -- set
> > Interface vif1 external-ids:iface-id
> >  check ovs-vsctl add-port br-int vif2 -- set Interface vif2
> > external-ids:iface-id=lp2 options:tx_pcap=vif2-tx.pcap
> > options:rxq_pcap=vif2-rx.pcap ofport-request=2
> >  wait_for_ports_up lp1 lp2
> >
> > -AT_CAPTURE_FILE([trace])
> > -ovn_trace () {
> > -    ovn-trace --all "$@" | tee trace | sed '1,/Minimal trace/d'
> > -}
> > -
> >  # Extracts nw_tos from the final flow from ofproto/trace output and prints
> >  # it on stdout.  Prints "none" if no nw_tos was included.
> >  get_final_nw_tos() {
> > @@ -9603,7 +9587,7 @@ check_tos() {
> >      echo "checking for tos $1"
> >      (if test $1 != 0; then echo "ip.dscp = $1;"; fi;
> >       echo 'output("lp2");') > expout
> > -    AT_CHECK_UNQUOTED([ovn_trace lsw0 'inport == "lp1" && eth.src ==
> > f0:00:00:00:00:01 && eth.dst == f0:00:00:00:00:02 && ip4.src == 1.1.1.1 &&
> > ip4.dst == 1.1.1.2'], [0], [expout])
> > +    AT_CHECK_UNQUOTED([ovn_trace --minimal lsw0 'inport == "lp1" &&
> > eth.src == f0:00:00:00:00:01 && eth.dst == f0:00:00:00:00:02 && ip4.src ==
> > 1.1.1.1 && ip4.dst == 1.1.1.2'], [0], [expout])
> >
> >      # Then re-check with ofproto/trace for a physical packet.
> >      AT_CHECK([ovs-appctl ofproto/trace br-int
> > 'in_port=1,dl_src=f0:00:00:00:00:01,dl_dst=f0:00:00:00:00:02,dl_type=0x800,nw_src=1.1.1.1,nw_dst=1.1.1.2'],
> > [0], [stdout-nolog])
> > @@ -9612,7 +9596,7 @@ check_tos() {
> >  }
> >
> >  # check at L2
> > -AT_CHECK([ovn_trace lsw0 'inport == "lp1" && eth.src == f0:00:00:00:00:01
> > && eth.dst == f0:00:00:00:00:02'], [0], [output("lp2");
> > +AT_CHECK([ovn_trace --minimal lsw0 'inport == "lp1" && eth.src ==
> > f0:00:00:00:00:01 && eth.dst == f0:00:00:00:00:02'], [0], [output("lp2");
> >  ])
> >  AT_CHECK([ovs-appctl ofproto/trace br-int
> > 'in_port=1,dl_src=f0:00:00:00:00:01,dl_dst=f0:00:00:00:00:02'], [0],
> > [stdout-nolog])
> >  AT_CHECK([get_final_nw_tos], [0], [none
> > @@ -11648,16 +11632,11 @@ echo $expected >> hv3-vif1.expected
> >  OVN_CHECK_PACKETS_UNIQ([hv3/vif1-tx.pcap], [hv3-vif1.expected])
> >
> >  #Check ovn-trace over "chassisredirect" port
> > -AT_CAPTURE_FILE([trace])
> > -ovn_trace () {
> > -    ovn-trace --all "$@" | tee trace | sed '1,/Minimal trace/d'
> > -}
> > -
> >  echo 'ip.ttl--;' > expout
> >  echo 'eth.src = 00:00:02:01:02:03;' >> expout
> >  echo 'eth.dst = f0:00:00:01:02:04;' >> expout
> >  echo 'output("ln-alice");' >> expout
> > -AT_CHECK_UNQUOTED([ovn_trace foo 'inport == "foo1" && eth.src ==
> > f0:00:00:01:02:03 && eth.dst == 00:00:01:01:02:03 && ip4.src == 192.168.1.2
> > && ip4.dst == 172.16.1.3 && ip.ttl == 0xff'], [0], [expout])
> > +AT_CHECK_UNQUOTED([ovn_trace --minimal foo 'inport == "foo1" && eth.src
> > == f0:00:00:01:02:03 && eth.dst == 00:00:01:01:02:03 && ip4.src ==
> > 192.168.1.2 && ip4.dst == 172.16.1.3 && ip.ttl == 0xff'], [0], [expout])
> >
> >  # Create logical port alice1 in alice on hv1
> >  as hv1 ovs-vsctl -- add-port br-int hv1-vif2 -- \
> > @@ -12601,8 +12580,7 @@ test_packet() {
> >      if test $lout != drop; then
> >          echo "output(\"$lout\");"
> >      fi > expout
> > -    AT_CAPTURE_FILE([trace])
> > -    AT_CHECK([ovn-trace --all ls1 "$uflow" | tee trace | sed '1,/Minimal
> > trace/d'], [0], [expout])
> > +    AT_CHECK([ovn_trace --minimal ls1 "$uflow"], [0], [expout])
> >
> >      # Then actually send a packet, for an end-to-end test.
> >      local packet=$(echo $dst$src | sed 's/://g')${eth}
> > @@ -20758,7 +20736,7 @@ AT_CHECK_UNQUOTED([ovn-sbctl get controller_event
> > $uuid event_info:load_balancer
> >  "$uuid_lb2"
> >  ])
> >
> > -AT_CHECK_UNQUOTED([ovn-trace sw0 'inport == "sw0-p11" && eth.src ==
> > 00:00:00:00:00:11 && ip4.dst == 192.168.1.100 && tcp && tcp.dst == 80' |
> > grep -q 'event = "empty_lb_backends"'], [0])
> > +AT_CHECK_UNQUOTED([ovn_trace sw0 'inport == "sw0-p11" && eth.src ==
> > 00:00:00:00:00:11 && ip4.dst == 192.168.1.100 && tcp && tcp.dst == 80' |
> > grep -q 'event = "empty_lb_backends"'], [0])
> >
> >  OVN_CLEANUP([hv1], [hv2])
> >  AT_CLEANUP
> > @@ -24247,7 +24225,7 @@ wait_for_ports_up
> >  check ovn-nbctl --wait=hv sync
> >
> >  # Trace with --ovs should see ovs flow related to the ACL
> > -AT_CHECK([ovn-trace --ovs lsw0 'inport == "lp1" && eth.type == 0x1234' |
> > grep "dl_type=0x1234" | grep "cookie"], [0], [ignore])
> > +AT_CHECK([ovn_trace --ovs lsw0 'inport == "lp1" && eth.type == 0x1234' |
> > grep "dl_type=0x1234" | grep "cookie"], [0], [ignore])
> >
> >  # Replace the ACL with same match but different action.
> >  ovn-nbctl acl-del lsw0 -- \
> > @@ -24257,7 +24235,7 @@ check ovn-nbctl --wait=hv sync
> >
> >  # Trace with --ovs should still see the ovs flow related to the ACL, which
> >  # means the OVS flow is updated with new cookie corresponding to the new
> > lflow.
> > -AT_CHECK([ovn-trace --ovs lsw0 'inport == "lp1" && eth.type == 0x1234' |
> > grep "dl_type=0x1234 actions="], [0], [ignore])
> > +AT_CHECK([ovn_trace --ovs lsw0 'inport == "lp1" && eth.type == 0x1234' |
> > grep "dl_type=0x1234 actions="], [0], [ignore])
> >
> >  OVN_CLEANUP([hv1])
> >  AT_CLEANUP
> > @@ -24420,7 +24398,7 @@ for s_az in $(seq 1 $n_az); do
> >                      ip4 && ip.ttl==64 && ip4.src==$lsp_sip &&
> > ip4.dst==$lsp_dip &&
> >                      udp && udp.src==53 && udp.dst==4369"
> >              echo "sending: $packet"
> > -            AT_CHECK([ovn-trace --ovs "$packet" >
> > ${s_az}-${d_az}-$i.ovn-trace])
> > +            AT_CHECK([ovn_trace --ovs "$packet" >
> > ${s_az}-${d_az}-$i.ovn-trace])
> >              AT_CHECK([ovs-appctl -t ovn-controller inject-pkt "$packet"])
> >              ovs_inport=$(ovs-vsctl --bare --columns=ofport find Interface
> > external-ids:iface-id="$ovn_inport")
> >
> > --
> > 2.31.1
> >
> >
> > _______________________________________________
> > dev mailing list
> > [email protected]
> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> >
> >
> Hi Dumitru,
>
> looks good to me.
>
> Acked-by: Ales Musil <[email protected]>

Oops.  Sorry. I just applied the patch and missed your Acked-by.

Thanks for the patch Dumitru.

Numan

>
> Regards,
> Ales
>
> --
>
> Ales Musil
>
> Senior Software Engineer - OVN Core
>
> Red Hat EMEA <https://www.redhat.com>
>
> [email protected]    IM: amusil
> <https://red.ht/sig>
> _______________________________________________
> dev mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to