ethdev: fix port probing notification
authorThomas Monjalon <thomas@monjalon.net>
Thu, 10 May 2018 23:58:34 +0000 (01:58 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 14 May 2018 21:31:53 +0000 (22:31 +0100)
commitbe8cd210379af4f79c225963a5831975e917a6aa
treea6fc083a3f382dd41943c95bbe1fd7c95ac460d4
parente06227e2fa234f056227fb74beedc51f503ebac9
ethdev: fix port probing notification

The new device was notified as soon as it was allocated.
It leads to use a device which is not yet initialized.

The notification must be published after the initialization is done
by the PMD, but before the state is changed, in order to let
notified entities taking ownership before general availability.

Fixes: 29aa41e36de7 ("ethdev: add notifications for probing and removal")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
lib/librte_ethdev/rte_ethdev.c
lib/librte_ethdev/rte_ethdev_driver.h