]> git.droids-corp.org - dpdk.git/commit
net/kni: fix config initialization
authorHarold Huang <baymaxhuang@gmail.com>
Thu, 3 Mar 2022 02:18:03 +0000 (10:18 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 3 Mar 2022 11:30:51 +0000 (12:30 +0100)
commitdcd398f9466fc42f09e5c725c3188d8c41bd3fbf
tree0f893c46a3de85ce367fe25d8577a9681396cb76
parentf69467177fa34afaeeeae81ad83142121ee1bc98
net/kni: fix config initialization

When kni driver calls eth_kni_start to start device, some fields such as
min_mtu and max_mtu of rte_kni_conf are not initialized. It will cause
kni_ioctl_create create a kni netdevice with a random min_mtu and
max_mtu value. This is unexpected and sometimes we could not change the
kni device mtu with ip link command.

Fixes: ff1e35fb5f83 ("kni: calculate MTU from mbuf size")
Cc: stable@dpdk.org
Signed-off-by: Harold Huang <baymaxhuang@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/kni/rte_eth_kni.c