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:06:10 +0200 |
commit | b2b467b3a311d03a8a98434f1e7a575ca7aba874 (patch) | |
tree | 229da18f0a43ee9a097a8738a96e0f21128bb890 | |
parent | 0f30961e0bb8349c98cbf358d7e61dfc0c092f7c (diff) | |
download | openvswitch-b2b467b3a311d03a8a98434f1e7a575ca7aba874.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 80225e9e7..2f829f589 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 |