<div dir="auto">Hi Ferruh<br>
<br>
> On 12/7/2022 2:41 PM, Junxiao Shi wrote:<br>
> > This allows a DPDK application running with root privilege to create a<br>
> > memif socket listener with non-root owner uid and gid, which can be<br>
> > connected from client applications running without root privilege.<br>
> ><br>
><br>
> Do you have an easy way to test unprivileged memif client?<br>
<br>
This has been tested with NDN-DPDK software.<br>
<a href="https://github.com/usnistgov/ndn-dpdk" rel="noreferrer noreferrer" target="_blank">https://github.com/usnistgov/ndn-dpdk</a> revision 311de078aa4dc3ea28db5f8858e70a1bef7b9ccd<br>
<br>
The systemd service is running as root and it uses DPDK with the owner-uid and owner-gid args.<br>
The ndndpdk-godemo command is running as unprivileged process.<br>
Directory /run/ndn still needs to be created by root.<br>
<br>
These commands can perform a full test:<br>
<br>
git clone <a href="https://github.com/usnistgov/ndn-dpdk.git" rel="noreferrer noreferrer" target="_blank">https://github.com/usnistgov/ndn-dpdk.git</a><br>
cd ndn-dpdk<br>
./docs/ndndpdk-depends.sh --dpdk-patch=26031<br>
corepack pnpm install<br>
make<br>
sudo make install<br>
sudo dpdk-hugepages.py --setup 8G<br>
sudo ndndpdk-ctrl systemd start<br>
jq -n {} | ndndpdk-ctrl activate-forwarder<br>
sudo mkdir -p /run/ndn<br>
ndndpdk-godemo pingserver --name /A<br>
ndndpdk-godemo pingclient --name /A<br>
<br>
You can see packets flowing through.<br>
Run `ls -l /run/ndn` and check the uid:gid of socket files too.<br>
<br>
<br>
><br>
> > Signed-off-by: Junxiao Shi <<a href="mailto:git@mail1.yoursunny.com" target="_blank" rel="noreferrer">git@mail1.yoursunny.com</a>><br>
><br>
> <...><br>
><br>
> > @@ -1827,47 +1859,58 @@ rte_pmd_memif_probe(struct rte_vdev_device *vdev)<br>
> >       flags |= ETH_MEMIF_FLAG_SOCKET_ABSTRACT;<br>
> ><br>
> >       kvlist = rte_kvargs_parse(rte_vdev_device_args(vdev), valid_arguments);<br>
> > +     if (kvlist == NULL) {<br>
> > +             MIF_LOG(ERR, "Invalid kvargs key");<br>
> > +             ret = -EINVAL;<br>
> > +             goto exit;<br>
> > +     }<br>
><br>
> Thanks Junxiao for updating this, but since it is not really related to<br>
> this patch, can you please separate it to another patch?<br>
<br>
These are reverted and will be submitted separately in the future.<br></div>