diff mbox

[ovs-dev,2/2] ovn-northd: Format logical flows a little better.

Message ID 1473676827-19692-2-git-send-email-guru@ovn.org
State Accepted
Headers show

Commit Message

Gurucharan Shetty Sept. 12, 2016, 10:40 a.m. UTC
This is a cosmetic fix.

Signed-off-by: Gurucharan Shetty <guru@ovn.org>
---
 ovn/northd/ovn-northd.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Comments

Ben Pfaff Sept. 15, 2016, 5:26 p.m. UTC | #1
On Mon, Sep 12, 2016 at 03:40:27AM -0700, Gurucharan Shetty wrote:
> This is a cosmetic fix.
> 
> Signed-off-by: Gurucharan Shetty <guru@ovn.org>

I did not look at the generated flows, I only observe that this is at
worst harmless.

Acked-by: Ben Pfaff <blp@ovn.org>
diff mbox

Patch

diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
index 648bd88..8b6f6a3 100644
--- a/ovn/northd/ovn-northd.c
+++ b/ovn/northd/ovn-northd.c
@@ -2559,9 +2559,9 @@  build_stateful(struct ovn_datapath *od, struct hmap *lflows)
             ds_put_format(&match, "ct.new && ip && ip4.dst == %s", ip_address);
             if (port) {
                 if (lb->protocol && !strcmp(lb->protocol, "udp")) {
-                    ds_put_format(&match, "&& udp && udp.dst == %d", port);
+                    ds_put_format(&match, " && udp && udp.dst == %d", port);
                 } else {
-                    ds_put_format(&match, "&& tcp && tcp.dst == %d", port);
+                    ds_put_format(&match, " && tcp && tcp.dst == %d", port);
                 }
                 ovn_lflow_add(lflows, od, S_SWITCH_IN_STATEFUL,
                               120, ds_cstr(&match), action);
@@ -3663,9 +3663,11 @@  build_lrouter_flows(struct hmap *datapaths, struct hmap *ports,
 
                 if (port) {
                     if (lb->protocol && !strcmp(lb->protocol, "udp")) {
-                        ds_put_format(&match, "&& udp && udp.dst == %d", port);
+                        ds_put_format(&match, " && udp && udp.dst == %d",
+                                      port);
                     } else {
-                        ds_put_format(&match, "&& tcp && tcp.dst == %d", port);
+                        ds_put_format(&match, " && tcp && tcp.dst == %d",
+                                      port);
                     }
                     ovn_lflow_add(lflows, od, S_ROUTER_IN_DNAT,
                                   120, ds_cstr(&match), ds_cstr(&actions));