From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 5EE87C3B6 for ; Wed, 17 Jun 2015 07:51:17 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP; 16 Jun 2015 22:51:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,630,1427785200"; d="scan'208";a="589333418" Received: from pgsmsx101.gar.corp.intel.com ([10.221.44.78]) by orsmga003.jf.intel.com with ESMTP; 16 Jun 2015 22:51:15 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by PGSMSX101.gar.corp.intel.com (10.221.44.78) with Microsoft SMTP Server (TLS) id 14.3.224.2; Wed, 17 Jun 2015 13:51:14 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.129]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.246]) with mapi id 14.03.0224.002; Wed, 17 Jun 2015 13:51:13 +0800 From: "Zhang, Helin" To: Wenfeng Liu Thread-Topic: [PATCH] kni: Passing task_pid_vnr(current) to get_net_ns_by_pid() in kni_ioctl_create() Thread-Index: AQHQpyED7TxdXZ0E4EyEmKchsiCJ7J2wNL1Q Date: Wed, 17 Jun 2015 05:51:12 +0000 Message-ID: References: <1434341253-3227-1-git-send-email-liuwf@arraynetworks.com.cn> In-Reply-To: <1434341253-3227-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 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] kni: Passing task_pid_vnr(current) to get_net_ns_by_pid() in kni_ioctl_create() 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: Wed, 17 Jun 2015 05:51:17 -0000 > -----Original Message----- > From: Wenfeng Liu [mailto:liuwf@arraynetworks.com.cn] > Sent: Monday, June 15, 2015 12:08 PM > To: Zhang, Helin; dev@dpdk.org > Subject: [PATCH] kni: Passing task_pid_vnr(current) to get_net_ns_by_pid(= ) in > kni_ioctl_create() >=20 > In containers like docker, current->pid returns current process's global = PID > instead of its own PID under containers's PID namespace, and > get_net_ns_by_pid() suppose to accept a virtual PID under its own namespa= ce, > so we should use task_pid_vnr(current) to get current process's virtual P= ID > instead of current->pid. >=20 > Signed-off-by: Wenfeng Liu Acked-by: Helin Zhang