Blame 0002-lflow-Use-learn-action-to-generate-LB-hairpin-reply-.patch

Numan Siddique e9af135
From 0ea619c80146bffd4fef7ac1a8a2aa07f9003eb0 Mon Sep 17 00:00:00 2001
Numan Siddique e9af135
From: Dumitru Ceara <dceara@redhat.com>
Numan Siddique e9af135
Date: Fri, 5 Feb 2021 23:29:29 +0100
Numan Siddique e9af135
Subject: [PATCH 2/2] lflow: Use learn() action to generate LB hairpin reply
Numan Siddique e9af135
 flows.
Numan Siddique e9af135
Numan Siddique e9af135
The main trait of load balancer hairpin traffic is that it never leaves
Numan Siddique e9af135
the local hypervisor.  Essentially this means that only hairpin
Numan Siddique e9af135
openflows installed for logical switches that have at least one logical
Numan Siddique e9af135
switch port bound locally can ever be hit.
Numan Siddique e9af135
Numan Siddique e9af135
Until now, if a load balancer was applied on multiple logical switches
Numan Siddique e9af135
that are connected through a distributed router, ovn-controller would
Numan Siddique e9af135
install flows to detect hairpin replies for all logical switches. In
Numan Siddique e9af135
practice this leads to a very high number of openflows out of which
Numan Siddique e9af135
most will never be used.
Numan Siddique e9af135
Numan Siddique e9af135
Instead we now use an additional action, learn(), on flows that match on
Numan Siddique e9af135
packets that create the hairpin session.  The learn() action will then
Numan Siddique e9af135
generate the necessary flows to handle hairpin replies, but only for
Numan Siddique e9af135
the local datapaths which actually generate hairpin traffic.
Numan Siddique e9af135
Numan Siddique e9af135
For example, simulating how ovn-k8s uses load balancer for services,
Numan Siddique e9af135
in a "switch per node" scenario, the script below would generate
Numan Siddique e9af135
10K (n_nodes * n_vips * n_backends) openflows on every node in table=69
Numan Siddique e9af135
(hairpin reply).  With this patch the maximum number of openflows that
Numan Siddique e9af135
can be created for hairpin replies is 200 (n_vips * n_backends).
Numan Siddique e9af135
Numan Siddique e9af135
In general, for deployments that leverage switch-per-node topologies,
Numan Siddique e9af135
the number of openflows is reduced by a factor of N, where N is the
Numan Siddique e9af135
number of nodes.
Numan Siddique e9af135
Numan Siddique e9af135
  $ cat lbs.sh
Numan Siddique e9af135
  NODES=50
Numan Siddique e9af135
  VIPS=20
Numan Siddique e9af135
  BACKENDS=10
Numan Siddique e9af135
  ovn-nbctl lr-add rtr
Numan Siddique e9af135
  for ((i = 1; i <= $NODES; i++)); do
Numan Siddique e9af135
      ovn-nbctl \
Numan Siddique e9af135
          -- ls-add ls$i \
Numan Siddique e9af135
          -- lsp-add ls$i vm$i \
Numan Siddique e9af135
          -- lsp-add ls$i ls$i-rtr \
Numan Siddique e9af135
          -- lsp-set-type ls$i-rtr router \
Numan Siddique e9af135
          -- lsp-set-options ls$i-rtr router-port=rtr-ls$i \
Numan Siddique e9af135
          -- lrp-add rtr rtr-ls$i 00:00:00:00:01:00 42.42.42.$i/24
Numan Siddique e9af135
  done
Numan Siddique e9af135
Numan Siddique e9af135
  for ((i = 1; i <= $VIPS; i++)); do
Numan Siddique e9af135
      lb=lb$i
Numan Siddique e9af135
      vip=10.10.10.$i:1
Numan Siddique e9af135
      bip=20.20.20.1:2
Numan Siddique e9af135
      for ((j = 2; j <= $BACKENDS; j++)); do
Numan Siddique e9af135
          bip="$bip,20.20.20.$j:2"
Numan Siddique e9af135
      done
Numan Siddique e9af135
      ovn-nbctl lb-add $lb $vip $backends
Numan Siddique e9af135
  done
Numan Siddique e9af135
Numan Siddique e9af135
  for ((i = 1; i <= $NODES; i++)); do
Numan Siddique e9af135
      for ((j = 1; j <= $VIPS; j++)); do
Numan Siddique e9af135
          ovn-nbctl ls-lb-add ls$i lb$j
Numan Siddique e9af135
      done
Numan Siddique e9af135
  done
Numan Siddique e9af135
Numan Siddique e9af135
  ovs-vsctl add-port br-int vm1 \
Numan Siddique e9af135
      -- set interface vm1 type=internal \
Numan Siddique e9af135
      -- set interface vm1 external-ids:iface-id=vm1
Numan Siddique e9af135
Numan Siddique e9af135
Suggested-by: Ilya Maximets <i.maximets@ovn.org>
Numan Siddique e9af135
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
Numan Siddique e9af135
Signed-off-by: Numan Siddique <numans@ovn.org>
Numan Siddique e9af135
(cherry picked from upstream commit 022ea339c8e22824ba6f6f1257da0d1b6c66d401)
Numan Siddique e9af135
Numan Siddique e9af135
Change-Id: Ic0c20047538d6881e8cb79e00c96da8afde67a72
Numan Siddique e9af135
---
Numan Siddique e9af135
 controller/lflow.c      | 204 ++++++++++++++++---
Numan Siddique e9af135
 tests/ofproto-macros.at |   5 +-
Numan Siddique e9af135
 tests/ovn.at            | 516 +++++++++++++++++++++++++-----------------------
Numan Siddique e9af135
 3 files changed, 455 insertions(+), 270 deletions(-)
Numan Siddique e9af135
Numan Siddique e9af135
diff --git a/controller/lflow.c b/controller/lflow.c
Numan Siddique e9af135
index 946c1e0..2b7d356 100644
Numan Siddique e9af135
--- a/controller/lflow.c
Numan Siddique e9af135
+++ b/controller/lflow.c
Numan Siddique e9af135
@@ -1171,6 +1171,178 @@ add_neighbor_flows(struct ovsdb_idl_index *sbrec_port_binding_by_name,
Numan Siddique e9af135
     }
Numan Siddique e9af135
 }
Numan Siddique e9af135
 
