From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH iproute2 1/2] ip: display netns name instead of nsid Date: Mon, 4 Jun 2018 14:12:15 -0700 Message-ID: <20180604141215.0669f05f@xeon-e3> References: <20180531114615.3f10766f@shemminger-XPS-13-9360> <20180604121253.2140-1-nicolas.dichtel@6wind.com> <20180604121253.2140-2-nicolas.dichtel@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org To: Nicolas Dichtel Return-path: Received: from mail-pg0-f54.google.com ([74.125.83.54]:41724 "EHLO mail-pg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751765AbeFDVQE (ORCPT ); Mon, 4 Jun 2018 17:16:04 -0400 Received: by mail-pg0-f54.google.com with SMTP id l65-v6so56924pgl.8 for ; Mon, 04 Jun 2018 14:16:04 -0700 (PDT) In-Reply-To: <20180604121253.2140-2-nicolas.dichtel@6wind.com> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, 4 Jun 2018 14:12:52 +0200 Nicolas Dichtel wrote: > diff --git a/ip/ipaddress.c b/ip/ipaddress.c > index c7c7e7df4e81..aee09c7ff6df 100644 > --- a/ip/ipaddress.c > +++ b/ip/ipaddress.c > @@ -819,6 +819,9 @@ int print_linkinfo(const struct sockaddr_nl *who, > unsigned int m_flag = 0; > SPRINT_BUF(b1); > > + netns_nsid_socket_init(); > + netns_map_init(); > + The idea of printing network namespace is good but I am concerned that setting up yet another netlink socket and scanning the netns directory on each ip link command will impact some users. Can this setup be deferred until the first net ns lookup happens?