Skip to content

Commit

Permalink
[linux] Changing the number of ipcbuckets to 4096 (#213)
Browse files Browse the repository at this point in the history
* [linux] Changing the number of ipcbuckets to 4096

* Update 00DIST
  • Loading branch information
Alienmaster authored May 7, 2022
1 parent 4429782 commit 8db8b11
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions 00CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@ provided test systems where I was able to do development work.
Fabrice Fontaine
Danny Fowler and
Benny "BenBE" Baumann
Robert Geislinger (Alienmaster)

If I have omitted a contributor's name, the fault is wholly mine,
and I apologize for the error.
Expand Down
3 changes: 3 additions & 0 deletions 00DIST
Original file line number Diff line number Diff line change
Expand Up @@ -5343,6 +5343,9 @@ July 14, 2018


[linux] Avoid some easy collissions for udp/udp6 sockets when hashing


[linux] Changing the number of ipcbuckets to 4096


The lsof-org team at GitHub
Expand Down
4 changes: 2 additions & 2 deletions dialects/linux/dsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@
#define TCPUDPHASH(ino) ((int)((ino * 31415) >> 3) & (TcpUdp_bucks - 1))
#define TCPUDP6HASH(ino) ((int)((ino * 31415) >> 3) & (TcpUdp6_bucks - 1))

#define IPCBUCKS 128 /* IPC hash bucket count -- must be
#define IPCBUCKS 4096 /* IPC hash bucket count -- must be
* a power of two */

/* If a socket is used for IPC, we store both end points for the socket
* to the same hash backet. This makes seaching the counter part of
* to the same hash bucket. This makes seaching the counter part of
* an end point easier. See get_netpeeri(). */
#define TCPUDP_IPC_HASH(tp) ((int)(((((tp)->faddr * 0x109 \
+ (tp)->laddr * 0x109 \
Expand Down

0 comments on commit 8db8b11

Please sign in to comment.