From patchwork Thu Feb 2 07:04:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell Bryant X-Patchwork-Id: 722851 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vDWFT6zDtz9s7C for ; Thu, 2 Feb 2017 18:04:13 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 7CD43B76; Thu, 2 Feb 2017 07:04:12 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id EDBADB6E for ; Thu, 2 Feb 2017 07:04:10 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 7292C90 for ; Thu, 2 Feb 2017 07:04:10 +0000 (UTC) Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F322EC04B928; Thu, 2 Feb 2017 07:04:10 +0000 (UTC) Received: from t460s.redhat.com (ovpn-120-19.rdu2.redhat.com [10.10.120.19] (may be forged)) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1274A8J026370; Thu, 2 Feb 2017 02:04:10 -0500 From: Russell Bryant To: dev@openvswitch.org Date: Thu, 2 Feb 2017 02:04:07 -0500 Message-Id: <20170202070407.18983-1-russell@ovn.org> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 02 Feb 2017 07:04:11 +0000 (UTC) X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH] ovn: Add missing netdev_close in setup_qos. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org 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 Acked-by: Ben Pfaff --- ovn/controller/binding.c | 2 ++ 1 file changed, 2 insertions(+) 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; }