summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/shm_pci.c
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2017-03-28 08:38:05 +0000
committerdimitri staessens <dimitri.staessens@ugent.be>2017-03-28 08:38:05 +0000
commitba13c05b8b61365ff9e969c15affd2e1d52b76ed (patch)
treebaa5d6178914dd12106845ca81c81b63e4249c6f /src/ipcpd/normal/shm_pci.c
parent7ee6dadd39f3d4b5874d23bfcdcdd66eb195124e (diff)
parent6d080d9b9ee2e480717935e4ce94870fc87ea5f7 (diff)
downloadouroboros-ba13c05b8b61365ff9e969c15affd2e1d52b76ed.tar.gz
ouroboros-ba13c05b8b61365ff9e969c15affd2e1d52b76ed.zip
Merged in sandervrijders/ouroboros/be-upd-graph (pull request #426)
Be upd graph
Diffstat (limited to 'src/ipcpd/normal/shm_pci.c')
-rw-r--r--src/ipcpd/normal/shm_pci.c20
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,