DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@amd.com>
To: Junxiao Shi <git@mail1.yoursunny.com>
Cc: dev@dpdk.org, Thomas Monjalon <thomas@monjalon.net>,
	David Marchand <david.marchand@redhat.com>
Subject: Re: [PATCH v2] net/memif: change socket listener owner uid/gid
Date: Thu, 8 Dec 2022 14:29:37 +0000	[thread overview]
Message-ID: <ae71f821-5c55-7aae-f160-e793ff7c8d89@amd.com> (raw)
In-Reply-To: <CANsAqf7RSxonqqXaEC9nSDdde6_L0WnAdY-5WuZnBQWOK9C6xw@mail.gmail.com>

On 12/7/2022 5:48 PM, Junxiao Shi wrote:
> Hi Ferruh
> 
>> On 12/7/2022 2:41 PM, Junxiao Shi wrote:
>> > This allows a DPDK application running with root privilege to create a
>> > memif socket listener with non-root owner uid and gid, which can be
>> > connected from client applications running without root privilege.
>> >
>>
>> Do you have an easy way to test unprivileged memif client?
> 
> This has been tested with NDN-DPDK software.
> https://github.com/usnistgov/ndn-dpdk
> <https://github.com/usnistgov/ndn-dpdk> revision
> 311de078aa4dc3ea28db5f8858e70a1bef7b9ccd
> 

Thanks for the info.

Do you want this project to be included in DPDK web page [1], if so you
can request this in web mail list (web@dpdk.org).

[1]
https://www.dpdk.org/ecosystem/#projects


> The systemd service is running as root and it uses DPDK with the
> owner-uid and owner-gid args.
> The ndndpdk-godemo command is running as unprivileged process.
> Directory /run/ndn still needs to be created by root.
> 
> These commands can perform a full test:
> 
> git clone https://github.com/usnistgov/ndn-dpdk.git
> <https://github.com/usnistgov/ndn-dpdk.git>
> cd ndn-dpdk
> ./docs/ndndpdk-depends.sh --dpdk-patch=26031
> corepack pnpm install
> make
> sudo make install
> sudo dpdk-hugepages.py --setup 8G
> sudo ndndpdk-ctrl systemd start
> jq -n {} | ndndpdk-ctrl activate-forwarder
> sudo mkdir -p /run/ndn
> ndndpdk-godemo pingserver --name /A
> ndndpdk-godemo pingclient --name /A
> 
> You can see packets flowing through.
> Run `ls -l /run/ndn` and check the uid:gid of socket files too.
> 

It is good to record these steps, but for now I will rely on your
testing :), thanks.

> 
>>
>> > Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com
> <mailto:git@mail1.yoursunny.com>>
>>
>> <...>
>>
>> > @@ -1827,47 +1859,58 @@ rte_pmd_memif_probe(struct rte_vdev_device
> *vdev)
>> >       flags |= ETH_MEMIF_FLAG_SOCKET_ABSTRACT;
>> >
>> >       kvlist = rte_kvargs_parse(rte_vdev_device_args(vdev),
> valid_arguments);
>> > +     if (kvlist == NULL) {
>> > +             MIF_LOG(ERR, "Invalid kvargs key");
>> > +             ret = -EINVAL;
>> > +             goto exit;
>> > +     }
>>
>> Thanks Junxiao for updating this, but since it is not really related to
>> this patch, can you please separate it to another patch?
> 
> These are reverted and will be submitted separately in the future.

ack

  reply	other threads:[~2022-12-08 14:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-15 20:44 [RFC PATCH] " Junxiao Shi
2022-11-15 23:53 ` Stephen Hemminger
2022-11-16 13:09 ` [RFC PATCH v2] " Junxiao Shi
2022-11-16 17:04   ` Stephen Hemminger
2022-11-16 17:14 ` [RFC PATCH v3] " Junxiao Shi
2022-11-16 17:14   ` [PATCH] " Junxiao Shi
2022-12-07 14:28     ` Ferruh Yigit
2022-12-07 14:41     ` [PATCH v2] " Junxiao Shi
2022-12-07 15:43       ` Ferruh Yigit
2022-12-07 16:56         ` Ferruh Yigit
2022-12-07 17:48         ` Junxiao Shi
2022-12-08 14:29           ` Ferruh Yigit [this message]
2022-12-07 15:53     ` [PATCH v3] " Junxiao Shi
2022-12-08 16:25       ` Ferruh Yigit
2022-12-08 16:25       ` Ferruh Yigit
2022-11-16 17:52   ` [RFC PATCH " Stephen Hemminger
2022-12-07 11:43   ` Ferruh Yigit

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=ae71f821-5c55-7aae-f160-e793ff7c8d89@amd.com \
    --to=ferruh.yigit@amd.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=git@mail1.yoursunny.com \
    --cc=thomas@monjalon.net \
    /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).