eal: fix tailq init for uio and vfio resources
authorDavid Marchand <david.marchand@6wind.com>
Wed, 11 Mar 2015 17:25:23 +0000 (18:25 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 12 Mar 2015 07:32:48 +0000 (08:32 +0100)
commitf07246766dee1af3b078b1c23497cac755fdc12c
treef5faea5c931452ebeb23a68d1796f51b028b2b4f
parent0a530f0d58b0304d3f7515bb14f81fd2b6e6931e
eal: fix tailq init for uio and vfio resources

Commit a2348166ea18 ("tailq: move to dynamic tailq") introduced a bug in
uio/vfio resources list init.

These resources list were pointed at through a pointer initialised only once but
too early in the eal init (before tailqs init).

Fix this by "resolving" this pointer when used (which is well after tailqs
init).

Fixes: a2348166ea18 ("tailq: move to dynamic tailq")

Reported-by: Marvin Liu <yong.liu@intel.com>
Reported-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Tested-by: John McNamara <john.mcnamara@intel.com>
Tested-by: Tetsuya Mukawa <mukawa@igel.co.jp>
lib/librte_eal/bsdapp/eal/eal_pci.c
lib/librte_eal/linuxapp/eal/eal_pci.c
lib/librte_eal/linuxapp/eal/eal_pci_init.h
lib/librte_eal/linuxapp/eal/eal_pci_uio.c
lib/librte_eal/linuxapp/eal/eal_pci_vfio.c