diff options
author | Adrian Moreno <amorenoz@redhat.com> | 2023-03-27 10:40:10 +0200 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2023-03-27 22:04:40 +0200 |
commit | 79f936744916cfbc6952308d33012c994eb274de (patch) | |
tree | a7b24e39d93be9d48b09e84c8e78d4e48b13051f | |
parent | d53ee36aa6e8c309adb0b26b80fafa5d7eb3996a (diff) | |
download | openvswitch-79f936744916cfbc6952308d33012c994eb274de.tar.gz |
dpif-netlink: Always create at least 1 handler.
Ensure at least 1 handler is created even if something goes wrong during
cpu detection or prime numer calculation.
Fixes: a5cacea5f988 ("handlers: Create additional handler threads when using CPU isolation.")
Suggested-by: Aaron Conole <aconole@redhat.com>
Acked-by: Mike Pattrick <mkp@redhat.com>
Acked-by: Michael Santana <msantana@redhat.com>
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
-rw-r--r-- | lib/dpif-netlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 |