From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id E2A855A52 for ; Mon, 15 Jun 2015 05:01:54 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 14 Jun 2015 20:01:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,615,1427785200"; d="scan'208";a="727338331" Received: from kmsmsx151.gar.corp.intel.com ([172.21.73.86]) by fmsmga001.fm.intel.com with ESMTP; 14 Jun 2015 20:01:52 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by KMSMSX151.gar.corp.intel.com (172.21.73.86) with Microsoft SMTP Server (TLS) id 14.3.224.2; Mon, 15 Jun 2015 11:01:34 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.129]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.146]) with mapi id 14.03.0224.002; Mon, 15 Jun 2015 11:01:32 +0800 From: "Zhang, Helin" To: Wenfeng Liu , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] kni: Passing virtual PID to get_net_ns_by_pid(), so we can create kni interfaces in containers like docker Thread-Index: AQHQnC3sb6UKy872SUCBMKiLUiLGD52s9gSg Date: Mon, 15 Jun 2015 03:01:32 +0000 Message-ID: References: <1433137356-8348-1-git-send-email-liuwf@arraynetworks.com.cn> In-Reply-To: <1433137356-8348-1-git-send-email-liuwf@arraynetworks.com.cn> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] kni: Passing virtual PID to get_net_ns_by_pid(), so we can create kni interfaces in containers like docker X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2015 03:01:55 -0000 Hi Wenfeng It would be better to describe why 'current->pid' cannot, while 'task_pid_vnr(current)' can be used in containers. In addition, the title should be brief, and there should be a commit log fo= r the detailed description. Thanks, Helin > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wenfeng Liu > Sent: Monday, June 1, 2015 1:43 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH] kni: Passing virtual PID to get_net_ns_by_pid= (), so > we can create kni interfaces in containers like docker >=20 > Signed-off-by: Wenfeng Liu > --- > lib/librte_eal/linuxapp/kni/kni_misc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/lib/librte_eal/linuxapp/kni/kni_misc.c > b/lib/librte_eal/linuxapp/kni/kni_misc.c > index 1935d32..18fb677 100644 > --- a/lib/librte_eal/linuxapp/kni/kni_misc.c > +++ b/lib/librte_eal/linuxapp/kni/kni_misc.c > @@ -359,7 +359,7 @@ kni_ioctl_create(unsigned int ioctl_num, unsigned lon= g > ioctl_param) > return -EBUSY; > } >=20 > - net =3D get_net_ns_by_pid(current->pid); > + net =3D get_net_ns_by_pid(task_pid_vnr(current)); > if (IS_ERR(net)) { > free_netdev(net_dev); > return PTR_ERR(net); > -- > 1.8.3.1