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

David Marchand david.marchand at redhat.com
Tue Nov 19 21:58:51 CET 2019


On Tue, Nov 19, 2019 at 1:13 PM Ferruh Yigit <ferruh.yigit at intel.com> wrote:
>
> 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.

We can still revisit this later.
I will go and apply the acked v2 https://patchwork.dpdk.org/patch/63042/


-- 
David Marchand



More information about the dev mailing list