[ovs-dev] [PATCH RFC v2 1/1] netdev-dpdk: add dpdk vhost-user ports

Flavio Leitner fbl at sysclose.org
Fri Apr 24 13:01:36 UTC 2015


On Fri, 24 Apr 2015 14:17:17 +0300
Panu Matilainen <pmatilai at redhat.com> wrote:

> Hi,
> 
> A few comments inline...
> 
> On 04/21/2015 01:10 PM, Ciara Loftus wrote:
> > This patch adds support for a new port type to the userspace
> > datapath called dpdkvhostuser. It adds to the existing
> > infrastructure of vhost-cuse, however disables vhost-cuse ports
> > as the default port type, in favour of vhost-user ports. Refer
> > to the documentation for enabling vhost-cuse ports if desired.
> >
> > A new dpdkvhostuser port will create a unix domain socket which
> > when provided to QEMU is used to facilitate communication between
> > the virtio-net device on the VM and the OVS port on the host.
> >
> > Signed-off-by: Ciara Loftus <ciara.loftus at intel.com>
[...]

> > diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
> > index f69154b..deb8b83 100644
> > --- a/lib/netdev-dpdk.c
> > +++ b/lib/netdev-dpdk.c
> > @@ -101,8 +101,13 @@ BUILD_ASSERT_DECL((MAX_NB_MBUF /
> > ROUND_DOWN_POW2(MAX_NB_MBUF/MIN_NB_MBUF))
> >
> >   #define MAX_PKT_BURST 32           /* Max burst size for RX/TX */
> >
> > +#ifdef VHOST_CUSE
> >   /* Character device cuse_dev_name. */
> >   char *cuse_dev_name = NULL;
> > +#else
> > +#define VHOST_USER_PORT_SOCK_PATH "/tmp/%s" /* Socket Location
> > Template */
> 
> Using /tmp for these seems like asking for trouble to me, how about 
> somewhere /var/run? At least it should be configurable via cli,
> similar to the cuse device name.

Why using /tmp would be problematic?

Anyway, systemd has the RunTimeDirectory= option to make sure the
private directory is created (under /run) when the service is
started and that's the default RPM %{_rundir} where the sock.db, .pid
files and other OVS files are created. It seems you could get the right
path using ovs_rundir().

fbl




More information about the dev mailing list