As required by the test plan, the specified code changes were made to lnet/lnet/api-ni.c to print the number of entries in the hash table when LNET starts up, found by looking in dmesg, and to lnet/lnet/router_proc.c to show what hash table entries the given route is assigned when you cat /proc/sys/lnet/routes.
The following unit tests were run and verified locally and manually.
Unit Test 1: Hash Table Default Size – To make sure the default size of the hash table is 64 entries.
- lctl network configure
LNET configured
- dmesg | grep -i "hash table"
LNet: 12124:0:(api-ni.c:227:lnet_create_remote_nets_table()) Hash table entries: 64
Unit Test 2: Hash Table Size For Given Setting – To make sure the module parameter can change the hash table size
- lctl network configure
LNET configured
- dmesg | grep -i "hash table"
LNet: 12188:0:(api-ni.c:227:lnet_create_remote_nets_table()) Hash table entries: 1024
Unit Test 3: Hash Table Distribution – To make sure the hashing algorithm is fairly distributing the entries
- cat /etc/modprobe.d/lustre.conf
options lnet ip2nets="tcp0 192.168.0.*; \
o2ib0(ib0) 132.6.1.[1-59]" \
routes="tcp0 132.6.1.[1-8]@o2ib0; \
o2ib0 192.168.0.[6-7]@tcp0; tcp1 192.168.0.[1-2]@tcp0; \
o2ib1 192.168.0.[16-17]@tcp0; tcp3 192.168.0.[21-22]@tcp0; \
o2ib2 192.168.0.[26-27]@tcp0; tcp4 192.168.0.[31-32]@tcp0; \
o2ib3 192.168.0.[36-37]@tcp0; tcp5 192.168.0.[41-42]@tcp0; \
o2ib4 192.168.0.[46-47]@tcp0; tcp6 192.168.0.[51-52]@tcp0; \
o2ib5 192.168.0.[56-57]@tcp0; tcp7 192.168.0.[61-62]@tcp0; \
o2ib6 192.168.0.[66-67]@tcp0; tcp8 192.168.0.[71-72]@tcp0; \
o2ib7 192.168.0.[76-77]@tcp0; tcp9 192.168.0.[81-82]@tcp0; \
o2ib8 192.168.0.[86-87]@tcp0; tcp10 192.168.0.[91-92]@tcp0; \
tcp2 192.168.0.[11-12]@tcp0;" \
rnet_htable_size=1070
- cat /proc/sys/lnet/routes
Routing disabled
net hops state router
tcp1 1 down 192.168.0.1@tcp (3)
tcp1 1 down 192.168.0.2@tcp (3)
tcp2 1 down 192.168.0.12@tcp (4)
tcp2 1 down 192.168.0.11@tcp (4)
o2ib 1 down 192.168.0.7@tcp (5)
o2ib 1 down 192.168.0.6@tcp (5)
tcp3 1 down 192.168.0.21@tcp (5)
tcp3 1 down 192.168.0.22@tcp (5)
o2ib1 1 down 192.168.0.16@tcp (6)
o2ib1 1 down 192.168.0.17@tcp (6)
tcp4 1 down 192.168.0.32@tcp (6)
tcp4 1 down 192.168.0.31@tcp (6)
o2ib2 1 down 192.168.0.26@tcp (7)
o2ib2 1 down 192.168.0.27@tcp (7)
tcp5 1 down 192.168.0.41@tcp (7)
tcp5 1 down 192.168.0.42@tcp (7)
o2ib3 1 down 192.168.0.37@tcp (8)
o2ib3 1 down 192.168.0.36@tcp (8)
tcp6 1 down 192.168.0.51@tcp (8)
tcp6 1 down 192.168.0.52@tcp (8)
o2ib4 1 down 192.168.0.46@tcp (9)
o2ib4 1 down 192.168.0.47@tcp (9)
tcp7 1 down 192.168.0.61@tcp (9)
tcp7 1 down 192.168.0.62@tcp (9)
o2ib5 1 down 192.168.0.57@tcp (10)
o2ib5 1 down 192.168.0.56@tcp (10)
tcp8 1 down 192.168.0.71@tcp (10)
tcp8 1 down 192.168.0.72@tcp (10)
o2ib6 1 down 192.168.0.66@tcp (11)
o2ib6 1 down 192.168.0.67@tcp (11)
tcp9 1 down 192.168.0.82@tcp (11)
tcp9 1 down 192.168.0.81@tcp (11)
o2ib7 1 down 192.168.0.76@tcp (12)
o2ib7 1 down 192.168.0.77@tcp (12)
tcp10 1 down 192.168.0.92@tcp (12)
tcp10 1 down 192.168.0.91@tcp (12)
o2ib8 1 down 192.168.0.87@tcp (13)
o2ib8 1 down 192.168.0.86@tcp (13)
Landed in 2.4