DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] kni: Passing virtual PID to get_net_ns_by_pid(), so we can create kni interfaces in containers like docker
@ 2015-06-01  5:42 Wenfeng Liu
  2015-06-15  3:01 ` Zhang, Helin
  0 siblings, 1 reply; 2+ messages in thread
From: Wenfeng Liu @ 2015-06-01  5:42 UTC (permalink / raw)
  To: dev

Signed-off-by: Wenfeng Liu <liuwf@arraynetworks.com.cn>
---
 lib/librte_eal/linuxapp/kni/kni_misc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 long ioctl_param)
 		return -EBUSY;
 	}
 
-	net = get_net_ns_by_pid(current->pid);
+	net = 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] kni: Passing virtual PID to get_net_ns_by_pid(), so we can create kni interfaces in containers like docker
  2015-06-01  5:42 [dpdk-dev] [PATCH] kni: Passing virtual PID to get_net_ns_by_pid(), so we can create kni interfaces in containers like docker Wenfeng Liu
@ 2015-06-15  3:01 ` Zhang, Helin
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Helin @ 2015-06-15  3:01 UTC (permalink / raw)
  To: Wenfeng Liu, dev

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 for
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
> 
> Signed-off-by: Wenfeng Liu <liuwf@arraynetworks.com.cn>
> ---
>  lib/librte_eal/linuxapp/kni/kni_misc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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 long
> ioctl_param)
>  		return -EBUSY;
>  	}
> 
> -	net = get_net_ns_by_pid(current->pid);
> +	net = 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-15  3:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-01  5:42 [dpdk-dev] [PATCH] kni: Passing virtual PID to get_net_ns_by_pid(), so we can create kni interfaces in containers like docker Wenfeng Liu
2015-06-15  3:01 ` Zhang, Helin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).