net/ring: fix device pointer on allocation
authorGaetan Rivet <grive@u256.net>
Wed, 6 May 2020 18:09:49 +0000 (20:09 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 11 May 2020 20:27:39 +0000 (22:27 +0200)
commit8459f5ab32211fb10bbfe388fa0e017475d8507c
tree7b456a07f3f46f2a3405c56cd4d56638cb4e910f
parent53601aefc477ecdfb587ad5dd0bd286ca985c64f
net/ring: fix device pointer on allocation

When a net_ring device is allocated, its device pointer is not set
before calling rte_eth_dev_probing_finish, which is incorrect.

The following:
  commit 96cb19521147 ("net/ring: use EAL APIs in PMD specific API")
  commit a6992e961050 ("net/ring: set ethernet device field")

already fixed the same issue in 17.08, which was fine at the time.
Adding the hook rte_eth_dev_probing_finish() however created this bug,
as the eth_dev exposed when this hook is executed is expected to be
complete.

Remove the prior attempts to fix the issue in rte_pmd_ring_probe() and
write the pointer properly in do_eth_dev_ring_create().

Fixes: fbe90cdd776c ("ethdev: add probing finish function")
Cc: stable@dpdk.org
Signed-off-by: Gaetan Rivet <grive@u256.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/ring/rte_eth_ring.c