[PATCH 2/2] socket: increase number of opened ports per application

Julien Courtat julien.courtat at 6wind.com
Thu Jun 4 08:07:17 PDT 2015


Decrease number of bits allocated to pid in port bitfield has the
consequence to increase maximum number of ports opened per application.
As a consequence, used_port_map[] table size is increased
accordingly.

Signed-off-by: Julien Courtat <julien.courtat at 6wind.com>
---
 include/netlink-private/socket.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/netlink-private/socket.h b/include/netlink-private/socket.h
index 62c7d4b..6c374cc 100644
--- a/include/netlink-private/socket.h
+++ b/include/netlink-private/socket.h
@@ -18,7 +18,7 @@
 extern "C" {
 #endif
 
-#define NL_BITS_FOR_PID 22
+#define NL_BITS_FOR_PID 18
 /* there are 32 - NL_BITS_FOR_PID left for the port id per application,
  * divided by 32 (>>5) to get used_port_map max table size */
 #define NL_MAX_USED_PORT (1 << (32 - NL_BITS_FOR_PID - 5))
-- 
1.7.10.4




More information about the libnl mailing list