From patchwork Fri Feb 17 11:10:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alin Serdean X-Patchwork-Id: 729150 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 3vPr0s4CVqz9s85 for ; Fri, 17 Feb 2017 22:10:37 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 701AEB55; Fri, 17 Feb 2017 11:10:33 +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 1AA1B8A1 for ; Fri, 17 Feb 2017 11:10:31 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.cloudbasesolutions.com (mail.cloudbasesolutions.com [91.232.152.5]) by smtp1.linuxfoundation.org (Postfix) with ESMTP id 7CCC1106 for ; Fri, 17 Feb 2017 11:10:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.cloudbasesolutions.com (Postfix) with ESMTP id 7B02A41C72 for ; Fri, 17 Feb 2017 13:10:29 +0200 (EET) X-Virus-Scanned: amavisd-new at cloudbasesolutions.com Received: from mail.cloudbasesolutions.com ([127.0.0.1]) by localhost (mail.cloudbasesolutions.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DPII-SmCi3U7 for ; Fri, 17 Feb 2017 13:10:28 +0200 (EET) Received: from mail.cloudbasesolutions.com (unknown [10.77.78.3]) by mail.cloudbasesolutions.com (Postfix) with ESMTP id E4F8A3FC5C for ; Fri, 17 Feb 2017 13:10:28 +0200 (EET) Received: from CBSEX1.cloudbase.local ([10.77.78.3]) by CBSEX1.cloudbase.local ([10.77.78.3]) with mapi id 14.03.0319.002; Fri, 17 Feb 2017 12:10:28 +0100 From: Alin Serdean To: "dev@openvswitch.org" Thread-Topic: [PATCH] windows: Broken internal netdevs Thread-Index: AQHSiQ5xvZqFSUMDyEei9icR0jYihA== Date: Fri, 17 Feb 2017 11:10:27 +0000 Message-ID: <20170217111010.12064-1-aserdean@cloudbasesolutions.com> Accept-Language: en-US, it-IT Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.77.78.1] MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD 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] windows: Broken internal netdevs 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: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Commit fa07525f9cf3fa698ebc23ea09da477d3d881a87 fixed error logging for for regular netdevs, however it overlooked "internal" netdevs. This patch allows "internal" netdev objects to be created and passed to dpif_port_add(). Reported-by: Nithin Raju Signed-off-by: Alin Gabriel Serdean --- Intended for branch-2.5,branch-2.6,branch-2.7,master --- lib/netdev-windows.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/netdev-windows.c b/lib/netdev-windows.c index b22bd09..375cb32 100644 --- a/lib/netdev-windows.c +++ b/lib/netdev-windows.c @@ -159,7 +159,10 @@ netdev_windows_system_construct(struct netdev *netdev_) /* Query the attributes and runtime status of the netdev. */ ret = query_netdev(netdev_get_name(&netdev->up), &info, &buf); - if (ret) { + /* "Internal" netdevs do not exist in the kernel yet. They need to be + * transformed into a netdev object and passed to dpif_port_add(), which + * will add them to the kernel. */ + if (strcmp(netdev_get_type(&netdev->up), "internal") && ret) { return ret; } ofpbuf_delete(buf);