diff mbox

[ovs-dev] ovn: Add missing netdev_close in setup_qos.

Message ID 20170202070407.18983-1-russell@ovn.org
State Accepted
Headers show

Commit Message

Russell Bryant Feb. 2, 2017, 7:04 a.m. UTC
We missed calling netdev_close in a couple of places.  One was in an error
condition rarely hit.  The second was just introduced and would be hit in
all cases where QoS is not in use.

Fixes: dc2dab6e6de5 ("ovn-controller: Configure interface QoS only if it would actually be used.")
Signed-off-by: Russell Bryant <russell@ovn.org>
---
 ovn/controller/binding.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Ben Pfaff Feb. 2, 2017, 5:41 p.m. UTC | #1
On Thu, Feb 02, 2017 at 02:04:07AM -0500, Russell Bryant wrote:
> We missed calling netdev_close in a couple of places.  One was in an error
> condition rarely hit.  The second was just introduced and would be hit in
> all cases where QoS is not in use.
> 
> Fixes: dc2dab6e6de5 ("ovn-controller: Configure interface QoS only if it would actually be used.")
> Signed-off-by: Russell Bryant <russell@ovn.org>

Thank you!

Acked-by: Ben Pfaff <blp@ovn.org>
Russell Bryant Feb. 3, 2017, 5:44 p.m. UTC | #2
On Thu, Feb 2, 2017 at 12:41 PM, Ben Pfaff <blp@ovn.org> wrote:

> On Thu, Feb 02, 2017 at 02:04:07AM -0500, Russell Bryant wrote:
> > We missed calling netdev_close in a couple of places.  One was in an
> error
> > condition rarely hit.  The second was just introduced and would be hit in
> > all cases where QoS is not in use.
> >
> > Fixes: dc2dab6e6de5 ("ovn-controller: Configure interface QoS only if it
> would actually be used.")
> > Signed-off-by: Russell Bryant <russell@ovn.org>
>
> Thank you!
>
> Acked-by: Ben Pfaff <blp@ovn.org>
>

Thanks, applied to master and branch-2.7.
diff mbox

Patch

diff --git a/ovn/controller/binding.c b/ovn/controller/binding.c
index 2d2da16..c90cb65 100644
--- a/ovn/controller/binding.c
+++ b/ovn/controller/binding.c
@@ -263,6 +263,7 @@  setup_qos(const char *egress_iface, struct hmap *queue_map)
     if (netdev_get_qos(netdev_phy, &qdisc_type, &qdisc_details) != 0 ||
         qdisc_type[0] == '\0') {
         smap_destroy(&qdisc_details);
+        netdev_close(netdev_phy);
         /* Qos is not supported. */
         return;
     }
@@ -286,6 +287,7 @@  setup_qos(const char *egress_iface, struct hmap *queue_map)
         if (!strcmp(qdisc_type, OVN_QOS_TYPE)) {
             set_qos_type(netdev_phy, "");
         }
+        netdev_close(netdev_phy);
         return;
     }