From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC223C10F14 for ; Tue, 15 Oct 2019 07:33:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8910D2067B for ; Tue, 15 Oct 2019 07:33:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=6wind.com header.i=@6wind.com header.b="Y+MDRu8Z" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727917AbfJOHd2 (ORCPT ); Tue, 15 Oct 2019 03:33:28 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:35361 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726482AbfJOHd2 (ORCPT ); Tue, 15 Oct 2019 03:33:28 -0400 Received: by mail-wr1-f65.google.com with SMTP id v8so22495594wrt.2 for ; Tue, 15 Oct 2019 00:33:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=reply-to:subject:to:cc:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=8m9w0jPCAFPjczDL2GRxGXdpZcf7m+AcFKjWCmuIm1I=; b=Y+MDRu8ZLPF6bn9sNA7/5PpEzMMDqfi3LQAPfRb8xBk1o1BDTgNl2kMZUdyqH2zUrA EBLwD3WiFHTE+vwtBK+zU0syOd/QoKTOLrstOFeuu++RhY4Wx01djjYd0Ft/5EDmwhvf 1HUOafyrLnwx1zP2chkHC2Me5uK+vHWqwIJrR1G0iWJsYp5I0XunqMXyNKInhDOOFcHz 6DpeVQufcpVm3JBrn3tn2Af2yGdpHXcLspPpyuVGHlQ7uSjI1RKXb3N6wTJcUngjZYH4 EEYr6WO9zkIy5OTRFKaGetj7n89x+25ZqmXkUn2PsmJq0/+9Dfcxq3b25x/zNYbl9rf1 oh8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:to:cc:references:from :organization:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=8m9w0jPCAFPjczDL2GRxGXdpZcf7m+AcFKjWCmuIm1I=; b=c3+8xnWa8LnWEXNg/W67I0F2KlkpZpsCjIngx6ifGRpTaXj7dkh0f4tKX2d58802Xv oC/p3xIybYAzFjBjLXUPaYYcU/NKK6hfWAlPo2TfWWG06T2sm/aRvnHWQPpgX95SdMvO 9o5ac36k8uwqxW43Uq7laSWlRaVz2Pkq5jMAHuzcS8896GaSAeaHjsGNmi9H8NeHNg9a FMHyB0ia/TcACGgrBEvsh1OCZ9/uBXnaHxhec1zi5OWPAxuVQ8LR5RQLrSLaIOy5u6jm PJwh5OaJCwYjwKe44yZZqlVQ1yRwTXr+AfdJU4ErPg+6FNeHXE1AgSIR/Rs9srS6Boa9 gGig== X-Gm-Message-State: APjAAAVX3VmTJFKNYdMiGjwl21lGPr0WqjXnYcrPZwm/uqjK3EakRWw6 zMswup4zFcz3sfXkKSkQElagAw== X-Google-Smtp-Source: APXvYqymJLZxQx34CJRLNXOskevkZF0zDosLMz6/ODwdNiPJ59xW768ghS/tAmmXMyNOLOyuyd9pgw== X-Received: by 2002:a5d:6b03:: with SMTP id v3mr30290423wrw.182.1571124806147; Tue, 15 Oct 2019 00:33:26 -0700 (PDT) Received: from ?IPv6:2a01:e35:8b63:dc30:3db8:f58e:db97:45fa? ([2a01:e35:8b63:dc30:3db8:f58e:db97:45fa]) by smtp.gmail.com with ESMTPSA id l6sm16887580wmg.2.2019.10.15.00.33.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Oct 2019 00:33:25 -0700 (PDT) Reply-To: nicolas.dichtel@6wind.com Subject: Re: [PATCH iproute2] ipnetns: enable to dump nsid conversion table To: Stephen Hemminger Cc: netdev@vger.kernel.org, dsahern@gmail.com, Petr Oros References: <20191007134447.20077-1-nicolas.dichtel@6wind.com> <20191014131500.7dd2b1a8@hermes.lan> From: Nicolas Dichtel Organization: 6WIND Message-ID: <0983aadc-7375-75c7-e8ed-b2f8213e1bca@6wind.com> Date: Tue, 15 Oct 2019 09:33:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191014131500.7dd2b1a8@hermes.lan> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Le 14/10/2019 à 22:15, Stephen Hemminger a écrit : > On Mon, 7 Oct 2019 15:44:47 +0200 > Nicolas Dichtel wrote: > >> This patch enables to dump/get nsid from a netns into another netns. >> >> Example: >> $ ./test.sh >> + ip netns add foo >> + ip netns add bar >> + touch /var/run/netns/init_net >> + mount --bind /proc/1/ns/net /var/run/netns/init_net >> + ip netns set init_net 11 >> + ip netns set foo 12 >> + ip netns set bar 13 >> + ip netns >> init_net (id: 11) >> bar (id: 13) >> foo (id: 12) >> + ip -n foo netns set init_net 21 >> + ip -n foo netns set foo 22 >> + ip -n foo netns set bar 23 >> + ip -n foo netns >> init_net (id: 21) >> bar (id: 23) >> foo (id: 22) >> + ip -n bar netns set init_net 31 >> + ip -n bar netns set foo 32 >> + ip -n bar netns set bar 33 >> + ip -n bar netns >> init_net (id: 31) >> bar (id: 33) >> foo (id: 32) >> + ip netns list-id target-nsid 12 >> nsid 21 current-nsid 11 (iproute2 netns name: init_net) >> nsid 22 current-nsid 12 (iproute2 netns name: foo) >> nsid 23 current-nsid 13 (iproute2 netns name: bar) >> + ip -n foo netns list-id target-nsid 21 >> nsid 11 current-nsid 21 (iproute2 netns name: init_net) >> nsid 12 current-nsid 22 (iproute2 netns name: foo) >> nsid 13 current-nsid 23 (iproute2 netns name: bar) >> + ip -n bar netns list-id target-nsid 33 nsid 32 >> nsid 32 current-nsid 32 (iproute2 netns name: foo) >> + ip -n bar netns list-id target-nsid 31 nsid 32 >> nsid 12 current-nsid 32 (iproute2 netns name: foo) >> + ip netns list-id nsid 13 >> nsid 13 (iproute2 netns name: bar) >> >> CC: Petr Oros >> Signed-off-by: Nicolas Dichtel >> --- >> include/libnetlink.h | 5 +- >> ip/ip_common.h | 1 + >> ip/ipnetns.c | 115 +++++++++++++++++++++++++++++++++++++++++-- >> lib/libnetlink.c | 15 ++++-- >> 4 files changed, 126 insertions(+), 10 deletions(-) >> > > Applied. Please send another patch to update man page. > Yes, I will do. I don't see the patch on kernel.org, am I missing something? Thank you, Nicolas