From 0ab95e82c14f7bc4d6270e1c97d6c55b30fabf9b Mon Sep 17 00:00:00 2001 From: Aaro Koskinen Date: Mon, 18 Aug 2014 15:44:59 +0300 Subject: [PATCH] kni: fix build with kernel 3.17 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 Acked-by: Thomas Monjalon --- lib/librte_eal/linuxapp/kni/kni_misc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/librte_eal/linuxapp/kni/kni_misc.c b/lib/librte_eal/linuxapp/kni/kni_misc.c index 1c085d93cb..ba77776dde 100644 --- a/lib/librte_eal/linuxapp/kni/kni_misc.c +++ b/lib/librte_eal/linuxapp/kni/kni_misc.c @@ -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); -- 2.20.1