From patchwork Thu Nov 2 19:04:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Flavio Leitner X-Patchwork-Id: 833502 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3ySZK554sGz9sNc for ; Fri, 3 Nov 2017 06:04:57 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934058AbdKBTEz (ORCPT ); Thu, 2 Nov 2017 15:04:55 -0400 Received: from mail-qt0-f195.google.com ([209.85.216.195]:48644 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932571AbdKBTEy (ORCPT ); Thu, 2 Nov 2017 15:04:54 -0400 Received: by mail-qt0-f195.google.com with SMTP id f8so660085qta.5 for ; Thu, 02 Nov 2017 12:04:54 -0700 (PDT) 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=sBqjpjbzKid0dypzP1z+Z5t+vYQeciHcb24ct+xwWK0=; b=q84z0Xipq2eU1u+Rc3ZAigMTdCh8PFd5kB7Cqa09nG6Bfl+0fsM/DcRJRt+5NJKKGn +jB783RbkUEBarO5v5Hz5rbkIiSC2cRngsbY7zUFrqdTme3tDPATKtFwSLlZ9OYyMDTA 6k3D1lDZmzzhVXlDWVUW7ripyGliuIY/XzTnuK+/zdsoGox0AAYgTbqxCWflg8JyU7u1 bpCipJDq4MBALF2bHu7JfkZDZG+ilx699m1LmFtwApmAMXEQzhrp3kpm3jAbsKUNSC94 BYPreDHoooWJFDJElSk8ng3CicGBjP7plSVvGYUtpDpAvuZfc+xKgAvyEuUI05ALupT0 W8AQ== X-Gm-Message-State: AMCzsaWLr2LjEENAr+DnyJjx5mNpKFmksQUJzMOCQ2wOaGBK3CejFHnW JgthhBWHsn+KTP4KAxaoxF+3DVUDzLM= X-Google-Smtp-Source: ABhQp+SX+sd4E0XCyVxvErZFMMppQgdNOJ11ps+nrOLYXPdXMO3t+Et8SG78LYqk/F2tGJqhgNmwRg== X-Received: by 10.237.62.84 with SMTP id m20mr6734981qtf.82.1509649493556; Thu, 02 Nov 2017 12:04:53 -0700 (PDT) Received: from localhost ([177.40.123.73]) by smtp.gmail.com with ESMTPSA id u65sm2497527qtd.20.2017.11.02.12.04.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Nov 2017 12:04:53 -0700 (PDT) From: Flavio Leitner To: netdev@vger.kernel.org, dev@openvswitch.org Cc: Flavio Leitner Subject: [PATCH net-next 0/3] Allow openvswitch to query ports in another netns. Date: Thu, 2 Nov 2017 17:04:35 -0200 Message-Id: <20171102190438.2583-1-fbl@redhat.com> X-Mailer: git-send-email 2.13.6 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Today Open vSwitch users are moving internal ports to other namespaces and although packets are flowing OK, the userspace daemon can't find out basic information like if the port is UP or DOWN, for instance. This patchset extends openvswitch API to retrieve the current netnsid of a port. It will be used by the userspace daemon to find out in which netns the port is located. This patchset also extends the rtnetlink getlink call to accept and operate on a given netnsid. More details are available in each patch. Jiri Benc (3): net: export peernet2id_alloc openvswitch: reliable interface indentification in port dumps rtnetlink: use netnsid to query interface include/uapi/linux/if_link.h | 1 + include/uapi/linux/openvswitch.h | 2 + net/core/net_namespace.c | 1 + net/core/rtnetlink.c | 103 ++++++++++++++++++++++++++++++++------- net/openvswitch/datapath.c | 47 +++++++++++++----- net/openvswitch/datapath.h | 4 +- net/openvswitch/dp_notify.c | 4 +- 7 files changed, 127 insertions(+), 35 deletions(-)