Numan Siddique e9af135
+/* Builds the "learn()" action to be triggered by packets initiating a
Numan Siddique e9af135
+ * hairpin session.
Numan Siddique e9af135
+ *
Numan Siddique e9af135
+ * This will generate flows in table OFTABLE_CHK_LB_HAIRPIN_REPLY of the form:
Numan Siddique e9af135
+ * - match:
Numan Siddique e9af135
+ *     metadata=<orig-pkt-metadata>,ip/ipv6,ip.src=<backend>,ip.dst=<vip>
Numan Siddique e9af135
+ *     nw_proto='lb_proto',tp_src_port=<backend-port>
Numan Siddique e9af135
+ * - action:
Numan Siddique e9af135
+ *     set MLF_LOOKUP_LB_HAIRPIN_BIT=1
Numan Siddique e9af135
+ */
Numan Siddique e9af135
+static void
Numan Siddique e9af135
+add_lb_vip_hairpin_reply_action(struct in6_addr *vip6, ovs_be32 vip,
Numan Siddique e9af135
+                                uint8_t lb_proto, bool has_l4_port,
Numan Siddique e9af135
+                                uint64_t cookie, struct ofpbuf *ofpacts)
Numan Siddique e9af135
+{
Numan Siddique e9af135
+    struct match match = MATCH_CATCHALL_INITIALIZER;
Numan Siddique e9af135
+    struct ofpact_learn *ol = ofpact_put_LEARN(ofpacts);
Numan Siddique e9af135
+    struct ofpact_learn_spec *ol_spec;
Numan Siddique e9af135
+    unsigned int imm_bytes;
Numan Siddique e9af135
+    uint8_t *src_imm;
Numan Siddique e9af135
+
Numan Siddique e9af135
+    /* Once learned, hairpin reply flows are permanent until the VIP/backend
Numan Siddique e9af135
+     * is removed.
Numan Siddique e9af135
+     */
Numan Siddique e9af135
+    ol->flags = NX_LEARN_F_DELETE_LEARNED;
Numan Siddique e9af135
+    ol->idle_timeout = OFP_FLOW_PERMANENT;
Numan Siddique e9af135
+    ol->hard_timeout = OFP_FLOW_PERMANENT;
Numan Siddique e9af135
+    ol->priority = OFP_DEFAULT_PRIORITY;
Numan Siddique e9af135
+    ol->table_id = OFTABLE_CHK_LB_HAIRPIN_REPLY;
Numan Siddique e9af135
+    ol->cookie = htonll(cookie);
Numan Siddique e9af135
+
Numan Siddique e9af135
+    /* Match on metadata of the packet that created the hairpin session. */
Numan Siddique e9af135
+    ol_spec = ofpbuf_put_zeros(ofpacts, sizeof *ol_spec);
Numan Siddique e9af135
+
Numan Siddique e9af135
+    ol_spec->dst.field = mf_from_id(MFF_METADATA);
Numan Siddique e9af135
+    ol_spec->dst.ofs = 0;
Numan Siddique e9af135
+    ol_spec->dst.n_bits = ol_spec->dst.field->n_bits;
Numan Siddique e9af135
+    ol_spec->n_bits = ol_spec->dst.n_bits;
Numan Siddique e9af135
+    ol_spec->dst_type = NX_LEARN_DST_MATCH;
Numan Siddique e9af135
+    ol_spec->src_type = NX_LEARN_SRC_FIELD;
Numan Siddique e9af135
+    ol_spec->src.field = mf_from_id(MFF_METADATA);
Numan Siddique e9af135
+
Numan Siddique e9af135
+    /* Match on the same ETH type as the packet that created the hairpin
Numan Siddique e9af135
+     * session.
Numan Siddique e9af135
+     */
Numan Siddique e9af135
+    ol_spec = ofpbuf_put_zeros(ofpacts, sizeof *ol_spec);
Numan Siddique e9af135
+    ol_spec->dst.field = mf_from_id(MFF_ETH_TYPE);
Numan Siddique e9af135
+    ol_spec->dst.ofs = 0;
Numan Siddique e9af135
+    ol_spec->dst.n_bits = ol_spec->dst.field->n_bits;
Numan Siddique e9af135
+    ol_spec->n_bits = ol_spec->dst.n_bits;
Numan Siddique e9af135
+    ol_spec->dst_type = NX_LEARN_DST_MATCH;
Numan Siddique e9af135
+    ol_spec->src_type = NX_LEARN_SRC_IMMEDIATE;
Numan Siddique e9af135
+    union mf_value imm_eth_type = {
Numan Siddique e9af135
+        .be16 = !vip6 ? htons(ETH_TYPE_IP) : htons(ETH_TYPE_IPV6)
Numan Siddique e9af135
+    };
Numan Siddique e9af135
+    mf_write_subfield_value(&ol_spec->dst, &imm_eth_type, &match);
Numan Siddique e9af135
+
Numan Siddique e9af135
+    /* Push value last, as this may reallocate 'ol_spec'. */
Numan Siddique e9af135
+    imm_bytes = DIV_ROUND_UP(ol_spec->dst.n_bits, 8);
Numan Siddique e9af135
+    src_imm = ofpbuf_put_zeros(ofpacts, OFPACT_ALIGN(imm_bytes));
Numan Siddique e9af135
+    memcpy(src_imm, &imm_eth_type, imm_bytes);
Numan Siddique e9af135
+
Numan Siddique e9af135
+    /* Hairpin replies have ip.src == <backend-ip>. */
Numan Siddique e9af135
+    ol_spec = ofpbuf_put_zeros(ofpacts, sizeof *ol_spec);
Numan Siddique e9af135
+    if (!vip6) {
Numan Siddique e9af135
+        ol_spec->dst.field = mf_from_id(MFF_IPV4_SRC);
Numan Siddique e9af135
+        ol_spec->src.field = mf_from_id(MFF_IPV4_SRC);
Numan Siddique e9af135
+    } else {
Numan Siddique e9af135
+        ol_spec->dst.field = mf_from_id(MFF_IPV6_SRC);
Numan Siddique e9af135
+        ol_spec->src.field = mf_from_id(MFF_IPV6_SRC);
Numan Siddique e9af135
+    }
Numan Siddique e9af135
+    ol_spec->dst.ofs = 0;
Numan Siddique e9af135
+    ol_spec->dst.n_bits = ol_spec->dst.field->n_bits;
Numan Siddique e9af135
+    ol_spec->n_bits = ol_spec->dst.n_bits;
Numan Siddique e9af135
+    ol_spec->dst_type = NX_LEARN_DST_MATCH;
Numan Siddique e9af135
+    ol_spec->src_type = NX_LEARN_SRC_FIELD;
Numan Siddique e9af135
+
Numan Siddique e9af135
+    /* Hairpin replies have ip.dst == <vip>. */
Numan Siddique e9af135
+    union mf_value imm_ip;
Numan Siddique e9af135
+    ol_spec = ofpbuf_put_zeros(ofpacts, sizeof *ol_spec);
Numan Siddique e9af135
+    if (!vip6) {
Numan Siddique e9af135
+        ol_spec->dst.field = mf_from_id(MFF_IPV4_DST);
Numan Siddique e9af135
+        imm_ip = (union mf_value) {
Numan Siddique e9af135
+            .be32 = vip
Numan Siddique e9af135
+        };
Numan Siddique e9af135
+    } else {
Numan Siddique e9af135
+        ol_spec->dst.field = mf_from_id(MFF_IPV6_DST);
Numan Siddique e9af135
+        imm_ip = (union mf_value) {
Numan Siddique e9af135
+            .ipv6 = *vip6
Numan Siddique e9af135
+        };
Numan Siddique e9af135
+    }
Numan Siddique e9af135
+    ol_spec->dst.ofs = 0;
Numan Siddique e9af135
+    ol_spec->dst.n_bits = ol_spec->dst.field->n_bits;
Numan Siddique e9af135
+    ol_spec->n_bits = ol_spec->dst.n_bits;
Numan Siddique e9af135
+    ol_spec->dst_type = NX_LEARN_DST_MATCH;
Numan Siddique e9af135
+    ol_spec->src_type = NX_LEARN_SRC_IMMEDIATE;
Numan Siddique e9af135
+    mf_write_subfield_value(&ol_spec->dst, &imm_ip, &match);
Numan Siddique e9af135
+
Numan Siddique e9af135
+    /* Push value last, as this may reallocate 'ol_spec' */
Numan Siddique e9af135
+    imm_bytes = DIV_ROUND_UP(ol_spec->dst.n_bits, 8);
Numan Siddique e9af135
+    src_imm = ofpbuf_put_zeros(ofpacts, OFPACT_ALIGN(imm_bytes));
Numan Siddique e9af135
+    memcpy(src_imm, &imm_ip, imm_bytes);
Numan Siddique e9af135
+
Numan Siddique e9af135
+    /* Hairpin replies have the same nw_proto as packets that created the
Numan Siddique e9af135
+     * session.
Numan Siddique e9af135
+     */
Numan Siddique e9af135
+    union mf_value imm_proto = {
Numan Siddique e9af135
+        .u8 = lb_proto,
Numan Siddique e9af135
+    };
Numan Siddique e9af135
+    ol_spec = ofpbuf_put_zeros(ofpacts, sizeof *ol_spec);
Numan Siddique e9af135
+    ol_spec->dst.field = mf_from_id(MFF_IP_PROTO);
Numan Siddique e9af135
+    ol_spec->src.field = mf_from_id(MFF_IP_PROTO);
Numan Siddique e9af135
+    ol_spec->dst.ofs = 0;
Numan Siddique e9af135
+    ol_spec->dst.n_bits = ol_spec->dst.field->n_bits;
Numan Siddique e9af135
+    ol_spec->n_bits = ol_spec->dst.n_bits;
Numan Siddique e9af135
+    ol_spec->dst_type = NX_LEARN_DST_MATCH;
Numan Siddique e9af135
+    ol_spec->src_type = NX_LEARN_SRC_IMMEDIATE;
Numan Siddique e9af135
+    mf_write_subfield_value(&ol_spec->dst, &imm_proto, &match);
Numan Siddique e9af135
+
Numan Siddique e9af135
+    /* Push value last, as this may reallocate 'ol_spec' */
Numan Siddique e9af135
+    imm_bytes = DIV_ROUND_UP(ol_spec->dst.n_bits, 8);
Numan Siddique e9af135
+    src_imm = ofpbuf_put_zeros(ofpacts, OFPACT_ALIGN(imm_bytes));
Numan Siddique e9af135
+    memcpy(src_imm, &imm_proto, imm_bytes);
Numan Siddique e9af135
+
Numan Siddique e9af135
+    /* Hairpin replies have source port == <backend-port>. */
Numan Siddique e9af135
+    if (has_l4_port) {
Numan Siddique e9af135
+        ol_spec = ofpbuf_put_zeros(ofpacts, sizeof *ol_spec);
Numan Siddique e9af135
+        switch (lb_proto) {
Numan Siddique e9af135
+        case IPPROTO_TCP:
Numan Siddique e9af135
+            ol_spec->dst.field = mf_from_id(MFF_TCP_SRC);
Numan Siddique e9af135
+            ol_spec->src.field = mf_from_id(MFF_TCP_DST);
Numan Siddique e9af135
+            break;
Numan Siddique e9af135
+        case IPPROTO_UDP:
Numan Siddique e9af135
+            ol_spec->dst.field = mf_from_id(MFF_UDP_SRC);
Numan Siddique e9af135
+            ol_spec->src.field = mf_from_id(MFF_UDP_DST);
Numan Siddique e9af135
+            break;
Numan Siddique e9af135
+        case IPPROTO_SCTP:
Numan Siddique e9af135
+            ol_spec->dst.field = mf_from_id(MFF_SCTP_SRC);
Numan Siddique e9af135
+            ol_spec->src.field = mf_from_id(MFF_SCTP_DST);
Numan Siddique e9af135
+            break;
Numan Siddique e9af135
+        default:
Numan Siddique e9af135
+            OVS_NOT_REACHED();
Numan Siddique e9af135
+            break;
Numan Siddique e9af135
+        }
Numan Siddique e9af135
+        ol_spec->dst.ofs = 0;
Numan Siddique e9af135
+        ol_spec->dst.n_bits = ol_spec->dst.field->n_bits;
Numan Siddique e9af135
+        ol_spec->n_bits = ol_spec->dst.n_bits;
Numan Siddique e9af135
+        ol_spec->dst_type = NX_LEARN_DST_MATCH;
Numan Siddique e9af135
+        ol_spec->src_type = NX_LEARN_SRC_FIELD;
Numan Siddique e9af135
+    }
Numan Siddique e9af135
+
Numan Siddique e9af135
+    /* Set MLF_LOOKUP_LB_HAIRPIN_BIT for hairpin replies. */
Numan Siddique e9af135
+    ol_spec = ofpbuf_put_zeros(ofpacts, sizeof *ol_spec);
Numan Siddique e9af135
+    ol_spec->dst.field = mf_from_id(MFF_LOG_FLAGS);
Numan Siddique e9af135
+    ol_spec->dst.ofs = MLF_LOOKUP_LB_HAIRPIN_BIT;
Numan Siddique e9af135
+    ol_spec->dst.n_bits = 1;
Numan Siddique e9af135
+    ol_spec->n_bits = ol_spec->dst.n_bits;
Numan Siddique e9af135
+    ol_spec->dst_type = NX_LEARN_DST_LOAD;
Numan Siddique e9af135
+    ol_spec->src_type = NX_LEARN_SRC_IMMEDIATE;
Numan Siddique e9af135
+    union mf_value imm_reg_value = {
Numan Siddique e9af135
+        .u8 = 1
Numan Siddique e9af135
+    };
Numan Siddique e9af135
+    mf_write_subfield_value(&ol_spec->dst, &imm_reg_value, &match);
Numan Siddique e9af135
+
Numan Siddique e9af135
+    /* Push value last, as this may reallocate 'ol_spec' */
Numan Siddique e9af135
+    imm_bytes = DIV_ROUND_UP(ol_spec->dst.n_bits, 8);
Numan Siddique e9af135
+    src_imm = ofpbuf_put_zeros(ofpacts, OFPACT_ALIGN(imm_bytes));
Numan Siddique e9af135
+    memcpy(src_imm, &imm_reg_value, imm_bytes);
Numan Siddique e9af135
+
Numan Siddique e9af135
+    ofpact_finish_LEARN(ofpacts, &ol);
Numan Siddique e9af135
+}
Numan Siddique e9af135
+
Numan Siddique e9af135
 static void
