diff options
author | Sander Vrijders <sander.vrijders@ugent.be> | 2017-03-27 14:12:41 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2017-03-28 10:26:07 +0200 |
commit | 48f12c6466c14f51bc3a2bba9b06772207e9ef33 (patch) | |
tree | ee3ce3895efd46f83549676c14046029cff0d567 /src/ipcpd/normal/shm_pci.c | |
parent | ad6a813edab5a14866b045d37fe2ce7e1f9a126d (diff) | |
download | ouroboros-48f12c6466c14f51bc3a2bba9b06772207e9ef33.tar.gz ouroboros-48f12c6466c14f51bc3a2bba9b06772207e9ef33.zip |
ipcpd: normal: Call shm_pci_init on fmgr init
The shm PCI was never initialized during flow manager init. This
commit will do that, and initialize the pdu length correctly as well,
since it was not being written into the RIB, nor read in shm_pci_init.
Diffstat (limited to 'src/ipcpd/normal/shm_pci.c')
-rw-r--r-- | src/ipcpd/normal/shm_pci.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/ipcpd/normal/shm_pci.c b/src/ipcpd/normal/shm_pci.c index 001463eb..e6cd1042 100644 --- a/src/ipcpd/normal/shm_pci.c +++ b/src/ipcpd/normal/shm_pci.c @@ -88,30 +88,32 @@ int shm_pci_init(void) /* read dt constants from the RIB */ if (rib_read(BOOT_PATH "/dt/const/addr_size", &pci_info.dtc.addr_size, - sizeof(pci_info.dtc.addr_size)) || + sizeof(pci_info.dtc.addr_size)) < 0 || rib_read(BOOT_PATH "/dt/const/cep_id_size", &pci_info.dtc.cep_id_size, - sizeof(pci_info.dtc.cep_id_size)) || + sizeof(pci_info.dtc.cep_id_size)) < 0 || rib_read(BOOT_PATH "/dt/const/seqno_size", &pci_info.dtc.seqno_size, - sizeof(pci_info.dtc.seqno_size)) || + sizeof(pci_info.dtc.seqno_size)) < 0 || + rib_read(BOOT_PATH "/dt/const/pdu_length_size", + &pci_info.dtc.pdu_length_size, + sizeof(pci_info.dtc.pdu_length_size)) < 0 || rib_read(BOOT_PATH "/dt/const/has_ttl", &pci_info.dtc.has_ttl, - sizeof(pci_info.dtc.has_ttl)) || + sizeof(pci_info.dtc.has_ttl)) < 0 || rib_read(BOOT_PATH "/dt/const/has_chk", &pci_info.dtc.has_chk, - sizeof(pci_info.dtc.has_chk)) || + sizeof(pci_info.dtc.has_chk)) < 0 || rib_read(BOOT_PATH "/dt/const/min_pdu_size", &pci_info.dtc.min_pdu_size, - sizeof(pci_info.dtc.min_pdu_size)) || + sizeof(pci_info.dtc.min_pdu_size)) < 0 || rib_read(BOOT_PATH "/dt/const/max_pdu_size", &pci_info.dtc.max_pdu_size, - sizeof(pci_info.dtc.max_pdu_size))) + sizeof(pci_info.dtc.max_pdu_size)) < 0) return -1; pci_info.dst_addr_o = PDU_TYPE_SIZE; pci_info.src_addr_o = pci_info.dst_addr_o + pci_info.dtc.addr_size; - pci_info.dst_cep_id_o = pci_info.dst_addr_o + pci_info.dtc.addr_size; pci_info.dst_cep_id_o = pci_info.src_addr_o + pci_info.dtc.addr_size; pci_info.src_cep_id_o = pci_info.dst_cep_id_o + pci_info.dtc.cep_id_size; @@ -132,7 +134,7 @@ int shm_pci_init(void) } void shm_pci_fini(void) { - return ; + return; } int shm_pci_ser(struct shm_du_buff * sdb, |