From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH net-next v2 5/5] netns: enable to dump full nsid translation table Date: Thu, 22 Nov 2018 09:40:17 -0700 Message-ID: References: <20181121110124.5501-1-nicolas.dichtel@6wind.com> <20181122155031.3495-1-nicolas.dichtel@6wind.com> <20181122155031.3495-6-nicolas.dichtel@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, davem@davemloft.net To: Nicolas Dichtel Return-path: Received: from mail-io1-f68.google.com ([209.85.166.68]:33549 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391469AbeKWDU1 (ORCPT ); Thu, 22 Nov 2018 22:20:27 -0500 Received: by mail-io1-f68.google.com with SMTP id t24so1248656ioi.0 for ; Thu, 22 Nov 2018 08:40:19 -0800 (PST) In-Reply-To: <20181122155031.3495-6-nicolas.dichtel@6wind.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 11/22/18 8:50 AM, Nicolas Dichtel wrote: > diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c > index dd25fb22ad45..25030e0317a2 100644 > --- a/net/core/net_namespace.c > +++ b/net/core/net_namespace.c > @@ -745,6 +745,8 @@ struct net_fill_args { > int flags; > int cmd; > int nsid; > + bool add_ref; > + int ref_nsid; > }; > > static int rtnl_net_fill(struct sk_buff *skb, struct net_fill_args *args) > @@ -763,6 +765,10 @@ static int rtnl_net_fill(struct sk_buff *skb, struct net_fill_args *args) > if (nla_put_s32(skb, NETNSA_NSID, args->nsid)) > goto nla_put_failure; > > + if (args->add_ref && > + nla_put_s32(skb, NETNSA_CURRENT_NSID, args->ref_nsid)) > + goto nla_put_failure; > + you need to add NETNSA_CURRENT_NSID to rtnl_net_get_size.