[ovs-dev] [PATCH 3/3] OVN: use send_event action to report 'empty_lb_rule' events

Ben Pfaff blp at ovn.org
Fri Jul 5 22:33:34 UTC 2019


On Fri, Jun 14, 2019 at 05:53:23PM +0200, Lorenzo Bianconi wrote:
> Add northd logical flows in order to reports that the controller
> received an IP packet for LB rule witn no backends.
> This configuration is used by OpenShift to spin up a idle POD
> 
> Signed-off-by: Mark Michelson <mmichels at redhat.com>
> Co-authored-by: Mark Michelson <mmichels at redhat.com>
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi at redhat.com>

In build_pre_lb(), instead of
            if (controller_event_en && !strlen(node->value)) {
please write
            if (controller_event_en && !node->value[0]) {
to avoid unnecessary work.

You can leave out the "ip &&" clauses because ip4 or ip6 implies them:
+                if (addr_family == AF_INET) {
+                    ds_put_format(&match, "ip && ip4.dst == %s && %s",
+                                  ip_address, lb->protocol);
+                } else {
+                    ds_put_format(&match, "ip && ip6.dst == %s && %s",
+                                  ip_address, lb->protocol);
+                }

Thanks,

Ben.


More information about the dev mailing list