Hi,

Yes containers usually do not update /dev after creation, so any device that 
shows up dynamically afterwards won't be available by default. Note this is not 
specific to VPP. To access PCI devices from userspaces you'll need access to 
either /dev/vfio/* or /dev/uio* device nodes depending of the driver.
You have several options:
 1) make sure the device showed up before starting the container so that they 
will be populated
 2) create you container using '-v /dev:/dev' to bind mount /dev: every changes 
in host /dev is visible to container
 3) use mknod to make the device nodes in the container
 4) run udev in your container

Best
ben

> -----Original Message-----
> From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of Jon Loeliger
> via Lists.Fd.Io
> Sent: jeudi 3 octobre 2019 22:27
> To: vpp-dev <vpp-dev@lists.fd.io>
> Cc: vpp-dev@lists.fd.io
> Subject: [vpp-dev] VPP Interfaces from with (Docker) Containers?
> 
> Folks, and maybe Damjan in particular?,
> 
> 
> I am trying to run VPP from within a Docker container using
> the Ligato framework for head-banging.  The head-banging part
> is working.  The VPP interface binding part, not so much.
> 
> From what I can tell, VPP sees the PCI devices, but then grouses
> that the /dev/uio[012] devices are not available.  Indeed, they are
> not visible from the container, but they did get created on the host!
> 
> When starting a 'docker container run', there is a '--device=' option
> that maps host devices into the container, but this isn't useful as the
> devices don't exist before the container (and VPP) get started.
> 
> Seems to me that VPP (DPDK?) needs to maybe make those devices
> within the (net?) namespace of the creating process?  Or maybe
> something more basic?  Insidious?  Clever?
> 
> Any insight?
> 
> Thanks,
> jdl
> 
> PS -- And yeah, no, I'm not sure how the Ligato folks get this to work.
>         This part of the puzzle is not mentioned in any docs that I've
> found,
>         so it is a bit of a puzzlement still.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#14115): https://lists.fd.io/g/vpp-dev/message/14115
Mute This Topic: https://lists.fd.io/mt/34386250/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to