1
1

reachable: Change list name from *_if to *_ifs

The parameter names were misleading due to implying a single interface
instead of a list. This will provide more clarity in distinguishing the
list of interfaces from each individual interface.

Signed-off-by: William Zhang <wilzhang@amazon.com>
Этот коммит содержится в:
William Zhang 2019-07-11 21:26:08 +00:00
родитель d0dc6218ba
Коммит c9214cc53e
3 изменённых файлов: 16 добавлений и 16 удалений

Просмотреть файл

@ -59,23 +59,23 @@ static int netlink_fini(void)
* Higher weightings are given to connections on the same
* network.
*/
static opal_reachable_t* netlink_reachable(opal_list_t *local_if,
opal_list_t *remote_if)
static opal_reachable_t* netlink_reachable(opal_list_t *local_ifs,
opal_list_t *remote_ifs)
{
opal_reachable_t *reachable_results = NULL;
int i, j;
opal_if_t *local_iter, *remote_iter;
reachable_results = opal_reachable_allocate(local_if->opal_list_length,
remote_if->opal_list_length);
reachable_results = opal_reachable_allocate(local_ifs->opal_list_length,
remote_ifs->opal_list_length);
if (NULL == reachable_results) {
return NULL;
}
i = 0;
OPAL_LIST_FOREACH(local_iter, local_if, opal_if_t) {
OPAL_LIST_FOREACH(local_iter, local_ifs, opal_if_t) {
j = 0;
OPAL_LIST_FOREACH(remote_iter, remote_if, opal_if_t) {
OPAL_LIST_FOREACH(remote_iter, remote_ifs, opal_if_t) {
reachable_results->weights[i][j] = get_weights(local_iter, remote_iter);
j++;
}

Просмотреть файл

@ -68,8 +68,8 @@ typedef int (*opal_reachable_base_module_fini_fn_t)(void);
* success, NULL on failure.
*/
typedef opal_reachable_t*
(*opal_reachable_base_module_reachable_fn_t)(opal_list_t *local_if,
opal_list_t *remote_if);
(*opal_reachable_base_module_reachable_fn_t)(opal_list_t *local_ifs,
opal_list_t *remote_ifs);
/*

Просмотреть файл

@ -35,8 +35,8 @@
static int weighted_init(void);
static int weighted_fini(void);
static opal_reachable_t* weighted_reachable(opal_list_t *local_if,
opal_list_t *remote_if);
static opal_reachable_t* weighted_reachable(opal_list_t *local_ifs,
opal_list_t *remote_ifs);
static int get_weights(opal_if_t *local_if, opal_if_t *remote_if);
static int calculate_weight(int bandwidth_local, int bandwidth_remote,
@ -83,23 +83,23 @@ static int weighted_fini(void)
}
static opal_reachable_t* weighted_reachable(opal_list_t *local_if,
opal_list_t *remote_if)
static opal_reachable_t* weighted_reachable(opal_list_t *local_ifs,
opal_list_t *remote_ifs)
{
opal_reachable_t *reachable_results = NULL;
int i, j;
opal_if_t *local_iter, *remote_iter;
reachable_results = opal_reachable_allocate(opal_list_get_size(local_if),
opal_list_get_size(remote_if));
reachable_results = opal_reachable_allocate(opal_list_get_size(local_ifs),
opal_list_get_size(remote_ifs));
if (NULL == reachable_results) {
return NULL;
}
i = 0;
OPAL_LIST_FOREACH(local_iter, local_if, opal_if_t) {
OPAL_LIST_FOREACH(local_iter, local_ifs, opal_if_t) {
j = 0;
OPAL_LIST_FOREACH(remote_iter, remote_if, opal_if_t) {
OPAL_LIST_FOREACH(remote_iter, remote_ifs, opal_if_t) {
reachable_results->weights[i][j] = get_weights(local_iter, remote_iter);
j++;
}