[dpdk-dev] [PATCH] kni: reduce interface name size
Ferruh Yigit
ferruh.yigit at intel.com
Tue Nov 19 13:13:48 CET 2019
On 11/15/2019 4:23 PM, Stephen Hemminger wrote:
> On Fri, 15 Nov 2019 12:41:07 +0100
> Michael Pfeiffer <michael.pfeiffer at 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). 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 <michael.pfeiffer at tu-ilmenau.de>
>
> Why not kill the NAMESIZE define in KNI and use the kernel one.
>
As mentioned in the thread, userspace doesn't know NAMESIZE, only kernel module
does, because "linux/if.h" is only included by kernel module.
I don't know if will there be any side affect of including relevant header and
creating this dependency to the userspace, but I am not for taking that chance
for this benefit, the comment already clarifies the value and it is not
something that will change.
More information about the dev
mailing list