netisr: fix compilation without VIMAGE
- Don't use bare vnet(4) definitions in the KASSERT, they aren't available
on a kernel without VIMAGE. Just through MPASS() here. This is more of
documenting assertion rather than an assertion that may actually fire on
an unmodified kernel.
- V_netisr_enable is different to the rest of V_ prefixed globals. On a
kernel without VIMAGE it basically doesn't exist, instead of being
present as a single instance.
Fixes: a1be7978f1
This commit is contained in:
+2
-3
@@ -396,8 +396,7 @@ netisr_register(const struct netisr_handler *nhp)
|
||||
* Test that the requested registration is valid.
|
||||
*/
|
||||
CURVNET_ASSERT_SET();
|
||||
KASSERT(IS_DEFAULT_VNET(curvnet), ("%s: curvnet %p is not vnet0 %p",
|
||||
__func__, curvnet, vnet0));
|
||||
MPASS(IS_DEFAULT_VNET(curvnet));
|
||||
KASSERT(nhp->nh_name != NULL,
|
||||
("%s: nh_name NULL for %u", __func__, proto));
|
||||
KASSERT(nhp->nh_handler != NULL,
|
||||
@@ -457,8 +456,8 @@ netisr_register(const struct netisr_handler *nhp)
|
||||
npwp->nw_qlimit = netisr_proto[proto].np_qlimit;
|
||||
}
|
||||
|
||||
V_netisr_enable[proto] = 1;
|
||||
#ifdef VIMAGE
|
||||
V_netisr_enable[proto] = 1;
|
||||
VNET_LIST_RLOCK_NOSLEEP();
|
||||
VNET_FOREACH(vnet_iter) {
|
||||
if (vnet_iter == curvnet)
|
||||
|
||||
Reference in New Issue
Block a user