From patchwork Wed Jul 27 15:06:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thadeu Lima de Souza Cascardo X-Patchwork-Id: 653390 X-Patchwork-Delegate: diproiettod@vmware.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3rzyyc0QK1z9t25 for ; Thu, 28 Jul 2016 01:07:19 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 1ADF710E9B; Wed, 27 Jul 2016 08:07:06 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx3v3.cudamail.com (mx3.cudamail.com [64.34.241.5]) by archives.nicira.com (Postfix) with ESMTPS id 8034B10E85 for ; Wed, 27 Jul 2016 08:07:03 -0700 (PDT) Received: from bar6.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id 16A35162770 for ; Wed, 27 Jul 2016 09:07:03 -0600 (MDT) X-ASG-Debug-ID: 1469632022-0b32374773121970001-byXFYA Received: from mx3-pf1.cudamail.com ([192.168.14.2]) by bar6.cudamail.com with ESMTP id 5oBcmVdx6oNztZl7 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 27 Jul 2016 09:07:02 -0600 (MDT) X-Barracuda-Envelope-From: cascardo@redhat.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.2 Received: from unknown (HELO mx1.redhat.com) (209.132.183.28) by mx3-pf1.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 27 Jul 2016 15:07:02 -0000 Received-SPF: pass (mx3-pf1.cudamail.com: SPF record at _spf1.redhat.com designates 209.132.183.28 as permitted sender) X-Barracuda-Apparent-Source-IP: 209.132.183.28 X-Barracuda-RBL-IP: 209.132.183.28 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (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 B90258B137 for ; Wed, 27 Jul 2016 15:07:01 +0000 (UTC) Received: from indiana.gru.redhat.com (ovpn-116-130.phx2.redhat.com [10.3.116.130]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u6RF6rWx020124 for ; Wed, 27 Jul 2016 11:07:01 -0400 X-CudaMail-Envelope-Sender: cascardo@redhat.com From: Thadeu Lima de Souza Cascardo To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-V1-726019264 X-CudaMail-DTE: 072716 X-CudaMail-Originating-IP: 209.132.183.28 Date: Wed, 27 Jul 2016 12:06:43 -0300 X-ASG-Orig-Subj: [##CM-V1-726019264##][PATCH 3/5] netdev-vport: don't use system type when opening netdev Message-Id: <1469632005-16490-4-git-send-email-cascardo@redhat.com> In-Reply-To: <1469632005-16490-1-git-send-email-cascardo@redhat.com> References: <1469632005-16490-1-git-send-email-cascardo@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 27 Jul 2016 15:07:01 +0000 (UTC) X-Barracuda-Connect: UNKNOWN[192.168.14.2] X-Barracuda-Start-Time: 1469632022 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Subject: [ovs-dev] [PATCH 3/5] netdev-vport: don't use system type when opening netdev X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" tunnel_check_status_change__ calls netdev_open with type system. Using NULL instead will default to system in case the device is not opened yet, and allow a different type in case it's already opened. Any type should be fine, as netdev_get_carrier will work with any of them. Signed-off-by: Thadeu Lima de Souza Cascardo --- lib/netdev-vport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c index 83a795c..87a30f8 100644 --- a/lib/netdev-vport.c +++ b/lib/netdev-vport.c @@ -274,7 +274,7 @@ tunnel_check_status_change__(struct netdev_vport *netdev) if (ovs_router_lookup(route, iface, NULL, &gw)) { struct netdev *egress_netdev; - if (!netdev_open(iface, "system", &egress_netdev)) { + if (!netdev_open(iface, NULL, &egress_netdev)) { status = netdev_get_carrier(egress_netdev); netdev_close(egress_netdev); }