From: Michael Pfeiffer Date: Fri, 15 Nov 2019 13:03:28 +0000 (+0100) Subject: kni: reduce interface name size X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=b8a0415008a699283e76a23cc2e4c09f02ee118e;p=dpdk.git kni: reduce interface name size The name in rte_kni_device_info is passed to the kernel, which allows interface names with at most 16 bytes (IFNAMSIZ). rte_kni_alloc with a longer name currently trigger a kernel BUG in alloc_netdev_mqs in net/core/dev.c. Reduce RTE_KNI_NAMESIZE to prevent this situation. Signed-off-by: Michael Pfeiffer Acked-by: Ferruh Yigit --- diff --git a/lib/librte_eal/linux/eal/include/rte_kni_common.h b/lib/librte_eal/linux/eal/include/rte_kni_common.h index 2427a965c8..7313ef504e 100644 --- a/lib/librte_eal/linux/eal/include/rte_kni_common.h +++ b/lib/librte_eal/linux/eal/include/rte_kni_common.h @@ -15,10 +15,10 @@ #include #endif -/** - * KNI name is part of memzone name. +/* + * KNI name is part of memzone name. Must not exceed IFNAMSIZ. */ -#define RTE_KNI_NAMESIZE 32 +#define RTE_KNI_NAMESIZE 16 #define RTE_CACHE_LINE_MIN_SIZE 64