You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

99 lines
4.1 KiB

From f219090fdd1bc0ed068f95ee03ce12823d6968d3 Mon Sep 17 00:00:00 2001
From: Francesco Giudici <fgiudici@redhat.com>
Date: Fri, 12 Jan 2018 18:33:59 +0100
Subject: [PATCH 1/2] cli: get team defaults from setting header files
this allows centralizing default values definition and allows quicker
and safer update of default values.
(cherry picked from commit c6448f724b1debb39973f4bfbf9ce4f79218b936)
---
clients/common/nm-meta-setting-desc.c | 8 ++++----
libnm-core/nm-utils.c | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/clients/common/nm-meta-setting-desc.c b/clients/common/nm-meta-setting-desc.c
index 9d0ac9061..d4f162fb4 100644
--- a/clients/common/nm-meta-setting-desc.c
+++ b/clients/common/nm-meta-setting-desc.c
@@ -6625,7 +6625,7 @@ static const NMMetaPropertyInfo *const property_infos_TEAM[] = {
.property_typ_data = DEFINE_PROPERTY_TYP_DATA_SUBTYPE (gobject_int,
.value_infos = INT_VALUE_INFOS (
{
- .value = 50,
+ .value = NM_SETTING_TEAM_RUNNER_TX_BALANCER_INTERVAL_DEFAULT,
.nick = "default",
}
),
@@ -6642,7 +6642,7 @@ static const NMMetaPropertyInfo *const property_infos_TEAM[] = {
.property_typ_data = DEFINE_PROPERTY_TYP_DATA_SUBTYPE (gobject_int,
.value_infos = INT_VALUE_INFOS (
{
- .value = 255,
+ .value = NM_SETTING_TEAM_RUNNER_SYS_PRIO_DEFAULT,
.nick = "default",
}
),
@@ -6698,7 +6698,7 @@ static const NMMetaPropertyInfo *const property_infos_TEAM_PORT[] = {
.property_typ_data = DEFINE_PROPERTY_TYP_DATA_SUBTYPE (gobject_int,
.value_infos = INT_VALUE_INFOS (
{
- .value = -1,
+ .value = NM_SETTING_TEAM_PORT_QUEUE_ID_DEFAULT,
.nick = "default",
}
),
@@ -6723,7 +6723,7 @@ static const NMMetaPropertyInfo *const property_infos_TEAM_PORT[] = {
.property_typ_data = DEFINE_PROPERTY_TYP_DATA_SUBTYPE (gobject_int,
.value_infos = INT_VALUE_INFOS (
{
- .value = 255,
+ .value = NM_SETTING_TEAM_PORT_LACP_PRIO_DEFAULT,
.nick = "default",
}
),
diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c
index df58409bf..ce3536c84 100644
--- a/libnm-core/nm-utils.c
+++ b/libnm-core/nm-utils.c
@@ -5151,9 +5151,9 @@ _json_team_normalize_defaults (json_t *json, gboolean reset)
_json_delete_object_on_string_match (json, "runner", "hwaddr_policy", NULL,
NM_SETTING_TEAM_RUNNER_HWADDR_POLICY_DEFAULT);
} else if (nm_streq (runner, NM_SETTING_TEAM_RUNNER_LACP)) {
- runner_tx_balancer_interval = 50;
+ runner_tx_balancer_interval = NM_SETTING_TEAM_RUNNER_TX_BALANCER_INTERVAL_DEFAULT;
runner_active = TRUE;
- runner_sys_prio = 255;
+ runner_sys_prio = NM_SETTING_TEAM_RUNNER_SYS_PRIO_DEFAULT;
runner_min_ports = 0;
_json_delete_object_on_string_match (json, "runner", "agg_select_policy", NULL,
NM_SETTING_TEAM_RUNNER_AGG_SELECT_POLICY_DEFAULT);
--
2.14.3
From c34cd5e09a50b015c59491aa4506b64e30f217bc Mon Sep 17 00:00:00 2001
From: Francesco Giudici <fgiudici@redhat.com>
Date: Fri, 12 Jan 2018 18:32:47 +0100
Subject: [PATCH 2/2] libnm-core: team: fix runner sys_prio default value
(cherry picked from commit 2c99eba42fdd69c7e5719f19d24aa944dfaaf666)
---
libnm-core/nm-setting-team.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libnm-core/nm-setting-team.h b/libnm-core/nm-setting-team.h
index 452078363..d423901f6 100644
--- a/libnm-core/nm-setting-team.h
+++ b/libnm-core/nm-setting-team.h
@@ -150,7 +150,7 @@ NMTeamLinkWatcherArpPingFlags nm_team_link_watcher_get_flags (NMTeamLinkWatcher
#define NM_SETTING_TEAM_RUNNER_DEFAULT NM_SETTING_TEAM_RUNNER_ROUNDROBIN
#define NM_SETTING_TEAM_RUNNER_HWADDR_POLICY_DEFAULT NM_SETTING_TEAM_RUNNER_HWADDR_POLICY_SAME_ALL
#define NM_SETTING_TEAM_RUNNER_TX_BALANCER_INTERVAL_DEFAULT 50
-#define NM_SETTING_TEAM_RUNNER_SYS_PRIO_DEFAULT 255
+#define NM_SETTING_TEAM_RUNNER_SYS_PRIO_DEFAULT 65535
#define NM_SETTING_TEAM_RUNNER_AGG_SELECT_POLICY_DEFAULT NM_SETTING_TEAM_RUNNER_AGG_SELECT_POLICY_LACP_PRIO
--
2.14.3