40 lines
1.1 KiB
Diff
40 lines
1.1 KiB
Diff
From 2fdfbc218be09a6335df8dde15498f75fa12bc0a Mon Sep 17 00:00:00 2001
|
|
From: liuchao <liuchao173@huawei.com>
|
|
Date: Thu, 6 Feb 2020 06:44:51 +0000
|
|
Subject: [PATCH] feature: enable irqbalance to link with multiple clients at
|
|
the same time
|
|
|
|
---
|
|
irqbalance.c | 2 +-
|
|
irqbalance.h | 1 +
|
|
2 files changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/irqbalance.c b/irqbalance.c
|
|
index 368233f..f0a4164 100644
|
|
--- a/irqbalance.c
|
|
+++ b/irqbalance.c
|
|
@@ -608,7 +608,7 @@ int init_socket()
|
|
log(TO_ALL, LOG_WARNING, "Unable to set socket options.\n");
|
|
return 1;
|
|
}
|
|
- listen(socket_fd, 1);
|
|
+ listen(socket_fd, MAX_CLIENT_NUM);
|
|
g_unix_fd_add(socket_fd, G_IO_IN, sock_handle, NULL);
|
|
return 0;
|
|
}
|
|
diff --git a/irqbalance.h b/irqbalance.h
|
|
index fba8a1b..8662741 100644
|
|
--- a/irqbalance.h
|
|
+++ b/irqbalance.h
|
|
@@ -174,6 +174,7 @@ extern unsigned int log_mask;
|
|
|
|
#define SOCKET_PATH "irqbalance"
|
|
#define SOCKET_TMPFS "/run/irqbalance"
|
|
+#define MAX_CLIENT_NUM 32
|
|
|
|
extern int process_one_line(char *path, void (*cb)(char *line, void *data), void *data);
|
|
extern void get_mask_from_bitmap(char *line, void *mask);
|
|
--
|
|
2.23.0
|
|
|