Whamcloud - gitweb
LU-12152 lnet: Cleanup lnet_get_rtr_pool_cfg 91/34591/5
authorChris Horn <hornc@cray.com>
Thu, 4 Apr 2019 02:40:58 +0000 (21:40 -0500)
committerOleg Drokin <green@whamcloud.com>
Tue, 30 Apr 2019 03:35:32 +0000 (03:35 +0000)
commit187117fd94e4904c168de02fc439b41a1fcc3e48
treec99258ac24bfa741d33173136cb8fe85854f5fb9
parent3d43658fc36e5821d8b094c1c2365e9520dbe9fe
LU-12152 lnet: Cleanup lnet_get_rtr_pool_cfg

The cfs_percpt_for_each loop contains an off-by-one error that causes
memory corruption. In addition, the way these loops are nested results
in unnecessary iterations. We only need to iterate through the cpts
until we match the cpt number passed as an argument. At that point we
want to copy the router buffer pools for that cpt.

Cray-bug-id: LUS-7240
Test-Parameters: trivial
Signed-off-by: Chris Horn <hornc@cray.com>
Change-Id: I8c0dc7bab7ca42dbce04a9e6efa4343da4139239
Reviewed-on: https://review.whamcloud.com/34591
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Jenkins
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/lnet/router.c