Просмотр исходного кода

totemconfig: Store mcastport in icmap

For KNET transport, store the mcastport in the icmap as
"runtime.config.totem.interface.<interface_number>.mcastport"

Signed-off-by: xin liang <xliang@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
xin liang 8 месяцев назад
Родитель
Сommit
5e5aa4acc4
1 измененных файлов с 13 добавлено и 0 удалено
  1. 13 0
      exec/totemconfig.c

+ 13 - 0
exec/totemconfig.c

@@ -1935,6 +1935,19 @@ extern int totem_config_read (
 		}
 	}
 
+	/*
+	 * Store mcastport value to cmap runtime section for KNET
+	 */
+	if (totem_config->transport_number == TOTEM_TRANSPORT_KNET) {
+		for (i = 0; i < INTERFACE_MAX; i++) {
+			if (!totem_config->interfaces[i].configured) {
+				continue;
+			}
+			snprintf(tmp_key, ICMAP_KEYNAME_MAXLEN, "runtime.config.totem.interface.%u.mcastport", i);
+			icmap_set_uint16(tmp_key, totem_config->interfaces[i].ip_port);
+		}
+	}
+
 	/*
 	 * Check existence of nodelist
 	 */