On 3/27/23 04:40, Adrian Moreno wrote:
Ensure at least 1 handler is created even if something goes wrong during
cpu detection or prime numer calculation.
Thanks Adrian for the fix. This should have been in my initial patch
series as it serves as a nice catch-all in case anything (such as this
case) goes wrong
Fixes: a5cacea5f988 ("handlers: Create additional handler threads when using CPU
isolation.")
Cc: [email protected]
Suggested-by: Aaron Conole <[email protected]>
Signed-off-by: Adrian Moreno <[email protected]>
Acked-by: Michael Santana <[email protected]>
---
lib/dpif-netlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c
index 7875e573e..ebe7b5cb1 100644
--- a/lib/dpif-netlink.c
+++ b/lib/dpif-netlink.c
@@ -2582,7 +2582,7 @@ dpif_netlink_calculate_n_handlers(void)
n_handlers = MIN(next_prime_num, total_cores);
}
- return n_handlers;
+ return MAX(n_handlers, 1);
}
static int
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev