9da667e50c
Initialization must be completed before calling _vdpa_register_device()
since it can connect the device to the vDPA bus, so requests can arrive
after that call.
So for example vdpasim_net_work(), which uses the net->*_stats variables,
can be scheduled before they are initialized.
Let's move _vdpa_register_device() to the end of vdpasim_net_dev_add()
and add a comment to avoid future issues.
Fixes:
|
||
---|---|---|
.. | ||
Makefile | ||
vdpa_sim.c | ||
vdpa_sim.h | ||
vdpa_sim_blk.c | ||
vdpa_sim_net.c |