net/virtio-user: enable multiqueue with kernel vhost
[dpdk.git] / drivers / net / virtio / virtio_user / vhost_kernel_tap.c
index cdb5c3c..f585de8 100644 (file)
@@ -44,7 +44,7 @@
 #include "../virtio_logs.h"
 
 int
-vhost_kernel_open_tap(char **p_ifname, int hdr_size)
+vhost_kernel_open_tap(char **p_ifname, int hdr_size, int req_mq)
 {
        unsigned int tap_features;
        int sndbuf = INT_MAX;
@@ -91,6 +91,9 @@ vhost_kernel_open_tap(char **p_ifname, int hdr_size)
                goto error;
        }
 
+       if (req_mq)
+               ifr.ifr_flags |= IFF_MULTI_QUEUE;
+
        if (*p_ifname)
                strncpy(ifr.ifr_name, *p_ifname, IFNAMSIZ);
        else