The multirail changes moved several parameters in struct lnet_ni
to the new data structure called struct lnet_net. This patch
updates the Gemini driver to handle the API changes.
Test-Parameters: trivial
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Change-Id: I75830c570ed56c5b1b665115e8ac96a733a7e57e
Reviewed-on: https://review.whamcloud.com/21192
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Amir Shehata <amir.shehata@intel.com>
Reviewed-on: https://review.whamcloud.com/25122
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Olaf Weber <olaf@sgi.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
INIT_LIST_HEAD(&net->gnn_list);
ni->ni_data = net;
net->gnn_ni = ni;
INIT_LIST_HEAD(&net->gnn_list);
ni->ni_data = net;
net->gnn_ni = ni;
- ni->ni_maxtxcredits = *kgnilnd_tunables.kgn_credits;
- ni->ni_peertxcredits = *kgnilnd_tunables.kgn_peer_credits;
+ if (!ni->ni_net->net_tunables_set) {
+ ni->ni_net->net_tunables.lct_max_tx_credits =
+ *kgnilnd_tunables.kgn_credits;
+ ni->ni_net->net_tunables.lct_peer_tx_credits =
+ *kgnilnd_tunables.kgn_peer_credits;
+ }
if (*kgnilnd_tunables.kgn_peer_health) {
int fudge;
if (*kgnilnd_tunables.kgn_peer_health) {
int fudge;
fudge = (GNILND_TO2KA(*kgnilnd_tunables.kgn_timeout) / GNILND_REAPER_NCHECKS);
timeout = *kgnilnd_tunables.kgn_timeout + fudge;
fudge = (GNILND_TO2KA(*kgnilnd_tunables.kgn_timeout) / GNILND_REAPER_NCHECKS);
timeout = *kgnilnd_tunables.kgn_timeout + fudge;
- if (*kgnilnd_tunables.kgn_peer_timeout >= timeout)
- ni->ni_peertimeout = *kgnilnd_tunables.kgn_peer_timeout;
- else if (*kgnilnd_tunables.kgn_peer_timeout > -1) {
+ if (*kgnilnd_tunables.kgn_peer_timeout >= timeout) {
+ ni->ni_net->net_tunables.lct_peer_timeout =
+ *kgnilnd_tunables.kgn_peer_timeout;
+ } else if (*kgnilnd_tunables.kgn_peer_timeout > -1) {
LCONSOLE_ERROR("Peer_timeout is set to %d but needs to be >= %d\n",
*kgnilnd_tunables.kgn_peer_timeout,
timeout);
LCONSOLE_ERROR("Peer_timeout is set to %d but needs to be >= %d\n",
*kgnilnd_tunables.kgn_peer_timeout,
timeout);
LIBCFS_FREE(net, sizeof(*net));
GOTO(failed, rc = -EINVAL);
} else
LIBCFS_FREE(net, sizeof(*net));
GOTO(failed, rc = -EINVAL);
} else
- ni->ni_peertimeout = timeout;
+ ni->ni_net->net_tunables.lct_peer_timeout = timeout;
LCONSOLE_INFO("Enabling LNet peer health for gnilnd, timeout %ds\n",
LCONSOLE_INFO("Enabling LNet peer health for gnilnd, timeout %ds\n",
+ ni->ni_net->net_tunables.lct_peer_timeout);
}
atomic_set(&net->gnn_refcount, 1);
}
atomic_set(&net->gnn_refcount, 1);