net/ena: fix dev init with multi-process
authorMichal Krawczyk <mk@semihalf.com>
Fri, 25 Jan 2019 08:10:25 +0000 (09:10 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 27 Jan 2019 22:38:37 +0000 (23:38 +0100)
commitfd9768905870856a2340266d25f8c0100dfccfff
treec4b6df6e82aa97c79a8db0dbfa84a275c4487a7b
parent43d9610e4f072ffc321683be816d4746eae8d634
net/ena: fix dev init with multi-process

The check for proc type in eth_ena_dev_init() should appear before
modyfing adapter structure.

Calling memset on ena_adapter from secondary process context, was
erasing all structure information, and it was causing the crash of the
main process.

Fixes: 1173fca25af9 ("ena: add polling-mode driver")
Cc: stable@dpdk.org
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
drivers/net/ena/ena_ethdev.c