07aff471c0
In order to use `ena_global_lock` in sysctl context, it must be kept outside the driver instance's software context, as sysctls can be called before attach and after detach, leading to lock use before sx_init and after sx_destroy otherwise. Solve this issue by turning `ena_global_lock` into a file scope variable, shared between all instances of the driver and associated sysctl context, and in turn initialized/destroyed in dedicated SYSINIT/SYSUNINIT functions. As a side effect, this change also fixes existing race in the reset routine, when simultaneously accessing sysctl exposed properties. Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. |
||
---|---|---|
.. | ||
ena_datapath.c | ||
ena_datapath.h | ||
ena_netmap.c | ||
ena_netmap.h | ||
ena_rss.c | ||
ena_rss.h | ||
ena_sysctl.c | ||
ena_sysctl.h | ||
ena.c | ||
ena.h |