Re: [dpdk-dev] [PATCH] kni: reduce interface name size

2019-11-19 Thread David Marchand
On Tue, Nov 19, 2019 at 1:13 PM Ferruh Yigit wrote: > > On 11/15/2019 4:23 PM, Stephen Hemminger wrote: > > On Fri, 15 Nov 2019 12:41:07 +0100 > > Michael Pfeiffer wrote: > > > >> The name in rte_kni_device_info is passed to the kernel, which allows > >> interface names with at most 16 bytes (IFN

Re: [dpdk-dev] [PATCH] kni: reduce interface name size

2019-11-19 Thread Ferruh Yigit
On 11/15/2019 4:23 PM, Stephen Hemminger wrote: > On Fri, 15 Nov 2019 12:41:07 +0100 > Michael Pfeiffer wrote: > >> 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 ke

Re: [dpdk-dev] [PATCH] kni: reduce interface name size

2019-11-15 Thread Stephen Hemminger
On Fri, 15 Nov 2019 12:41:07 +0100 Michael Pfeiffer wrote: > 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

Re: [dpdk-dev] [PATCH] kni: reduce interface name size

2019-11-15 Thread Michael Pfeiffer
Hi Ferruh, On Fri, 2019-11-15 at 12:49 +, Ferruh Yigit wrote: > On 11/15/2019 12:43 PM, Michael Pfeiffer wrote: > > Hi Igor, > > you're right, RTE_KNI_NAMESIZE == IFNAMSIZ is the intention. > > However, > > to my understanding linux/if.h (where IFNAMSIZ is defined) is only > > included when bu

Re: [dpdk-dev] [PATCH] kni: reduce interface name size

2019-11-15 Thread Ferruh Yigit
On 11/15/2019 12:43 PM, Michael Pfeiffer wrote: > Hi Igor, > you're right, RTE_KNI_NAMESIZE == IFNAMSIZ is the intention. However, > to my understanding linux/if.h (where IFNAMSIZ is defined) is only > included when building kernel code. I thought maybe this was > intentional to keep rte_kni_common

Re: [dpdk-dev] [PATCH] kni: reduce interface name size

2019-11-15 Thread Michael Pfeiffer
Hi Igor, you're right, RTE_KNI_NAMESIZE == IFNAMSIZ is the intention. However, to my understanding linux/if.h (where IFNAMSIZ is defined) is only included when building kernel code. I thought maybe this was intentional to keep rte_kni_common.h free of Linux kernel dependencies (when building userla

Re: [dpdk-dev] [PATCH] kni: reduce interface name size

2019-11-15 Thread Ferruh Yigit
On 11/15/2019 12:30 PM, Igor Ryzhov wrote: > Hi Michael, > > Isn't it better to set it to IFNAMSIZ instead of 16? I was thinking same, but "linux/if.h" included only for kernel, so instead of introducing new dependency in user side, perhaps better to keep it as hardcoded value. > > Best regards

Re: [dpdk-dev] [PATCH] kni: reduce interface name size

2019-11-15 Thread Igor Ryzhov
Hi Michael, Isn't it better to set it to IFNAMSIZ instead of 16? Best regards, Igot On Fri, Nov 15, 2019 at 2:41 PM Michael Pfeiffer < michael.pfeif...@tu-ilmenau.de> wrote: > The name in rte_kni_device_info is passed to the kernel, which allows > interface names with at most 16 bytes (IFNAMSIZ

[dpdk-dev] [PATCH] kni: reduce interface name size

2019-11-15 Thread Michael Pfeiffer
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 P