From 176698e8c2fd7ab8007b8074515d6144e7177d8e Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Fri, 25 Aug 2017 17:19:17 +0200 Subject: ipcpd: Deprecate gam as autonomous component The graph adjacency manager has been deprecated in favor of providing an external interface into the connectivity manager so that adjacencies can be controlled from the command line, user scripts or user applications. The gam and its associated policies were removed from the normal IPCP and the IRM configuration tools. The "/members" part of the RIB was deprecated. Removal of the gam means that initial connectivity based on changes in the RIB can't be provided, so some changes were required throughout the normal IPCP. The enrollment procedure was revised to establish its own connectivity. First, it gets boot information from a peer by establishing a connection to the remote enrollment component and downloading the IPCP configuratoin. This is now done using its own protocol buffers message in anticipation of deprecation of the RIB and CDAP for communication within a DIF. After the boot information is downloaded, it establishes a data transfer flow for enrolling the directory (DHT). After the DHT has enrolled, it signals the peer to that enrollment is done, and the data transfer connection is torn down. Signaling connections is done via the nbs struct, which is now passed to the connmgr, which enables control of the connectivity graph from external sources. --- src/ipcpd/normal/sdu_sched.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ipcpd/normal/sdu_sched.c') diff --git a/src/ipcpd/normal/sdu_sched.c b/src/ipcpd/normal/sdu_sched.c index f3550d5c..045d536a 100644 --- a/src/ipcpd/normal/sdu_sched.c +++ b/src/ipcpd/normal/sdu_sched.c @@ -117,6 +117,8 @@ struct sdu_sched * sdu_sched_create(next_sdu_t callback) if (sdu_sched == NULL) goto fail_malloc; + assert(callback); + sdu_sched->callback = callback; for (i = 0; i < QOS_CUBE_MAX; ++i) { @@ -170,6 +172,8 @@ void sdu_sched_add(struct sdu_sched * sdu_sched, { qoscube_t qc; + /* assert(sdu_sched); */ + ipcp_flow_get_qoscube(fd, &qc); flow_set_add(sdu_sched->set[qc], fd); } @@ -179,6 +183,8 @@ void sdu_sched_del(struct sdu_sched * sdu_sched, { qoscube_t qc; + assert(sdu_sched); + ipcp_flow_get_qoscube(fd, &qc); flow_set_del(sdu_sched->set[qc], fd); } -- cgit v1.2.3 From 999b5dec615ce4cfb30ee909bdd16e79a5e2a1ce Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Mon, 28 Aug 2017 20:12:55 +0200 Subject: ipcpd: Address comments on 176698e --- src/ipcpd/normal/connmgr.c | 3 +-- src/ipcpd/normal/dt.c | 2 +- src/ipcpd/normal/main.c | 2 +- src/ipcpd/normal/pol/link_state.c | 5 ----- src/ipcpd/normal/sdu_sched.c | 2 +- 5 files changed, 4 insertions(+), 10 deletions(-) (limited to 'src/ipcpd/normal/sdu_sched.c') diff --git a/src/ipcpd/normal/connmgr.c b/src/ipcpd/normal/connmgr.c index 11f83247..fa43b97a 100644 --- a/src/ipcpd/normal/connmgr.c +++ b/src/ipcpd/normal/connmgr.c @@ -207,9 +207,8 @@ int connmgr_ae_init(enum ae_id id, ae = connmgr.aes + id; - if (pthread_mutex_init(&ae->lock, NULL)) { + if (pthread_mutex_init(&ae->lock, NULL)) return -1; - } if (pthread_cond_init(&ae->cond, NULL)) { pthread_mutex_destroy(&ae->lock); diff --git a/src/ipcpd/normal/dt.c b/src/ipcpd/normal/dt.c index aa089852..282f6bee 100644 --- a/src/ipcpd/normal/dt.c +++ b/src/ipcpd/normal/dt.c @@ -207,7 +207,7 @@ int dt_init(enum pol_routing pr, if (connmgr_ae_init(AEID_DT, &info, dt.nbs)) { log_err("Failed to register with connmgr."); goto fail_connmgr_ae_init; - }; + } if (routing_init(pr, dt.nbs)) { log_err("Failed to init routing."); diff --git a/src/ipcpd/normal/main.c b/src/ipcpd/normal/main.c index bef04b7a..0a41f883 100644 --- a/src/ipcpd/normal/main.c +++ b/src/ipcpd/normal/main.c @@ -250,7 +250,7 @@ static int normal_ipcp_enroll(const char * dst, if (dt_start()) { log_err("Failed to initialize IPCP components."); goto fail_dt_start; - }; + } if (connmgr_alloc(AEID_DT, dst, NULL, &dt_conn)) { log_err("Failed to create a data transfer flow."); diff --git a/src/ipcpd/normal/pol/link_state.c b/src/ipcpd/normal/pol/link_state.c index 6bc59d6b..512ced7f 100644 --- a/src/ipcpd/normal/pol/link_state.c +++ b/src/ipcpd/normal/pol/link_state.c @@ -130,11 +130,6 @@ static int link_state_neighbor_event(enum nb_event event, size_t len; uint8_t * data; - /* Only announce the flow if our address is bigger - if (ipcpi.dt_addr < conn.conn_info.addr) - return 0; - */ - path[0] = '\0'; sprintf(fso_name, "%" PRIu64 "-%" PRIu64, ipcpi.dt_addr, conn.conn_info.addr); diff --git a/src/ipcpd/normal/sdu_sched.c b/src/ipcpd/normal/sdu_sched.c index 045d536a..10b0f02f 100644 --- a/src/ipcpd/normal/sdu_sched.c +++ b/src/ipcpd/normal/sdu_sched.c @@ -172,7 +172,7 @@ void sdu_sched_add(struct sdu_sched * sdu_sched, { qoscube_t qc; - /* assert(sdu_sched); */ + assert(sdu_sched); ipcp_flow_get_qoscube(fd, &qc); flow_set_add(sdu_sched->set[qc], fd); -- cgit v1.2.3