From patchwork Mon Jul 18 17:00:22 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: 649643 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 3rtTvr3s2gz9s6r for ; Tue, 19 Jul 2016 03:00:56 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 973351097D; Mon, 18 Jul 2016 10:00:44 -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 F2EBC10973 for ; Mon, 18 Jul 2016 10:00:43 -0700 (PDT) Received: from bar6.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id 8439A163081 for ; Mon, 18 Jul 2016 11:00:43 -0600 (MDT) X-ASG-Debug-ID: 1468861243-0b3237543f03650001-byXFYA Received: from mx3-pf1.cudamail.com ([192.168.14.2]) by bar6.cudamail.com with ESMTP id zhhEF2Saems6L6zC (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 18 Jul 2016 11:00:43 -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); 18 Jul 2016 17:00:43 -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-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (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 F3B2463E2C for ; Mon, 18 Jul 2016 17:00:41 +0000 (UTC) Received: from indiana.gru.redhat.com (ovpn-116-31.phx2.redhat.com [10.3.116.31]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u6IH0YQB005099 for ; Mon, 18 Jul 2016 13:00:41 -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-717027449 X-CudaMail-DTE: 071816 X-CudaMail-Originating-IP: 209.132.183.28 Date: Mon, 18 Jul 2016 14:00:22 -0300 X-ASG-Orig-Subj: [##CM-V1-717027449##][RFC 2/5] in-band: don't use system type when opening netdev Message-Id: <1468861225-8569-3-git-send-email-cascardo@redhat.com> In-Reply-To: <1468861225-8569-1-git-send-email-cascardo@redhat.com> References: <1468861225-8569-1-git-send-email-cascardo@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 18 Jul 2016 17:00:42 +0000 (UTC) X-Barracuda-Connect: UNKNOWN[192.168.14.2] X-Barracuda-Start-Time: 1468861243 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] [RFC 2/5] in-band: 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" A netdev might be already opened with a different type and that can be used instead. The system type is already the default type that will be used when there is no netdev opened and the type is not specified. And as long as the opened netdev supports the required operations, it doesn't matter its type. --- ofproto/in-band.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ofproto/in-band.c b/ofproto/in-band.c index e3ee41a..f69e94f 100644 --- a/ofproto/in-band.c +++ b/ofproto/in-band.c @@ -134,7 +134,7 @@ refresh_remote(struct in_band *ib, struct in_band_remote *r) { netdev_close(r->remote_netdev); - retval = netdev_open(next_hop_dev, "system", &r->remote_netdev); + retval = netdev_open(next_hop_dev, NULL, &r->remote_netdev); if (retval) { VLOG_WARN_RL(&rl, "%s: cannot open netdev %s (next hop " "to controller "IP_FMT"): %s",