kni: fix build with kernel 3.17
authorAaro Koskinen <aaro.koskinen@nsn.com>
Mon, 18 Aug 2014 12:44:59 +0000 (15:44 +0300)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 29 Aug 2014 14:18:25 +0000 (16:18 +0200)
Since Linux commit "set name_assign_type in alloc_netdev" (c835a677331495),
the function alloc_netdev takes a new parameter (name_assign_type)
whose default value is NET_NAME_UNKNOWN.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nsn.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
lib/librte_eal/linuxapp/kni/kni_misc.c

index 1c085d9..ba77776 100644 (file)
@@ -345,6 +345,9 @@ kni_ioctl_create(unsigned int ioctl_num, unsigned long ioctl_param)
        up_read(&kni_list_lock);
 
        net_dev = alloc_netdev(sizeof(struct kni_dev), dev_info.name,
+#ifdef NET_NAME_UNKNOWN
+                                                       NET_NAME_UNKNOWN,
+#endif
                                                        kni_net_init);
        if (net_dev == NULL) {
                KNI_ERR("error allocating device \"%s\"\n", dev_info.name);