From patchwork Thu Dec 13 14:24:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Flavio Leitner X-Patchwork-Id: 1012880 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com 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 43Fwxb4ZGtz9s4s for ; Fri, 14 Dec 2018 01:27:31 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 9FD1910D2; Thu, 13 Dec 2018 14:25:15 +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 419D510A3 for ; Thu, 13 Dec 2018 14:25:14 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-qt1-f195.google.com (mail-qt1-f195.google.com [209.85.160.195]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id E2E11829 for ; Thu, 13 Dec 2018 14:25:13 +0000 (UTC) Received: by mail-qt1-f195.google.com with SMTP id l12so387493qtf.8 for ; Thu, 13 Dec 2018 06:25:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=BAMEN4ZRml7ybbXEB9JUZIYAP4gWAc5KTOwGgtOzRmE=; b=tY++H5BleKkz2Ae1e03ONnuXvaYrzUudT25hdqYG7l3Xz4p9ocw+AYh7P0pwtr21Li jq69rsCvvHz+dCn5HgzsWzfpLA627mWa/H2xbaSTiEkk1S3p8FGYe0UR+r3G6OKJxobB InMDeiKB+pGbn9TUM+paEZQGRXG3PsNYpnY1gvlngi4L0peZjKtej2vk63Xa4MRffVgr 2ceoPT/rv/0WHF/5xFskc82V4pr2zxikPQKKnTc3r6Msi2IOlNjP+PS1ZGaU5apz+MNt RkQGZoSSd8DuTJA4akmCEb6YYLqip26fV0WL0P/avvq36gRPiSS9nFU4fqaOD/JTEQ+W VqBQ== X-Gm-Message-State: AA+aEWakXyiWpuPA6OF+cPhD+eIdNoNijCD3VfK3E/d+1+DwDiATtziU 8pJGDU3E4fKAGxqDFUShhe0499ngG7s= X-Google-Smtp-Source: AFSGD/W7oqyx1Sc2jsarZ25I44iiw7USF7EkniTIo4VN3XIeFlHnnOzbwdThVqL5CiAEz7/071ALsw== X-Received: by 2002:aed:24c2:: with SMTP id u2mr23595188qtc.230.1544711112868; Thu, 13 Dec 2018 06:25:12 -0800 (PST) Received: from localhost ([177.183.214.253]) by smtp.gmail.com with ESMTPSA id j95sm1103317qtb.74.2018.12.13.06.25.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Dec 2018 06:25:12 -0800 (PST) From: Flavio Leitner To: dev@openvswitch.org Date: Thu, 13 Dec 2018 12:24:45 -0200 Message-Id: <20181213142448.8504-1-fbl@redhat.com> X-Mailer: git-send-email 2.17.2 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Guru Shetty , Flavio Leitner Subject: [ovs-dev] [PATCH 0/3] revert port duplicate checking optimization 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 The optimization introduced a regression in OSP environments using internal ports in other netns. Their networking configuration is lost when the service is restarted because the ports are recreated now. Before the patch it checked using netlink if the port with a specific "name" was already there. The check is a lookup in all ports attached to the DP regardless of the port's netns. After the patch it relies on the kernel to identify that situation. Unfortunately the only protection there is register_netdevice() which fails only if the port with that name exists in the current netns. If the port is in another netns, it will get a new dp_port and because of that userspace will delete the old port. At this point the original port is gone from the other netns and there a fresh port in the current netns. This patchset reverts the original commit and the two other follow ups. Flavio Leitner (3): Revert "dpif-netlink: Don't destroy and recreate port if it exists" Revert "ofproto-dpif: Check for EBUSY as well" Revert "ofproto-dpif: Let the dpif report when a port is a duplicate." lib/dpif-netlink.c | 4 ++-- lib/dpif.c | 9 ++------- ofproto/ofproto-dpif.c | 7 ++++--- 3 files changed, 8 insertions(+), 12 deletions(-)