mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 13:38:43 +02:00
l3cfg: combine notify_type and payload data in NM_L3Cfg_SIGNAL_NOTIFY signal
Emitting signals is relatively expensive, because the arguments have to be packed into a GValue. Avoid some overhad by only passing one signal argument: the notify-data which also contains the type. Also with this we can use g_cclosure_marshal_VOID__POINTER. Also, it's nice to have the type field part of the notify-data. Because clearly the notify-data union is unusable without knowing the type. That means, if a user passes the notify-data to a function, they anyway would also need to pass along the type.
This commit is contained in:
parent
ef198d0202
commit
e83a6f5898
3 changed files with 73 additions and 87 deletions
112
src/nm-l3cfg.c
112
src/nm-l3cfg.c
|
|
@ -293,10 +293,9 @@ static NM_UTILS_ENUM2STR_DEFINE(
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
_l3_config_notify_type_and_payload_to_string(NML3ConfigNotifyType notify_type,
|
_l3_config_notify_data_to_string(const NML3ConfigNotifyData *notify_data,
|
||||||
const NML3ConfigNotifyPayload *payload,
|
char * sbuf,
|
||||||
char * sbuf,
|
gsize sbuf_size)
|
||||||
gsize sbuf_size)
|
|
||||||
{
|
{
|
||||||
char sbuf_addr[NM_UTILS_INET_ADDRSTRLEN];
|
char sbuf_addr[NM_UTILS_INET_ADDRSTRLEN];
|
||||||
char *s = sbuf;
|
char *s = sbuf;
|
||||||
|
|
@ -305,31 +304,31 @@ _l3_config_notify_type_and_payload_to_string(NML3ConfigNotifyType noti
|
||||||
nm_assert(sbuf);
|
nm_assert(sbuf);
|
||||||
nm_assert(sbuf_size > 0);
|
nm_assert(sbuf_size > 0);
|
||||||
|
|
||||||
_l3_config_notify_type_to_string(notify_type, s, l);
|
_l3_config_notify_type_to_string(notify_data->notify_type, s, l);
|
||||||
nm_utils_strbuf_seek_end(&s, &l);
|
nm_utils_strbuf_seek_end(&s, &l);
|
||||||
|
|
||||||
switch (notify_type) {
|
switch (notify_data->notify_type) {
|
||||||
case NM_L3_CONFIG_NOTIFY_TYPE_ACD_COMPLETED:
|
case NM_L3_CONFIG_NOTIFY_TYPE_ACD_COMPLETED:
|
||||||
nm_utils_strbuf_append(&s,
|
nm_utils_strbuf_append(&s,
|
||||||
&l,
|
&l,
|
||||||
", addr=%s, probe-result=%d",
|
", addr=%s, probe-result=%d",
|
||||||
_nm_utils_inet4_ntop(payload->acd_completed.addr, sbuf_addr),
|
_nm_utils_inet4_ntop(notify_data->acd_completed.addr, sbuf_addr),
|
||||||
(int) payload->acd_completed.probe_result);
|
(int) notify_data->acd_completed.probe_result);
|
||||||
break;
|
break;
|
||||||
case NM_L3_CONFIG_NOTIFY_TYPE_PLATFORM_CHANGE:
|
case NM_L3_CONFIG_NOTIFY_TYPE_PLATFORM_CHANGE:
|
||||||
nm_utils_strbuf_append(
|
nm_utils_strbuf_append(
|
||||||
&s,
|
&s,
|
||||||
&l,
|
&l,
|
||||||
", obj-type=%s, change=%s, obj=",
|
", obj-type=%s, change=%s, obj=",
|
||||||
NMP_OBJECT_GET_CLASS(payload->platform_change.obj)->obj_type_name,
|
NMP_OBJECT_GET_CLASS(notify_data->platform_change.obj)->obj_type_name,
|
||||||
nm_platform_signal_change_type_to_string(payload->platform_change.change_type));
|
nm_platform_signal_change_type_to_string(notify_data->platform_change.change_type));
|
||||||
nmp_object_to_string(payload->platform_change.obj, NMP_OBJECT_TO_STRING_PUBLIC, s, l);
|
nmp_object_to_string(notify_data->platform_change.obj, NMP_OBJECT_TO_STRING_PUBLIC, s, l);
|
||||||
break;
|
break;
|
||||||
case NM_L3_CONFIG_NOTIFY_TYPE_PLATFORM_CHANGE_ON_IDLE:
|
case NM_L3_CONFIG_NOTIFY_TYPE_PLATFORM_CHANGE_ON_IDLE:
|
||||||
nm_utils_strbuf_append(&s,
|
nm_utils_strbuf_append(&s,
|
||||||
&l,
|
&l,
|
||||||
", obj-type-flags=0x%x",
|
", obj-type-flags=0x%x",
|
||||||
payload->platform_change_on_idle.obj_type_flags);
|
notify_data->platform_change_on_idle.obj_type_flags);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
@ -339,24 +338,26 @@ _l3_config_notify_type_and_payload_to_string(NML3ConfigNotifyType noti
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_nm_l3cfg_emit_signal_notify(NML3Cfg * self,
|
_nm_l3cfg_emit_signal_notify(NML3Cfg *self, const NML3ConfigNotifyData *notify_data)
|
||||||
NML3ConfigNotifyType notify_type,
|
|
||||||
const NML3ConfigNotifyPayload *payload)
|
|
||||||
{
|
{
|
||||||
char sbuf[sizeof(_nm_utils_to_string_buffer)];
|
char sbuf[sizeof(_nm_utils_to_string_buffer)];
|
||||||
|
|
||||||
nm_assert(_NM_INT_NOT_NEGATIVE(notify_type));
|
nm_assert(notify_data);
|
||||||
nm_assert(notify_type < _NM_L3_CONFIG_NOTIFY_TYPE_NUM);
|
nm_assert(_NM_INT_NOT_NEGATIVE(notify_data->notify_type));
|
||||||
nm_assert((!!payload)
|
nm_assert(notify_data->notify_type < _NM_L3_CONFIG_NOTIFY_TYPE_NUM);
|
||||||
== NM_IN_SET(notify_type,
|
|
||||||
NM_L3_CONFIG_NOTIFY_TYPE_ACD_COMPLETED,
|
|
||||||
NM_L3_CONFIG_NOTIFY_TYPE_PLATFORM_CHANGE,
|
|
||||||
NM_L3_CONFIG_NOTIFY_TYPE_PLATFORM_CHANGE_ON_IDLE));
|
|
||||||
|
|
||||||
_LOGT("emit signal (%s)",
|
_LOGT("emit signal (%s)", _l3_config_notify_data_to_string(notify_data, sbuf, sizeof(sbuf)));
|
||||||
_l3_config_notify_type_and_payload_to_string(notify_type, payload, sbuf, sizeof(sbuf)));
|
|
||||||
|
|
||||||
g_signal_emit(self, signals[SIGNAL_NOTIFY], 0, (int) notify_type, payload);
|
g_signal_emit(self, signals[SIGNAL_NOTIFY], 0, notify_data);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_nm_l3cfg_emit_signal_notify_simple(NML3Cfg *self, NML3ConfigNotifyType notify_type)
|
||||||
|
{
|
||||||
|
NML3ConfigNotifyData notify_data;
|
||||||
|
|
||||||
|
notify_data.notify_type = notify_type;
|
||||||
|
_nm_l3cfg_emit_signal_notify(self, ¬ify_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
@ -675,18 +676,16 @@ _load_link(NML3Cfg *self, gboolean initial)
|
||||||
void
|
void
|
||||||
_nm_l3cfg_notify_platform_change_on_idle(NML3Cfg *self, guint32 obj_type_flags)
|
_nm_l3cfg_notify_platform_change_on_idle(NML3Cfg *self, guint32 obj_type_flags)
|
||||||
{
|
{
|
||||||
NML3ConfigNotifyPayload payload;
|
NML3ConfigNotifyData notify_data;
|
||||||
|
|
||||||
if (self->priv.plobj_next != self->priv.plobj)
|
if (self->priv.plobj_next != self->priv.plobj)
|
||||||
_load_link(self, FALSE);
|
_load_link(self, FALSE);
|
||||||
|
|
||||||
payload = (NML3ConfigNotifyPayload){
|
notify_data.notify_type = NM_L3_CONFIG_NOTIFY_TYPE_PLATFORM_CHANGE_ON_IDLE;
|
||||||
.platform_change_on_idle =
|
notify_data.platform_change_on_idle = (typeof(notify_data.platform_change_on_idle)){
|
||||||
{
|
.obj_type_flags = obj_type_flags,
|
||||||
.obj_type_flags = obj_type_flags,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
_nm_l3cfg_emit_signal_notify(self, NM_L3_CONFIG_NOTIFY_TYPE_PLATFORM_CHANGE_ON_IDLE, &payload);
|
_nm_l3cfg_emit_signal_notify(self, ¬ify_data);
|
||||||
|
|
||||||
_l3_acd_data_notify_acd_completed_all(self);
|
_l3_acd_data_notify_acd_completed_all(self);
|
||||||
|
|
||||||
|
|
@ -701,8 +700,8 @@ _nm_l3cfg_notify_platform_change(NML3Cfg * self,
|
||||||
NMPlatformSignalChangeType change_type,
|
NMPlatformSignalChangeType change_type,
|
||||||
const NMPObject * obj)
|
const NMPObject * obj)
|
||||||
{
|
{
|
||||||
NML3ConfigNotifyPayload payload;
|
NML3ConfigNotifyData notify_data;
|
||||||
NMPObjectType obj_type;
|
NMPObjectType obj_type;
|
||||||
|
|
||||||
nm_assert(NMP_OBJECT_IS_VALID(obj));
|
nm_assert(NMP_OBJECT_IS_VALID(obj));
|
||||||
|
|
||||||
|
|
@ -731,14 +730,12 @@ _nm_l3cfg_notify_platform_change(NML3Cfg * self,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
payload = (NML3ConfigNotifyPayload){
|
notify_data.notify_type = NM_L3_CONFIG_NOTIFY_TYPE_PLATFORM_CHANGE;
|
||||||
.platform_change =
|
notify_data.platform_change = (typeof(notify_data.platform_change)){
|
||||||
{
|
.obj = obj,
|
||||||
.obj = obj,
|
.change_type = change_type,
|
||||||
.change_type = change_type,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
_nm_l3cfg_emit_signal_notify(self, NM_L3_CONFIG_NOTIFY_TYPE_PLATFORM_CHANGE, &payload);
|
_nm_l3cfg_emit_signal_notify(self, ¬ify_data);
|
||||||
|
|
||||||
nm_assert(NMP_OBJECT_IS_VALID(obj));
|
nm_assert(NMP_OBJECT_IS_VALID(obj));
|
||||||
}
|
}
|
||||||
|
|
@ -1530,7 +1527,7 @@ _l3_acd_data_notify_acd_completed(NML3Cfg *self, AcdData *acd_data, gboolean for
|
||||||
{
|
{
|
||||||
gs_free NML3ConfigNotifyPayloadAcdFailedSource *sources_free = NULL;
|
gs_free NML3ConfigNotifyPayloadAcdFailedSource *sources_free = NULL;
|
||||||
NML3ConfigNotifyPayloadAcdFailedSource * sources = NULL;
|
NML3ConfigNotifyPayloadAcdFailedSource * sources = NULL;
|
||||||
NML3ConfigNotifyPayload payload;
|
NML3ConfigNotifyData notify_data;
|
||||||
AcdTrackData * acd_track;
|
AcdTrackData * acd_track;
|
||||||
guint i, n;
|
guint i, n;
|
||||||
NMTernary acd_failed_notified_selector;
|
NMTernary acd_failed_notified_selector;
|
||||||
|
|
@ -1575,17 +1572,14 @@ _l3_acd_data_notify_acd_completed(NML3Cfg *self, AcdData *acd_data, gboolean for
|
||||||
}
|
}
|
||||||
nm_assert(i == n);
|
nm_assert(i == n);
|
||||||
|
|
||||||
payload = (NML3ConfigNotifyPayload){
|
notify_data.notify_type = NM_L3_CONFIG_NOTIFY_TYPE_ACD_COMPLETED;
|
||||||
.acd_completed =
|
notify_data.acd_completed = (typeof(notify_data.acd_completed)){
|
||||||
{
|
.addr = acd_data->addr,
|
||||||
.addr = acd_data->addr,
|
.probe_result = acd_data->probe_result,
|
||||||
.probe_result = acd_data->probe_result,
|
.sources_len = n,
|
||||||
.sources_len = n,
|
.sources = sources,
|
||||||
.sources = sources,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
_nm_l3cfg_emit_signal_notify(self, ¬ify_data);
|
||||||
_nm_l3cfg_emit_signal_notify(self, NM_L3_CONFIG_NOTIFY_TYPE_ACD_COMPLETED, &payload);
|
|
||||||
|
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
nmp_object_unref(sources[i].obj);
|
nmp_object_unref(sources[i].obj);
|
||||||
|
|
@ -2756,10 +2750,9 @@ _routes_temporary_not_available_timeout(gpointer user_data)
|
||||||
if (any_expired) {
|
if (any_expired) {
|
||||||
/* a route expired. We emit a signal, but we don't schedule it again. That will
|
/* a route expired. We emit a signal, but we don't schedule it again. That will
|
||||||
* only happen if the user calls nm_l3cfg_commit() again. */
|
* only happen if the user calls nm_l3cfg_commit() again. */
|
||||||
_nm_l3cfg_emit_signal_notify(
|
_nm_l3cfg_emit_signal_notify_simple(
|
||||||
self,
|
self,
|
||||||
NM_L3_CONFIG_NOTIFY_TYPE_ROUTES_TEMPORARY_NOT_AVAILABLE_EXPIRED,
|
NM_L3_CONFIG_NOTIFY_TYPE_ROUTES_TEMPORARY_NOT_AVAILABLE_EXPIRED);
|
||||||
NULL);
|
|
||||||
return G_SOURCE_REMOVE;
|
return G_SOURCE_REMOVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3070,7 +3063,7 @@ _l3_commit(NML3Cfg *self, NML3CfgCommitType commit_type, gboolean is_idle)
|
||||||
|
|
||||||
_l3_acd_data_process_changes(self);
|
_l3_acd_data_process_changes(self);
|
||||||
|
|
||||||
_nm_l3cfg_emit_signal_notify(self, NM_L3_CONFIG_NOTIFY_TYPE_POST_COMMIT, NULL);
|
_nm_l3cfg_emit_signal_notify_simple(self, NM_L3_CONFIG_NOTIFY_TYPE_POST_COMMIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -3390,9 +3383,8 @@ nm_l3cfg_class_init(NML3CfgClass *klass)
|
||||||
0,
|
0,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
g_cclosure_marshal_VOID__POINTER,
|
||||||
G_TYPE_NONE,
|
G_TYPE_NONE,
|
||||||
2,
|
1,
|
||||||
G_TYPE_INT /* NML3ConfigNotifyType */,
|
G_TYPE_POINTER /* (const NML3ConfigNotifyData *) */);
|
||||||
G_TYPE_POINTER /* (const NML3ConfigNotifyPayload *) */);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ typedef struct {
|
||||||
} NML3ConfigNotifyPayloadAcdFailedSource;
|
} NML3ConfigNotifyPayloadAcdFailedSource;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
NML3ConfigNotifyType notify_type;
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
in_addr_t addr;
|
in_addr_t addr;
|
||||||
|
|
@ -65,7 +66,7 @@ typedef struct {
|
||||||
guint32 obj_type_flags;
|
guint32 obj_type_flags;
|
||||||
} platform_change_on_idle;
|
} platform_change_on_idle;
|
||||||
};
|
};
|
||||||
} NML3ConfigNotifyPayload;
|
} NML3ConfigNotifyData;
|
||||||
|
|
||||||
struct _NML3CfgPrivate;
|
struct _NML3CfgPrivate;
|
||||||
|
|
||||||
|
|
@ -170,9 +171,7 @@ gboolean nm_l3cfg_get_acd_is_pending(NML3Cfg *self);
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void _nm_l3cfg_emit_signal_notify(NML3Cfg * self,
|
void _nm_l3cfg_emit_signal_notify(NML3Cfg *self, const NML3ConfigNotifyData *notify_data);
|
||||||
NML3ConfigNotifyType notify_type,
|
|
||||||
const NML3ConfigNotifyPayload *pay_load);
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -116,26 +116,21 @@ _test_l3cfg_data_set_notify_type(TestL3cfgData *tdata, TestL3cfgNotifyType notif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_test_l3cfg_signal_notify(NML3Cfg * l3cfg,
|
_test_l3cfg_signal_notify(NML3Cfg * l3cfg,
|
||||||
int notify_type_i,
|
const NML3ConfigNotifyData *notify_data,
|
||||||
const NML3ConfigNotifyPayload *payload,
|
TestL3cfgData * tdata)
|
||||||
TestL3cfgData * tdata)
|
|
||||||
{
|
{
|
||||||
NML3ConfigNotifyType l3_notify_type = notify_type_i;
|
|
||||||
|
|
||||||
g_assert(NM_IS_L3CFG(l3cfg));
|
g_assert(NM_IS_L3CFG(l3cfg));
|
||||||
g_assert(tdata);
|
g_assert(tdata);
|
||||||
g_assert((!!payload)
|
g_assert(notify_data);
|
||||||
== NM_IN_SET(l3_notify_type,
|
g_assert(_NM_INT_NOT_NEGATIVE(notify_data->notify_type));
|
||||||
NM_L3_CONFIG_NOTIFY_TYPE_PLATFORM_CHANGE,
|
g_assert(notify_data->notify_type < _NM_L3_CONFIG_NOTIFY_TYPE_NUM);
|
||||||
NM_L3_CONFIG_NOTIFY_TYPE_PLATFORM_CHANGE_ON_IDLE,
|
|
||||||
NM_L3_CONFIG_NOTIFY_TYPE_ACD_COMPLETED));
|
|
||||||
|
|
||||||
if (l3_notify_type == NM_L3_CONFIG_NOTIFY_TYPE_PLATFORM_CHANGE_ON_IDLE)
|
if (notify_data->notify_type == NM_L3_CONFIG_NOTIFY_TYPE_PLATFORM_CHANGE_ON_IDLE)
|
||||||
g_assert(payload->platform_change_on_idle.obj_type_flags != 0u);
|
g_assert(notify_data->platform_change_on_idle.obj_type_flags != 0u);
|
||||||
else if (l3_notify_type == NM_L3_CONFIG_NOTIFY_TYPE_PLATFORM_CHANGE) {
|
else if (notify_data->notify_type == NM_L3_CONFIG_NOTIFY_TYPE_PLATFORM_CHANGE) {
|
||||||
g_assert(NMP_OBJECT_IS_VALID(payload->platform_change.obj));
|
g_assert(NMP_OBJECT_IS_VALID(notify_data->platform_change.obj));
|
||||||
g_assert(payload->platform_change.change_type != 0);
|
g_assert(notify_data->platform_change.change_type != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (tdata->notify_type) {
|
switch (tdata->notify_type) {
|
||||||
|
|
@ -143,7 +138,7 @@ _test_l3cfg_signal_notify(NML3Cfg * l3cfg,
|
||||||
g_assert_not_reached();
|
g_assert_not_reached();
|
||||||
break;
|
break;
|
||||||
case TEST_L3CFG_NOTIFY_TYPE_IDLE_ASSERT_NO_SIGNAL:
|
case TEST_L3CFG_NOTIFY_TYPE_IDLE_ASSERT_NO_SIGNAL:
|
||||||
if (NM_IN_SET(l3_notify_type,
|
if (NM_IN_SET(notify_data->notify_type,
|
||||||
NM_L3_CONFIG_NOTIFY_TYPE_PLATFORM_CHANGE,
|
NM_L3_CONFIG_NOTIFY_TYPE_PLATFORM_CHANGE,
|
||||||
NM_L3_CONFIG_NOTIFY_TYPE_PLATFORM_CHANGE_ON_IDLE))
|
NM_L3_CONFIG_NOTIFY_TYPE_PLATFORM_CHANGE_ON_IDLE))
|
||||||
return;
|
return;
|
||||||
|
|
@ -151,15 +146,15 @@ _test_l3cfg_signal_notify(NML3Cfg * l3cfg,
|
||||||
return;
|
return;
|
||||||
case TEST_L3CFG_NOTIFY_TYPE_COMMIT_1:
|
case TEST_L3CFG_NOTIFY_TYPE_COMMIT_1:
|
||||||
g_assert_cmpint(tdata->post_commit_event_count, ==, 0);
|
g_assert_cmpint(tdata->post_commit_event_count, ==, 0);
|
||||||
switch (l3_notify_type) {
|
switch (notify_data->notify_type) {
|
||||||
case NM_L3_CONFIG_NOTIFY_TYPE_POST_COMMIT:
|
case NM_L3_CONFIG_NOTIFY_TYPE_POST_COMMIT:
|
||||||
tdata->post_commit_event_count++;
|
tdata->post_commit_event_count++;
|
||||||
return;
|
return;
|
||||||
case NM_L3_CONFIG_NOTIFY_TYPE_ACD_COMPLETED:
|
case NM_L3_CONFIG_NOTIFY_TYPE_ACD_COMPLETED:
|
||||||
switch (tdata->f->test_idx) {
|
switch (tdata->f->test_idx) {
|
||||||
case 2:
|
case 2:
|
||||||
nmtst_assert_ip4_address(payload->acd_completed.addr, "192.167.133.45");
|
nmtst_assert_ip4_address(notify_data->acd_completed.addr, "192.167.133.45");
|
||||||
g_assert(payload->acd_completed.probe_result);
|
g_assert(notify_data->acd_completed.probe_result);
|
||||||
g_assert(tdata->general_event_count == 0);
|
g_assert(tdata->general_event_count == 0);
|
||||||
tdata->general_event_count++;
|
tdata->general_event_count++;
|
||||||
return;
|
return;
|
||||||
|
|
@ -174,16 +169,16 @@ _test_l3cfg_signal_notify(NML3Cfg * l3cfg,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case TEST_L3CFG_NOTIFY_TYPE_WAIT_FOR_ACD_READY_1:
|
case TEST_L3CFG_NOTIFY_TYPE_WAIT_FOR_ACD_READY_1:
|
||||||
if (NM_IN_SET(l3_notify_type,
|
if (NM_IN_SET(notify_data->notify_type,
|
||||||
NM_L3_CONFIG_NOTIFY_TYPE_PLATFORM_CHANGE,
|
NM_L3_CONFIG_NOTIFY_TYPE_PLATFORM_CHANGE,
|
||||||
NM_L3_CONFIG_NOTIFY_TYPE_PLATFORM_CHANGE_ON_IDLE))
|
NM_L3_CONFIG_NOTIFY_TYPE_PLATFORM_CHANGE_ON_IDLE))
|
||||||
return;
|
return;
|
||||||
if (l3_notify_type == NM_L3_CONFIG_NOTIFY_TYPE_ACD_COMPLETED) {
|
if (notify_data->notify_type == NM_L3_CONFIG_NOTIFY_TYPE_ACD_COMPLETED) {
|
||||||
g_assert(tdata->notify_data.wait_for_acd_ready_1.cb_count == 0);
|
g_assert(tdata->notify_data.wait_for_acd_ready_1.cb_count == 0);
|
||||||
tdata->notify_data.wait_for_acd_ready_1.cb_count++;
|
tdata->notify_data.wait_for_acd_ready_1.cb_count++;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (l3_notify_type == NM_L3_CONFIG_NOTIFY_TYPE_POST_COMMIT) {
|
if (notify_data->notify_type == NM_L3_CONFIG_NOTIFY_TYPE_POST_COMMIT) {
|
||||||
g_assert(tdata->notify_data.wait_for_acd_ready_1.cb_count == 1);
|
g_assert(tdata->notify_data.wait_for_acd_ready_1.cb_count == 1);
|
||||||
tdata->notify_data.wait_for_acd_ready_1.cb_count++;
|
tdata->notify_data.wait_for_acd_ready_1.cb_count++;
|
||||||
nmtstp_platform_ip_addresses_assert(tdata->f->platform,
|
nmtstp_platform_ip_addresses_assert(tdata->f->platform,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue