From: "Zhang, Helin" <helin.zhang@intel.com>
To: Wenfeng Liu <liuwf@arraynetworks.com.cn>, "dev@dpdk.org" <dev@dpdk.org>
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
Date: Mon, 15 Jun 2015 03:01:32 +0000 [thread overview]
Message-ID: <F35DEAC7BCE34641BA9FAC6BCA4A12E70A881EEE@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <1433137356-8348-1-git-send-email-liuwf@arraynetworks.com.cn>
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
prev parent reply other threads:[~2015-06-15 3:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-01 5:42 Wenfeng Liu
2015-06-15 3:01 ` Zhang, Helin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=F35DEAC7BCE34641BA9FAC6BCA4A12E70A881EEE@SHSMSX104.ccr.corp.intel.com \
--to=helin.zhang@intel.com \
--cc=dev@dpdk.org \
--cc=liuwf@arraynetworks.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).