Numan Siddique e9af135
 add_lb_vip_hairpin_flows(struct ovn_controller_lb *lb,
Numan Siddique e9af135
                          struct ovn_lb_vip *lb_vip,
Numan Siddique e9af135
@@ -1180,14 +1352,12 @@ add_lb_vip_hairpin_flows(struct ovn_controller_lb *lb,
Numan Siddique e9af135
 {
Numan Siddique e9af135
     uint64_t stub[1024 / 8];
Numan Siddique e9af135
     struct ofpbuf ofpacts = OFPBUF_STUB_INITIALIZER(stub);
Numan Siddique e9af135
+    struct match hairpin_match = MATCH_CATCHALL_INITIALIZER;
Numan Siddique e9af135
 
Numan Siddique e9af135
     uint8_t value = 1;
Numan Siddique e9af135
     put_load(&value, sizeof value, MFF_LOG_FLAGS,
Numan Siddique e9af135
              MLF_LOOKUP_LB_HAIRPIN_BIT, 1, &ofpacts);
Numan Siddique e9af135
 
Numan Siddique e9af135
-    struct match hairpin_match = MATCH_CATCHALL_INITIALIZER;
Numan Siddique e9af135
-    struct match hairpin_reply_match = MATCH_CATCHALL_INITIALIZER;
Numan Siddique e9af135
-
Numan Siddique e9af135
     if (IN6_IS_ADDR_V4MAPPED(&lb_vip->vip)) {
Numan Siddique e9af135
         ovs_be32 bip4 = in6_addr_get_mapped_ipv4(&lb_backend->ip);
Numan Siddique e9af135
         ovs_be32 vip4 = lb->hairpin_snat_ips.n_ipv4_addrs
Numan Siddique e9af135
@@ -1198,9 +1368,10 @@ add_lb_vip_hairpin_flows(struct ovn_controller_lb *lb,
Numan Siddique e9af135
         match_set_nw_src(&hairpin_match, bip4);
Numan Siddique e9af135
         match_set_nw_dst(&hairpin_match, bip4);
Numan Siddique e9af135
 
Numan Siddique e9af135
-        match_set_dl_type(&hairpin_reply_match, htons(ETH_TYPE_IP));
Numan Siddique e9af135
-        match_set_nw_src(&hairpin_reply_match, bip4);
Numan Siddique e9af135
-        match_set_nw_dst(&hairpin_reply_match, vip4);
Numan Siddique e9af135
+        add_lb_vip_hairpin_reply_action(NULL, vip4, lb_proto,
Numan Siddique e9af135
+                                        lb_backend->port,
Numan Siddique e9af135
+                                        lb->slb->header_.uuid.parts[0],
Numan Siddique e9af135
+                                        &ofpacts);
Numan Siddique e9af135
     } else {
Numan Siddique e9af135
         struct in6_addr *bip6 = &lb_backend->ip;
Numan Siddique e9af135
         struct in6_addr *vip6 = lb->hairpin_snat_ips.n_ipv6_addrs
Numan Siddique e9af135
@@ -1210,17 +1381,15 @@ add_lb_vip_hairpin_flows(struct ovn_controller_lb *lb,
Numan Siddique e9af135
         match_set_ipv6_src(&hairpin_match, bip6);
Numan Siddique e9af135
         match_set_ipv6_dst(&hairpin_match, bip6);
Numan Siddique e9af135
 
Numan Siddique e9af135
-        match_set_dl_type(&hairpin_reply_match, htons(ETH_TYPE_IPV6));
Numan Siddique e9af135
-        match_set_ipv6_src(&hairpin_reply_match, bip6);
Numan Siddique e9af135
-        match_set_ipv6_dst(&hairpin_reply_match, vip6);
Numan Siddique e9af135
+        add_lb_vip_hairpin_reply_action(vip6, 0, lb_proto,
Numan Siddique e9af135
+                                        lb_backend->port,
Numan Siddique e9af135
+                                        lb->slb->header_.uuid.parts[0],
Numan Siddique e9af135
+                                        &ofpacts);
Numan Siddique e9af135
     }
Numan Siddique e9af135
 
Numan Siddique e9af135
     if (lb_backend->port) {
Numan Siddique e9af135
         match_set_nw_proto(&hairpin_match, lb_proto);
Numan Siddique e9af135
         match_set_tp_dst(&hairpin_match, htons(lb_backend->port));
Numan Siddique e9af135
-
Numan Siddique e9af135
-        match_set_nw_proto(&hairpin_reply_match, lb_proto);
Numan Siddique e9af135
-        match_set_tp_src(&hairpin_reply_match, htons(lb_backend->port));
Numan Siddique e9af135
     }
Numan Siddique e9af135
 
Numan Siddique e9af135
     /* In the original direction, only match on traffic that was already
Numan Siddique e9af135
@@ -1241,17 +1410,6 @@ add_lb_vip_hairpin_flows(struct ovn_controller_lb *lb,
Numan Siddique e9af135
     ofctrl_add_flow(flow_table, OFTABLE_CHK_LB_HAIRPIN, 100,
Numan Siddique e9af135
                     lb->slb->header_.uuid.parts[0], &hairpin_match,
Numan Siddique e9af135
                     &ofpacts, &lb->slb->header_.uuid);
Numan Siddique e9af135
-
Numan Siddique e9af135
-    for (size_t i = 0; i < lb->slb->n_datapaths; i++) {
Numan Siddique e9af135
-        match_set_metadata(&hairpin_reply_match,
Numan Siddique e9af135
-                           htonll(lb->slb->datapaths[i]->tunnel_key));
Numan Siddique e9af135
-
Numan Siddique e9af135
-        ofctrl_add_flow(flow_table, OFTABLE_CHK_LB_HAIRPIN_REPLY, 100,
Numan Siddique e9af135
-                        lb->slb->header_.uuid.parts[0],
Numan Siddique e9af135
-                        &hairpin_reply_match,
Numan Siddique e9af135
-                        &ofpacts, &lb->slb->header_.uuid);
Numan Siddique e9af135
-    }
Numan Siddique e9af135
-
Numan Siddique e9af135
     ofpbuf_uninit(&ofpacts);
Numan Siddique e9af135
 }
Numan Siddique e9af135
 
Numan Siddique e9af135
diff --git a/tests/ofproto-macros.at b/tests/ofproto-macros.at
Numan Siddique e9af135
index dd5d384..ff65d60 100644
Numan Siddique e9af135
--- a/tests/ofproto-macros.at
Numan Siddique e9af135
+++ b/tests/ofproto-macros.at
Numan Siddique e9af135
@@ -12,7 +12,10 @@ strip_n_bytes () {
Numan Siddique e9af135
 
Numan Siddique e9af135
 # Strips 'cookie=...' from ovs-ofctl output.
Numan Siddique e9af135
 strip_cookie () {
Numan Siddique e9af135
-    sed 's/ cookie=0x[0-9a-fA-F]*,//'
Numan Siddique e9af135
+    sed '
Numan Siddique e9af135
+s/ cookie=0x[0-9a-fA-F]*,//
Numan Siddique e9af135
+s/cookie=0x[0-9a-fA-F]*,//
Numan Siddique e9af135
+'
Numan Siddique e9af135
 }
Numan Siddique e9af135
 
Numan Siddique e9af135
 # Strips out uninteresting parts of ovs-ofctl output, as well as parts
Numan Siddique e9af135
diff --git a/tests/ovn.at b/tests/ovn.at
Numan Siddique e9af135
index 14072ec..6c9bda0 100644
Numan Siddique e9af135
--- a/tests/ovn.at
Numan Siddique e9af135
+++ b/tests/ovn.at
Numan Siddique e9af135
@@ -20822,6 +20822,8 @@ ovn-sbctl dump-flows > sbflows
Numan Siddique e9af135
 AT_CAPTURE_FILE([sbflows])
Numan Siddique e9af135
 > expected
Numan Siddique e9af135
 
Numan Siddique e9af135
+AS_BOX([IPv4 TCP Hairpin])
Numan Siddique e9af135
+
Numan Siddique e9af135
 # Inject IPv4 TCP packet from lsp.
Numan Siddique e9af135
 tcp_payload=$(build_tcp_syn 84d0 1f90 05a7)
Numan Siddique e9af135
 hp_tcp_payload=$(build_tcp_syn 84d0 0fc9 156e)
Numan Siddique e9af135
@@ -20835,9 +20837,15 @@ send_ipv4_pkt hv1 hv1-vif1 000000000001 000000000100 \
Numan Siddique e9af135
 # Check that traffic is hairpinned.
Numan Siddique e9af135
 OVN_CHECK_PACKETS([hv1/vif1-tx.pcap], [expected])
Numan Siddique e9af135
 
Numan Siddique e9af135
+# Check learned hairpin reply flows.
Numan Siddique e9af135
+OVS_WAIT_FOR_OUTPUT([as hv1 ovs-ofctl dump-flows br-int table=69 | ofctl_strip_all | grep -v NXST], [0], [dnl
Numan Siddique e9af135
+ table=69, tcp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.88,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+])
Numan Siddique e9af135
+
Numan Siddique e9af135
 # Change LB Hairpin SNAT IP.
Numan Siddique e9af135
 # Also flush conntrack to avoid reusing an existing entry.
Numan Siddique e9af135
 as hv1 ovs-appctl dpctl/flush-conntrack
Numan Siddique e9af135
+
Numan Siddique e9af135
 ovn-nbctl --wait=hv set load_balancer lb-ipv4-tcp options:hairpin_snat_ip="88.88.88.87"
Numan Siddique e9af135
 # Inject IPv4 TCP packet from lsp.
Numan Siddique e9af135
 hp_tcp_payload=$(build_tcp_syn 84d0 0fc9 156f)
Numan Siddique e9af135
@@ -20851,6 +20859,13 @@ send_ipv4_pkt hv1 hv1-vif1 000000000001 000000000100 \
Numan Siddique e9af135
 # Check that traffic is hairpinned.
Numan Siddique e9af135
 OVN_CHECK_PACKETS([hv1/vif1-tx.pcap], [expected])
Numan Siddique e9af135
 
Numan Siddique e9af135
+# Check learned hairpin reply flows.
Numan Siddique e9af135
+OVS_WAIT_FOR_OUTPUT([as hv1 ovs-ofctl dump-flows br-int table=69 | ofctl_strip_all | grep -v NXST], [0], [dnl
Numan Siddique e9af135
+ table=69, tcp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.87,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+])
Numan Siddique e9af135
+
Numan Siddique e9af135
+AS_BOX([IPv4 UDP Hairpin])
Numan Siddique e9af135
+
Numan Siddique e9af135
 # Inject IPv4 UDP packet from lsp.
Numan Siddique e9af135
 udp_payload=$(build_udp 84d0 0fc8 6666)
Numan Siddique e9af135
 hp_udp_payload=$(build_udp 84d0 07e5 6e49)
Numan Siddique e9af135
@@ -20864,6 +20879,12 @@ send_ipv4_pkt hv1 hv1-vif1 000000000001 000000000100 \
Numan Siddique e9af135
 # Check that traffic is hairpinned.
Numan Siddique e9af135
 OVN_CHECK_PACKETS([hv1/vif1-tx.pcap], [expected])
Numan Siddique e9af135
 
Numan Siddique e9af135
+# Check learned hairpin reply flows.
Numan Siddique e9af135
+OVS_WAIT_FOR_OUTPUT([as hv1 ovs-ofctl dump-flows br-int table=69 | ofctl_strip_all | grep -v NXST], [0], [dnl
Numan Siddique e9af135
+ table=69, tcp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.87,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+ table=69, udp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.88,tp_src=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+])
Numan Siddique e9af135
+
Numan Siddique e9af135
 # Change LB Hairpin SNAT IP.
Numan Siddique e9af135
 # Also flush conntrack to avoid reusing an existing entry.
Numan Siddique e9af135
 as hv1 ovs-appctl dpctl/flush-conntrack
Numan Siddique e9af135
@@ -20880,6 +20901,14 @@ send_ipv4_pkt hv1 hv1-vif1 000000000001 000000000100 \
Numan Siddique e9af135
 # Check that traffic is hairpinned.
Numan Siddique e9af135
 OVN_CHECK_PACKETS([hv1/vif1-tx.pcap], [expected])
Numan Siddique e9af135
 
Numan Siddique e9af135
+# Check learned hairpin reply flows.
Numan Siddique e9af135
+OVS_WAIT_FOR_OUTPUT([as hv1 ovs-ofctl dump-flows br-int table=69 | ofctl_strip_all | grep -v NXST], [0], [dnl
Numan Siddique e9af135
+ table=69, tcp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.87,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+ table=69, udp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.87,tp_src=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+])
Numan Siddique e9af135
+
Numan Siddique e9af135
+AS_BOX([IPv6 TCP Hairpin])
Numan Siddique e9af135
+
Numan Siddique e9af135
 # Inject IPv6 TCP packet from lsp.
Numan Siddique e9af135
 tcp_payload=$(build_tcp_syn 84d0 1f90 3ff9)
Numan Siddique e9af135
 hp_tcp_payload=$(build_tcp_syn 84d0 0fc9 4fc0)
Numan Siddique e9af135
@@ -20893,6 +20922,13 @@ send_ipv6_pkt hv1 hv1-vif1 000000000001 000000000100 \
Numan Siddique e9af135
 # Check that traffic is hairpinned.
Numan Siddique e9af135
 OVN_CHECK_PACKETS([hv1/vif1-tx.pcap], [expected])
Numan Siddique e9af135
 
Numan Siddique e9af135
+# Check learned hairpin reply flows.
Numan Siddique e9af135
+OVS_WAIT_FOR_OUTPUT([as hv1 ovs-ofctl dump-flows br-int table=69 | ofctl_strip_all | grep -v NXST], [0], [dnl
Numan Siddique e9af135
+ table=69, tcp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.87,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+ table=69, udp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.87,tp_src=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+ table=69, tcp6,metadata=0x1,ipv6_src=4200::1,ipv6_dst=8800::88,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+])
Numan Siddique e9af135
+
Numan Siddique e9af135
 # Change LB Hairpin SNAT IP.
Numan Siddique e9af135
 # Also flush conntrack to avoid reusing an existing entry.
Numan Siddique e9af135
 as hv1 ovs-appctl dpctl/flush-conntrack
Numan Siddique e9af135
@@ -20910,6 +20946,15 @@ send_ipv6_pkt hv1 hv1-vif1 000000000001 000000000100 \
Numan Siddique e9af135
 # Check that traffic is hairpinned.
Numan Siddique e9af135
 OVN_CHECK_PACKETS([hv1/vif1-tx.pcap], [expected])
Numan Siddique e9af135
 
Numan Siddique e9af135
+# Check learned hairpin reply flows.
Numan Siddique e9af135
+OVS_WAIT_FOR_OUTPUT([as hv1 ovs-ofctl dump-flows br-int table=69 | ofctl_strip_all | grep -v NXST], [0], [dnl
Numan Siddique e9af135
+ table=69, tcp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.87,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+ table=69, udp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.87,tp_src=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+ table=69, tcp6,metadata=0x1,ipv6_src=4200::1,ipv6_dst=8800::87,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+])
Numan Siddique e9af135
+
Numan Siddique e9af135
+AS_BOX([IPv6 UDP Hairpin])
Numan Siddique e9af135
+
Numan Siddique e9af135
 # Inject IPv6 UDP packet from lsp.
Numan Siddique e9af135
 udp_payload=$(build_udp 84d0 0fc8 a0b8)
Numan Siddique e9af135
 hp_udp_payload=$(build_udp 84d0 07e5 a89b)
Numan Siddique e9af135
@@ -20920,9 +20965,17 @@ send_ipv6_pkt hv1 hv1-vif1 000000000001 000000000100 \
Numan Siddique e9af135
     88000000000000000000000000000088 ${hp_udp_payload} \
Numan Siddique e9af135
     expected
Numan Siddique e9af135
 
Numan Siddique e9af135
-Check that traffic is hairpinned.
Numan Siddique e9af135
+# Check that traffic is hairpinned.
Numan Siddique e9af135
 OVN_CHECK_PACKETS([hv1/vif1-tx.pcap], [expected])
Numan Siddique e9af135
 
Numan Siddique e9af135
+# Check learned hairpin reply flows.
Numan Siddique e9af135
+OVS_WAIT_FOR_OUTPUT([as hv1 ovs-ofctl dump-flows br-int table=69 | ofctl_strip_all | grep -v NXST], [0], [dnl
Numan Siddique e9af135
+ table=69, tcp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.87,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+ table=69, udp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.87,tp_src=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+ table=69, tcp6,metadata=0x1,ipv6_src=4200::1,ipv6_dst=8800::87,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+ table=69, udp6,metadata=0x1,ipv6_src=4200::1,ipv6_dst=8800::88,tp_src=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+])
Numan Siddique e9af135
+
Numan Siddique e9af135
 # Change LB Hairpin SNAT IP.
Numan Siddique e9af135
 # Also flush conntrack to avoid reusing an existing entry.
Numan Siddique e9af135
 as hv1 ovs-appctl dpctl/flush-conntrack
Numan Siddique e9af135
@@ -20937,6 +20990,41 @@ send_ipv6_pkt hv1 hv1-vif1 000000000001 000000000100 \
Numan Siddique e9af135
     88000000000000000000000000000087 ${hp_udp_payload} \
Numan Siddique e9af135
     expected
Numan Siddique e9af135
 
Numan Siddique e9af135
+# Check learned hairpin reply flows.
Numan Siddique e9af135
+OVS_WAIT_FOR_OUTPUT([as hv1 ovs-ofctl dump-flows br-int table=69 | ofctl_strip_all | grep -v NXST], [0], [dnl
Numan Siddique e9af135
+ table=69, tcp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.87,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+ table=69, udp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.87,tp_src=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+ table=69, tcp6,metadata=0x1,ipv6_src=4200::1,ipv6_dst=8800::87,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+ table=69, udp6,metadata=0x1,ipv6_src=4200::1,ipv6_dst=8800::87,tp_src=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+])
Numan Siddique e9af135
+
Numan Siddique e9af135
+AS_BOX([Delete VIP])
Numan Siddique e9af135
+check ovn-nbctl --wait=hv set Load_Balancer lb-ipv4-tcp vips='"88.88.88.88:8080"=""'
Numan Siddique e9af135
+OVS_WAIT_FOR_OUTPUT([as hv1 ovs-ofctl dump-flows br-int table=69 | ofctl_strip_all | grep -v NXST], [0], [dnl
Numan Siddique e9af135
+ table=69, udp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.87,tp_src=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+ table=69, tcp6,metadata=0x1,ipv6_src=4200::1,ipv6_dst=8800::87,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+ table=69, udp6,metadata=0x1,ipv6_src=4200::1,ipv6_dst=8800::87,tp_src=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+])
Numan Siddique e9af135
+
Numan Siddique e9af135
+AS_BOX([Delete LB])
Numan Siddique e9af135
+check ovn-nbctl --wait=hv \
Numan Siddique e9af135
+    -- lb-del lb-ipv4-tcp \
Numan Siddique e9af135
+    -- lb-del lb-ipv4-udp
Numan Siddique e9af135
+
Numan Siddique e9af135
+OVS_WAIT_FOR_OUTPUT([as hv1 ovs-ofctl dump-flows br-int table=69 | ofctl_strip_all | grep -v NXST], [0], [dnl
Numan Siddique e9af135
+ table=69, tcp6,metadata=0x1,ipv6_src=4200::1,ipv6_dst=8800::87,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+ table=69, udp6,metadata=0x1,ipv6_src=4200::1,ipv6_dst=8800::87,tp_src=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+])
Numan Siddique e9af135
+
Numan Siddique e9af135
+check ovn-nbctl --wait=hv lb-del lb-ipv6-tcp
Numan Siddique e9af135
+OVS_WAIT_FOR_OUTPUT([as hv1 ovs-ofctl dump-flows br-int table=69 | ofctl_strip_all | grep -v NXST], [0], [dnl
Numan Siddique e9af135
+ table=69, udp6,metadata=0x1,ipv6_src=4200::1,ipv6_dst=8800::87,tp_src=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+])
Numan Siddique e9af135
+
Numan Siddique e9af135
+check ovn-nbctl --wait=hv lb-del lb-ipv6-udp
Numan Siddique e9af135
+OVS_WAIT_FOR_OUTPUT([as hv1 ovs-ofctl dump-flows br-int table=69 | ofctl_strip_all | grep -v NXST], [1], [dnl
Numan Siddique e9af135
+])
Numan Siddique e9af135
+
Numan Siddique e9af135
 OVN_CLEANUP([hv1])
Numan Siddique e9af135
 AT_CLEANUP
Numan Siddique e9af135
 
Numan Siddique e9af135
@@ -23188,93 +23276,79 @@ check ovn-nbctl lb-add lb-ipv4-udp 88.88.88.88:4040 42.42.42.1:2021 udp
Numan Siddique e9af135
 check ovn-nbctl lb-add lb-ipv6-tcp [[8800::0088]]:8080 [[4200::1]]:4041 tcp
Numan Siddique e9af135
 check ovn-nbctl --wait=hv lb-add lb-ipv6-udp [[8800::0088]]:4040 [[4200::1]]:2021 udp
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=68], [0], [dnl
Numan Siddique e9af135
-NXST_FLOW reply (xid=0x8):
Numan Siddique e9af135
+AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=68 | grep -v NXST], [1], [dnl
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=69], [0], [dnl
Numan Siddique e9af135
-NXST_FLOW reply (xid=0x8):
Numan Siddique e9af135
+AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=69 | grep -v NXST], [1], [dnl
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=70], [0], [dnl
Numan Siddique e9af135
-NXST_FLOW reply (xid=0x8):
Numan Siddique e9af135
+AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=70 | grep -v NXST], [1], [dnl
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=68], [0], [dnl
Numan Siddique e9af135
-NXST_FLOW reply (xid=0x8):
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=68 | grep -v NXST], [1], [dnl
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=69], [0], [dnl
Numan Siddique e9af135
-NXST_FLOW reply (xid=0x8):
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=69 | grep -v NXST], [1], [dnl
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=70], [0], [dnl
Numan Siddique e9af135
-NXST_FLOW reply (xid=0x8):
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=70 | grep -v NXST], [1], [dnl
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
 check ovn-nbctl --wait=hv ls-lb-add sw0 lb-ipv4-tcp
Numan Siddique e9af135
 
Numan Siddique e9af135
 OVS_WAIT_UNTIL(
Numan Siddique e9af135
-    [test $(as hv1 ovs-ofctl dump-flows br-int table=68 | grep -v NXST | wc -l) -eq 1]
Numan Siddique e9af135
+    [test $(as hv1 ovs-ofctl dump-flows br-int table=68 | grep -c -v NXST) -eq 1]
Numan Siddique e9af135
 )
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=68 | grep -v NXST | cut -d ' ' -f8-], [0], [dnl
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=68 | ofctl_strip_all | grep -v NXST | sort], [0], [dnl
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.88,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=69 | grep -v NXST | cut -d ' ' -f8-], [0], [dnl
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.88,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=69], [0], [dnl
Numan Siddique e9af135
+NXST_FLOW reply (xid=0x8):
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=70 | grep -v NXST | cut -d ' ' -f8-], [0], [dnl
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
+AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=70 | ofctl_strip_all | grep -v NXST | sort], [0], [dnl
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=68], [0], [dnl
Numan Siddique e9af135
-NXST_FLOW reply (xid=0x8):
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=68 | grep -v NXST], [1], [dnl
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=69], [0], [dnl
Numan Siddique e9af135
-NXST_FLOW reply (xid=0x8):
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=69 | grep -v NXST], [1], [dnl
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=70], [0], [dnl
Numan Siddique e9af135
-NXST_FLOW reply (xid=0x8):
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=70 | grep -v NXST], [1], [dnl
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
 check ovn-nbctl lb-add lb-ipv4-tcp 88.88.88.90:8080 42.42.42.42:4041,52.52.52.52:4042 tcp
Numan Siddique e9af135
 
Numan Siddique e9af135
 OVS_WAIT_UNTIL(
Numan Siddique e9af135
-    [test $(as hv1 ovs-ofctl dump-flows br-int table=68 | grep -v NXST | wc -l) -eq 3]
Numan Siddique e9af135
+    [test $(as hv1 ovs-ofctl dump-flows br-int table=68 | grep -c -v NXST) -eq 3]
Numan Siddique e9af135
 )
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=68 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.42,nw_dst=42.42.42.42,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=52.52.52.52,nw_dst=52.52.52.52,tp_dst=4042 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=68 | ofctl_strip_all | grep -v NXST | sort], [0], [dnl
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.88,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.42,nw_dst=42.42.42.42,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.90,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=52.52.52.52,nw_dst=52.52.52.52,tp_dst=4042 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.90,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=69 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.88,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=42.42.42.42,nw_dst=88.88.88.90,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=52.52.52.52,nw_dst=88.88.88.90,tp_src=4042 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=69], [0], [dnl
Numan Siddique e9af135
+NXST_FLOW reply (xid=0x8):
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=70 | grep -v NXST | cut -d ' ' -f8-], [0], [dnl
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.90,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.90))
Numan Siddique e9af135
+AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=70 | ofctl_strip_all | grep -v NXST | sort], [0], [dnl
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.90,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.90))
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=68], [0], [dnl
Numan Siddique e9af135
-NXST_FLOW reply (xid=0x8):
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=68 | grep -v NXST], [1], [dnl
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=69], [0], [dnl
Numan Siddique e9af135
-NXST_FLOW reply (xid=0x8):
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=69 | grep -v NXST], [1], [dnl
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=70], [0], [dnl
Numan Siddique e9af135
-NXST_FLOW reply (xid=0x8):
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=70 | grep -v NXST], [1], [dnl
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
 check ovn-nbctl lsp-add sw0 sw0-p2
Numan Siddique e9af135
@@ -23282,192 +23356,159 @@ check ovn-nbctl lsp-add sw0 sw0-p2
Numan Siddique e9af135
 OVS_WAIT_UNTIL([test x$(ovn-nbctl lsp-get-up sw0-p2) = xup])
Numan Siddique e9af135
 
Numan Siddique e9af135
 OVS_WAIT_UNTIL(
Numan Siddique e9af135
-    [test $(as hv2 ovs-ofctl dump-flows br-int table=68 | grep -v NXST | wc -l) -eq 3]
Numan Siddique e9af135
+    [test $(as hv2 ovs-ofctl dump-flows br-int table=68 | grep -c -v NXST) -eq 3]
Numan Siddique e9af135
 )
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=68 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.42,nw_dst=42.42.42.42,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=52.52.52.52,nw_dst=52.52.52.52,tp_dst=4042 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=68 | ofctl_strip_all | grep -v NXST | sort], [0], [dnl
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.88,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.42,nw_dst=42.42.42.42,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.90,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=52.52.52.52,nw_dst=52.52.52.52,tp_dst=4042 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.90,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=69 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.88,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=42.42.42.42,nw_dst=88.88.88.90,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=52.52.52.52,nw_dst=88.88.88.90,tp_src=4042 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=69 | grep -v NXST], [1], [dnl
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=70 | grep -v NXST | cut -d ' ' -f8-], [0], [dnl
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.90,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.90))
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=70 | ofctl_strip_all | grep -v NXST | sort], [0], [dnl
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.90,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.90))
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
 check ovn-nbctl --wait=hv ls-lb-add sw0 lb-ipv4-udp
Numan Siddique e9af135
 
Numan Siddique e9af135
 OVS_WAIT_UNTIL(
Numan Siddique e9af135
-    [test $(as hv1 ovs-ofctl dump-flows br-int table=68 | grep -v NXST | wc -l) -eq 4]
Numan Siddique e9af135
+    [test $(as hv1 ovs-ofctl dump-flows br-int table=68 | grep -c -v NXST) -eq 4]
Numan Siddique e9af135
 )
Numan Siddique e9af135
 
Numan Siddique e9af135
 OVS_WAIT_UNTIL(
Numan Siddique e9af135
-    [test $(as hv2 ovs-ofctl dump-flows br-int table=68 | grep -v NXST | wc -l) -eq 4]
Numan Siddique e9af135
+    [test $(as hv2 ovs-ofctl dump-flows br-int table=68 | grep -c -v NXST) -eq 4]
Numan Siddique e9af135
 )
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=68 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.42,nw_dst=42.42.42.42,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=52.52.52.52,nw_dst=52.52.52.52,tp_dst=4042 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,udp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=68 | ofctl_strip_all | grep -v NXST | sort], [0], [dnl
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.88,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.42,nw_dst=42.42.42.42,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.90,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=52.52.52.52,nw_dst=52.52.52.52,tp_dst=4042 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.90,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,udp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=2021 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.88,nw_proto=17,NXM_OF_UDP_SRC[[]]=NXM_OF_UDP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=69 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.88,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=42.42.42.42,nw_dst=88.88.88.90,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=52.52.52.52,nw_dst=88.88.88.90,tp_src=4042 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,udp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.88,tp_src=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=69 | grep -v NXST], [1], [dnl
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=70 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=17,ct_tp_dst=4040,udp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.90,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.90))
Numan Siddique e9af135
+AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=70 | ofctl_strip_all | grep -v NXST | sort], [0], [dnl
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=17,ct_tp_dst=4040,udp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.90,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.90))
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=68 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.42,nw_dst=42.42.42.42,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=52.52.52.52,nw_dst=52.52.52.52,tp_dst=4042 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,udp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=68 | ofctl_strip_all | grep -v NXST | sort], [0], [dnl
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.88,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.42,nw_dst=42.42.42.42,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.90,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=52.52.52.52,nw_dst=52.52.52.52,tp_dst=4042 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.90,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,udp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=2021 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.88,nw_proto=17,NXM_OF_UDP_SRC[[]]=NXM_OF_UDP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=69 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.88,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=42.42.42.42,nw_dst=88.88.88.90,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=52.52.52.52,nw_dst=88.88.88.90,tp_src=4042 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,udp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.88,tp_src=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=69 | grep -v NXST], [1], [dnl
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=70 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=17,ct_tp_dst=4040,udp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.90,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.90))
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=70 | ofctl_strip_all | grep -v NXST | sort], [0], [dnl
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=17,ct_tp_dst=4040,udp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.90,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.90))
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
 check ovn-nbctl --wait=hv ls-lb-add sw0 lb-ipv6-tcp
Numan Siddique e9af135
 
Numan Siddique e9af135
 OVS_WAIT_UNTIL(
Numan Siddique e9af135
-    [test $(as hv1 ovs-ofctl dump-flows br-int table=68 | grep -v NXST | wc -l) -eq 5]
Numan Siddique e9af135
+    [test $(as hv1 ovs-ofctl dump-flows br-int table=68 | grep -c -v NXST) -eq 5]
Numan Siddique e9af135
 )
Numan Siddique e9af135
 
Numan Siddique e9af135
 OVS_WAIT_UNTIL(
Numan Siddique e9af135
-    [test $(as hv2 ovs-ofctl dump-flows br-int table=68 | grep -v NXST | wc -l) -eq 5]
Numan Siddique e9af135
+    [test $(as hv2 ovs-ofctl dump-flows br-int table=68 | grep -c -v NXST) -eq 5]
Numan Siddique e9af135
 )
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=68 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.42,nw_dst=42.42.42.42,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=52.52.52.52,nw_dst=52.52.52.52,tp_dst=4042 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp6,ipv6_src=4200::1,ipv6_dst=4200::1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,udp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=68 | ofctl_strip_all | grep -v NXST | sort], [0], [dnl
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.88,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.42,nw_dst=42.42.42.42,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.90,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=52.52.52.52,nw_dst=52.52.52.52,tp_dst=4042 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.90,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp6,ipv6_src=4200::1,ipv6_dst=4200::1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x86dd,NXM_NX_IPV6_SRC[[]],ipv6_dst=8800::88,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,udp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=2021 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.88,nw_proto=17,NXM_OF_UDP_SRC[[]]=NXM_OF_UDP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=69 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.88,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=42.42.42.42,nw_dst=88.88.88.90,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=52.52.52.52,nw_dst=88.88.88.90,tp_src=4042 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,tcp6,metadata=0x1,ipv6_src=4200::1,ipv6_dst=8800::88,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,udp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.88,tp_src=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=69 | grep -v NXST], [1], [dnl
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=70 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=6,ct_tp_dst=8080,tcp6,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=17,ct_tp_dst=4040,udp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.90,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.90))
Numan Siddique e9af135
+AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=70 | ofctl_strip_all | grep -v NXST | sort], [0], [dnl
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=6,ct_tp_dst=8080,tcp6,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=17,ct_tp_dst=4040,udp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.90,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.90))
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=68 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.42,nw_dst=42.42.42.42,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=52.52.52.52,nw_dst=52.52.52.52,tp_dst=4042 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp6,ipv6_src=4200::1,ipv6_dst=4200::1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,udp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=68 | ofctl_strip_all | grep -v NXST | sort], [0], [dnl
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.88,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.42,nw_dst=42.42.42.42,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.90,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=52.52.52.52,nw_dst=52.52.52.52,tp_dst=4042 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.90,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp6,ipv6_src=4200::1,ipv6_dst=4200::1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x86dd,NXM_NX_IPV6_SRC[[]],ipv6_dst=8800::88,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,udp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=2021 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.88,nw_proto=17,NXM_OF_UDP_SRC[[]]=NXM_OF_UDP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=69 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.88,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=42.42.42.42,nw_dst=88.88.88.90,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=52.52.52.52,nw_dst=88.88.88.90,tp_src=4042 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,tcp6,metadata=0x1,ipv6_src=4200::1,ipv6_dst=8800::88,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,udp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.88,tp_src=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=69 | grep -v NXST], [1], [dnl
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=70 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=6,ct_tp_dst=8080,tcp6,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=17,ct_tp_dst=4040,udp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.90,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.90))
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=70 | ofctl_strip_all | grep -v NXST | sort], [0], [dnl
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=6,ct_tp_dst=8080,tcp6,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=17,ct_tp_dst=4040,udp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.90,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.90))
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
 check ovn-nbctl --wait=hv ls-lb-add sw0 lb-ipv6-udp
Numan Siddique e9af135
 
Numan Siddique e9af135
 OVS_WAIT_UNTIL(
Numan Siddique e9af135
-    [test $(as hv1 ovs-ofctl dump-flows br-int table=68 | grep -v NXST | wc -l) -eq 6]
Numan Siddique e9af135
+    [test $(as hv1 ovs-ofctl dump-flows br-int table=68 | grep -c -v NXST) -eq 6]
Numan Siddique e9af135
 )
Numan Siddique e9af135
 
Numan Siddique e9af135
 OVS_WAIT_UNTIL(
Numan Siddique e9af135
-    [test $(as hv2 ovs-ofctl dump-flows br-int table=68 | grep -v NXST | wc -l) -eq 6]
Numan Siddique e9af135
+    [test $(as hv2 ovs-ofctl dump-flows br-int table=68 | grep -c -v NXST) -eq 6]
Numan Siddique e9af135
 )
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=68 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.42,nw_dst=42.42.42.42,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=52.52.52.52,nw_dst=52.52.52.52,tp_dst=4042 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp6,ipv6_src=4200::1,ipv6_dst=4200::1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,udp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,udp6,ipv6_src=4200::1,ipv6_dst=4200::1,tp_dst=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=68 | ofctl_strip_all | grep -v NXST | sort], [0], [dnl
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.88,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.42,nw_dst=42.42.42.42,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.90,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=52.52.52.52,nw_dst=52.52.52.52,tp_dst=4042 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.90,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp6,ipv6_src=4200::1,ipv6_dst=4200::1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x86dd,NXM_NX_IPV6_SRC[[]],ipv6_dst=8800::88,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,udp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=2021 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.88,nw_proto=17,NXM_OF_UDP_SRC[[]]=NXM_OF_UDP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,udp6,ipv6_src=4200::1,ipv6_dst=4200::1,tp_dst=2021 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x86dd,NXM_NX_IPV6_SRC[[]],ipv6_dst=8800::88,nw_proto=17,NXM_OF_UDP_SRC[[]]=NXM_OF_UDP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=69 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.88,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=42.42.42.42,nw_dst=88.88.88.90,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=52.52.52.52,nw_dst=88.88.88.90,tp_src=4042 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,tcp6,metadata=0x1,ipv6_src=4200::1,ipv6_dst=8800::88,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,udp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.88,tp_src=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,udp6,metadata=0x1,ipv6_src=4200::1,ipv6_dst=8800::88,tp_src=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=69 | grep -v NXST], [1], [dnl
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=70 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=17,ct_tp_dst=4040,udp6,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=6,ct_tp_dst=8080,tcp6,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=17,ct_tp_dst=4040,udp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.90,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.90))
Numan Siddique e9af135
+AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=70 | ofctl_strip_all | grep -v NXST | sort], [0], [dnl
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=17,ct_tp_dst=4040,udp6,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=6,ct_tp_dst=8080,tcp6,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=17,ct_tp_dst=4040,udp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.90,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.90))
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=68 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.42,nw_dst=42.42.42.42,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=52.52.52.52,nw_dst=52.52.52.52,tp_dst=4042 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp6,ipv6_src=4200::1,ipv6_dst=4200::1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,udp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,udp6,ipv6_src=4200::1,ipv6_dst=4200::1,tp_dst=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=68 | ofctl_strip_all | grep -v NXST | sort], [0], [dnl
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.88,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.42,nw_dst=42.42.42.42,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.90,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=52.52.52.52,nw_dst=52.52.52.52,tp_dst=4042 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.90,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp6,ipv6_src=4200::1,ipv6_dst=4200::1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x86dd,NXM_NX_IPV6_SRC[[]],ipv6_dst=8800::88,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,udp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=2021 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.88,nw_proto=17,NXM_OF_UDP_SRC[[]]=NXM_OF_UDP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,udp6,ipv6_src=4200::1,ipv6_dst=4200::1,tp_dst=2021 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x86dd,NXM_NX_IPV6_SRC[[]],ipv6_dst=8800::88,nw_proto=17,NXM_OF_UDP_SRC[[]]=NXM_OF_UDP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=69 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.88,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=42.42.42.42,nw_dst=88.88.88.90,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=52.52.52.52,nw_dst=88.88.88.90,tp_src=4042 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,tcp6,metadata=0x1,ipv6_src=4200::1,ipv6_dst=8800::88,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,udp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.88,tp_src=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,udp6,metadata=0x1,ipv6_src=4200::1,ipv6_dst=8800::88,tp_src=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=69 | grep -v NXST], [1], [dnl
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=70 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=17,ct_tp_dst=4040,udp6,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=6,ct_tp_dst=8080,tcp6,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=17,ct_tp_dst=4040,udp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.90,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.90))
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=70 | ofctl_strip_all | grep -v NXST | sort], [0], [dnl
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=17,ct_tp_dst=4040,udp6,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=6,ct_tp_dst=8080,tcp6,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=17,ct_tp_dst=4040,udp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.90,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.90))
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
 check ovn-nbctl --wait=hv ls-lb-add sw1 lb-ipv6-udp
Numan Siddique e9af135
@@ -23475,67 +23516,53 @@ check ovn-nbctl --wait=hv ls-lb-add sw1 lb-ipv6-udp
Numan Siddique e9af135
 # Number of hairpin flows shouldn't change as it doesn't depend on how many
Numan Siddique e9af135
 # datapaths the LB is applied.
Numan Siddique e9af135
 OVS_WAIT_UNTIL(
Numan Siddique e9af135
-    [test $(as hv1 ovs-ofctl dump-flows br-int table=68 | grep -v NXST | wc -l) -eq 6]
Numan Siddique e9af135
+    [test $(as hv1 ovs-ofctl dump-flows br-int table=68 | grep -c -v NXST) -eq 6]
Numan Siddique e9af135
 )
Numan Siddique e9af135
 
Numan Siddique e9af135
 OVS_WAIT_UNTIL(
Numan Siddique e9af135
-    [test $(as hv2 ovs-ofctl dump-flows br-int table=68 | grep -v NXST | wc -l) -eq 6]
Numan Siddique e9af135
+    [test $(as hv2 ovs-ofctl dump-flows br-int table=68 | grep -c -v NXST) -eq 6]
Numan Siddique e9af135
 )
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=68 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.42,nw_dst=42.42.42.42,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=52.52.52.52,nw_dst=52.52.52.52,tp_dst=4042 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp6,ipv6_src=4200::1,ipv6_dst=4200::1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,udp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,udp6,ipv6_src=4200::1,ipv6_dst=4200::1,tp_dst=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-])
Numan Siddique e9af135
-
Numan Siddique e9af135
-AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=69 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.88,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=42.42.42.42,nw_dst=88.88.88.90,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=52.52.52.52,nw_dst=88.88.88.90,tp_src=4042 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,tcp6,metadata=0x1,ipv6_src=4200::1,ipv6_dst=8800::88,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,udp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.88,tp_src=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,udp6,metadata=0x1,ipv6_src=4200::1,ipv6_dst=8800::88,tp_src=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,udp6,metadata=0x2,ipv6_src=4200::1,ipv6_dst=8800::88,tp_src=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-])
Numan Siddique e9af135
-
Numan Siddique e9af135
-AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=70 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=17,ct_tp_dst=4040,udp6,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=17,ct_tp_dst=4040,udp6,metadata=0x2 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=6,ct_tp_dst=8080,tcp6,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=17,ct_tp_dst=4040,udp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.90,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.90))
Numan Siddique e9af135
-])
Numan Siddique e9af135
-
Numan Siddique e9af135
-AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=68 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.42,nw_dst=42.42.42.42,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp,nw_src=52.52.52.52,nw_dst=52.52.52.52,tp_dst=4042 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp6,ipv6_src=4200::1,ipv6_dst=4200::1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,udp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,udp6,ipv6_src=4200::1,ipv6_dst=4200::1,tp_dst=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-])
Numan Siddique e9af135
-
Numan Siddique e9af135
-AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=69 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.88,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=42.42.42.42,nw_dst=88.88.88.90,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,tcp,metadata=0x1,nw_src=52.52.52.52,nw_dst=88.88.88.90,tp_src=4042 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,tcp6,metadata=0x1,ipv6_src=4200::1,ipv6_dst=8800::88,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,udp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.88,tp_src=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,udp6,metadata=0x1,ipv6_src=4200::1,ipv6_dst=8800::88,tp_src=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,udp6,metadata=0x2,ipv6_src=4200::1,ipv6_dst=8800::88,tp_src=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-])
Numan Siddique e9af135
-
Numan Siddique e9af135
-AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=70 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=17,ct_tp_dst=4040,udp6,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=17,ct_tp_dst=4040,udp6,metadata=0x2 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=6,ct_tp_dst=8080,tcp6,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=17,ct_tp_dst=4040,udp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.90,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.90))
Numan Siddique e9af135
+AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=68 | ofctl_strip_all | grep -v NXST | sort], [0], [dnl
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.88,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.42,nw_dst=42.42.42.42,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.90,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=52.52.52.52,nw_dst=52.52.52.52,tp_dst=4042 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.90,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp6,ipv6_src=4200::1,ipv6_dst=4200::1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x86dd,NXM_NX_IPV6_SRC[[]],ipv6_dst=8800::88,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,udp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=2021 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.88,nw_proto=17,NXM_OF_UDP_SRC[[]]=NXM_OF_UDP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,udp6,ipv6_src=4200::1,ipv6_dst=4200::1,tp_dst=2021 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x86dd,NXM_NX_IPV6_SRC[[]],ipv6_dst=8800::88,nw_proto=17,NXM_OF_UDP_SRC[[]]=NXM_OF_UDP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+])
Numan Siddique e9af135
+
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=69 | grep -v NXST], [1], [dnl
Numan Siddique e9af135
+])
Numan Siddique e9af135
+
Numan Siddique e9af135
+AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=70 | ofctl_strip_all | grep -v NXST | sort], [0], [dnl
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=17,ct_tp_dst=4040,udp6,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=17,ct_tp_dst=4040,udp6,metadata=0x2 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=6,ct_tp_dst=8080,tcp6,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=17,ct_tp_dst=4040,udp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.90,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.90))
Numan Siddique e9af135
+])
Numan Siddique e9af135
+
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=68 | ofctl_strip_all | grep -v NXST | sort], [0], [dnl
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.88,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=42.42.42.42,nw_dst=42.42.42.42,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.90,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp,nw_src=52.52.52.52,nw_dst=52.52.52.52,tp_dst=4042 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.90,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp6,ipv6_src=4200::1,ipv6_dst=4200::1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x86dd,NXM_NX_IPV6_SRC[[]],ipv6_dst=8800::88,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,udp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=2021 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.88,nw_proto=17,NXM_OF_UDP_SRC[[]]=NXM_OF_UDP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,udp6,ipv6_src=4200::1,ipv6_dst=4200::1,tp_dst=2021 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x86dd,NXM_NX_IPV6_SRC[[]],ipv6_dst=8800::88,nw_proto=17,NXM_OF_UDP_SRC[[]]=NXM_OF_UDP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+])
Numan Siddique e9af135
+
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=69 | grep -v NXST], [1], [dnl
Numan Siddique e9af135
+])
Numan Siddique e9af135
+
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=70 | ofctl_strip_all | grep -v NXST | sort], [0], [dnl
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=17,ct_tp_dst=4040,udp6,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=17,ct_tp_dst=4040,udp6,metadata=0x2 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=6,ct_tp_dst=8080,tcp6,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=17,ct_tp_dst=4040,udp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.90,ct_nw_proto=6,ct_tp_dst=8080,tcp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.90))
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
 as hv2 ovs-vsctl del-port hv2-vif1
Numan Siddique e9af135
@@ -23545,76 +23572,73 @@ OVS_WAIT_UNTIL([test x$(ovn-nbctl lsp-get-up sw0-p2) = xdown])
Numan Siddique e9af135
 as hv2 ovn-appctl -t ovn-controller recompute
Numan Siddique e9af135
 
Numan Siddique e9af135
 OVS_WAIT_UNTIL(
Numan Siddique e9af135
-    [test $(as hv2 ovs-ofctl dump-flows br-int table=68 | grep -v NXST | wc -l) -eq 0]
Numan Siddique e9af135
+    [test $(as hv2 ovs-ofctl dump-flows br-int table=68 | grep -c -v NXST) -eq 0]
Numan Siddique e9af135
 )
Numan Siddique e9af135
 
Numan Siddique e9af135
 OVS_WAIT_UNTIL(
Numan Siddique e9af135
-    [test $(as hv2 ovs-ofctl dump-flows br-int table=69 | grep -v NXST | wc -l) -eq 0]
Numan Siddique e9af135
+    [test $(as hv2 ovs-ofctl dump-flows br-int table=69 | grep -c -v NXST) -eq 0]
Numan Siddique e9af135
 )
Numan Siddique e9af135
 
Numan Siddique e9af135
 OVS_WAIT_UNTIL(
Numan Siddique e9af135
-    [test $(as hv2 ovs-ofctl dump-flows br-int table=70 | grep -v NXST | wc -l) -eq 0]
Numan Siddique e9af135
+    [test $(as hv2 ovs-ofctl dump-flows br-int table=70 | grep -c -v NXST) -eq 0]
Numan Siddique e9af135
 )
Numan Siddique e9af135
 
Numan Siddique e9af135
 OVS_WAIT_UNTIL(
Numan Siddique e9af135
-    [test $(as hv1 ovs-ofctl dump-flows br-int table=68 | grep -v NXST | wc -l) -eq 6]
Numan Siddique e9af135
+    [test $(as hv1 ovs-ofctl dump-flows br-int table=68 | grep -c -v NXST) -eq 6]
Numan Siddique e9af135
 )
Numan Siddique e9af135
 
Numan Siddique e9af135
 check ovn-nbctl --wait=hv lb-del lb-ipv4-tcp
Numan Siddique e9af135
 
Numan Siddique e9af135
 OVS_WAIT_UNTIL(
Numan Siddique e9af135
-    [test $(as hv1 ovs-ofctl dump-flows br-int table=68 | grep -v NXST | wc -l) -eq 3]
Numan Siddique e9af135
+    [test $(as hv1 ovs-ofctl dump-flows br-int table=68 | grep -c -v NXST) -eq 3]
Numan Siddique e9af135
 )
Numan Siddique e9af135
 
Numan Siddique e9af135
 OVS_WAIT_UNTIL(
Numan Siddique e9af135
-    [test $(as hv2 ovs-ofctl dump-flows br-int table=68 | grep -v NXST | wc -l) -eq 0]
Numan Siddique e9af135
+    [test $(as hv2 ovs-ofctl dump-flows br-int table=68 | grep -c -v NXST) -eq 0]
Numan Siddique e9af135
 )
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=68 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,tcp6,ipv6_src=4200::1,ipv6_dst=4200::1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,udp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,ct_label=0x2/0x2,udp6,ipv6_src=4200::1,ipv6_dst=4200::1,tp_dst=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=68 | ofctl_strip_all | grep -v NXST | sort], [0], [dnl
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,tcp6,ipv6_src=4200::1,ipv6_dst=4200::1,tp_dst=4041 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x86dd,NXM_NX_IPV6_SRC[[]],ipv6_dst=8800::88,nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,udp,nw_src=42.42.42.1,nw_dst=42.42.42.1,tp_dst=2021 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=88.88.88.88,nw_proto=17,NXM_OF_UDP_SRC[[]]=NXM_OF_UDP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
+ table=68, priority=100,ct_label=0x2/0x2,udp6,ipv6_src=4200::1,ipv6_dst=4200::1,tp_dst=2021 actions=load:0x1->NXM_NX_REG10[[7]],learn(table=69,delete_learned,OXM_OF_METADATA[[]],eth_type=0x86dd,NXM_NX_IPV6_SRC[[]],ipv6_dst=8800::88,nw_proto=17,NXM_OF_UDP_SRC[[]]=NXM_OF_UDP_DST[[]],load:0x1->NXM_NX_REG10[[7]])
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=69 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,tcp6,metadata=0x1,ipv6_src=4200::1,ipv6_dst=8800::88,tp_src=4041 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,udp,metadata=0x1,nw_src=42.42.42.1,nw_dst=88.88.88.88,tp_src=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,udp6,metadata=0x1,ipv6_src=4200::1,ipv6_dst=8800::88,tp_src=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
-priority=100,udp6,metadata=0x2,ipv6_src=4200::1,ipv6_dst=8800::88,tp_src=2021 actions=load:0x1->NXM_NX_REG10[[7]]
Numan Siddique e9af135
+AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=69], [0], [dnl
Numan Siddique e9af135
+NXST_FLOW reply (xid=0x8):
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
-AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=70 | grep -v NXST | cut -d ' ' -f8- | sort], [0], [dnl
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=17,ct_tp_dst=4040,udp6,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=17,ct_tp_dst=4040,udp6,metadata=0x2 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=6,ct_tp_dst=8080,tcp6,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
-priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=17,ct_tp_dst=4040,udp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
+AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=70 | ofctl_strip_all | grep -v NXST | sort], [0], [dnl
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=17,ct_tp_dst=4040,udp6,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=17,ct_tp_dst=4040,udp6,metadata=0x2 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_ipv6_dst=8800::88,ct_nw_proto=6,ct_tp_dst=8080,tcp6,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=8800::88))
Numan Siddique e9af135
+ table=70, priority=100,ct_state=+trk+dnat,ct_nw_dst=88.88.88.88,ct_nw_proto=17,ct_tp_dst=4040,udp,metadata=0x1 actions=ct(commit,zone=NXM_NX_REG12[[0..15]],nat(src=88.88.88.88))
Numan Siddique e9af135
 ])
Numan Siddique e9af135
 
Numan Siddique e9af135
 check ovn-nbctl --wait=hv ls-del sw0
Numan Siddique e9af135
 check ovn-nbctl --wait=hv ls-del sw1
Numan Siddique e9af135
 
Numan Siddique e9af135
 OVS_WAIT_UNTIL(
Numan Siddique e9af135
-    [test $(as hv1 ovs-ofctl dump-flows br-int table=68 | grep -v NXST | wc -l) -eq 0]
Numan Siddique e9af135
+    [test $(as hv1 ovs-ofctl dump-flows br-int table=68 | grep -c -v NXST) -eq 0]
Numan Siddique e9af135
 )
Numan Siddique e9af135
 
Numan Siddique e9af135
 OVS_WAIT_UNTIL(
Numan Siddique e9af135
-    [test $(as hv1 ovs-ofctl dump-flows br-int table=69 | grep -v NXST | wc -l) -eq 0]
Numan Siddique e9af135
+    [test $(as hv1 ovs-ofctl dump-flows br-int table=69 | grep -c -v NXST) -eq 0]
Numan Siddique e9af135
 )
Numan Siddique e9af135
 
Numan Siddique e9af135
 OVS_WAIT_UNTIL(
Numan Siddique e9af135
-    [test $(as hv1 ovs-ofctl dump-flows br-int table=70 | grep -v NXST | wc -l) -eq 0]
Numan Siddique e9af135
+    [test $(as hv1 ovs-ofctl dump-flows br-int table=70 | grep -c -v NXST) -eq 0]
Numan Siddique e9af135
 )
Numan Siddique e9af135
 
Numan Siddique e9af135
 OVS_WAIT_UNTIL(
Numan Siddique e9af135
-    [test $(as hv2 ovs-ofctl dump-flows br-int table=68 | grep -v NXST | wc -l) -eq 0]
Numan Siddique e9af135
+    [test $(as hv2 ovs-ofctl dump-flows br-int table=68 | grep -c -v NXST) -eq 0]
Numan Siddique e9af135
 )
Numan Siddique e9af135
 
Numan Siddique e9af135
 OVS_WAIT_UNTIL(
Numan Siddique e9af135
-    [test $(as hv2 ovs-ofctl dump-flows br-int table=69 | grep -v NXST | wc -l) -eq 0]
Numan Siddique e9af135
+    [test $(as hv2 ovs-ofctl dump-flows br-int table=69 | grep -c -v NXST) -eq 0]
Numan Siddique e9af135
 )
Numan Siddique e9af135
 
Numan Siddique e9af135
 OVS_WAIT_UNTIL(
Numan Siddique e9af135
-    [test $(as hv2 ovs-ofctl dump-flows br-int table=70 | grep -v NXST | wc -l) -eq 0]
Numan Siddique e9af135
+    [test $(as hv2 ovs-ofctl dump-flows br-int table=70 | grep -c -v NXST) -eq 0]
Numan Siddique e9af135
 )
Numan Siddique e9af135
 
Numan Siddique e9af135
 OVN_CLEANUP([hv1], [hv2])
Numan Siddique e9af135
-- 
Numan Siddique e9af135
1.8.3.1
Numan Siddique e9af135