reactor: make sure socket_count isn't zero
Avoid division by zero in the event mempool cache size calculation. Change-Id: Ic117ef2dc3a798fb0a57572f1178233e83e73849 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
31b81b0dd6
commit
2b0b705fb1
@ -599,6 +599,10 @@ spdk_reactors_init(const char *mask, unsigned int max_delay_us)
|
||||
socket_count++;
|
||||
}
|
||||
}
|
||||
if (socket_count == 0) {
|
||||
printf("No sockets occupied (internal error)\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (i = 0; i < SPDK_MAX_SOCKET; i++) {
|
||||
if ((1ULL << i) & socket_mask) {
|
||||
|
Loading…
Reference in New Issue
Block a user