diff options
author | Sander Vrijders <sander.vrijders@ugent.be> | 2017-06-21 10:24:55 +0000 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@ugent.be> | 2017-06-21 10:24:55 +0000 |
commit | 2057bd9666cbcc09e7abc92e260ba20907f6a299 (patch) | |
tree | e0bbe49e68ba86be325ee23c5879a7611df87c9f /src/ipcpd | |
parent | 22020246ac2b6f03f42dffb48ced19e43b3e9b77 (diff) | |
parent | 806629e64e8231d0c57a80d3b6584094cd6c89bd (diff) | |
download | ouroboros-2057bd9666cbcc09e7abc92e260ba20907f6a299.tar.gz ouroboros-2057bd9666cbcc09e7abc92e260ba20907f6a299.zip |
Merged in sandervrijders/ouroboros/be-qos (pull request #517)
lib, ipcpd, irmd: Add full-fledged QoS
Diffstat (limited to 'src/ipcpd')
-rw-r--r-- | src/ipcpd/normal/dt_pci.h | 2 | ||||
-rw-r--r-- | src/ipcpd/normal/fa.h | 2 | ||||
-rw-r--r-- | src/ipcpd/normal/neighbors.c | 2 | ||||
-rw-r--r-- | src/ipcpd/normal/pol/complete.c | 8 | ||||
-rw-r--r-- | src/ipcpd/shim-data.h | 2 | ||||
-rw-r--r-- | src/ipcpd/shim-eth-llc/main.c | 2 | ||||
-rw-r--r-- | src/ipcpd/shim-udp/main.c | 14 |
7 files changed, 12 insertions, 20 deletions
diff --git a/src/ipcpd/normal/dt_pci.h b/src/ipcpd/normal/dt_pci.h index ddcf9066..2291329a 100644 --- a/src/ipcpd/normal/dt_pci.h +++ b/src/ipcpd/normal/dt_pci.h @@ -25,7 +25,7 @@ #include <ouroboros/shm_du_buff.h> #include <ouroboros/proto.h> -#include <ouroboros/shared.h> +#include <ouroboros/qoscube.h> #include <stdint.h> #include <stdbool.h> diff --git a/src/ipcpd/normal/fa.h b/src/ipcpd/normal/fa.h index a77dc723..929c0623 100644 --- a/src/ipcpd/normal/fa.h +++ b/src/ipcpd/normal/fa.h @@ -23,7 +23,7 @@ #ifndef OUROBOROS_IPCPD_NORMAL_FA_H #define OUROBOROS_IPCPD_NORMAL_FA_H -#include <ouroboros/shared.h> +#include <ouroboros/qoscube.h> #include <ouroboros/utils.h> int fa_init(void); diff --git a/src/ipcpd/normal/neighbors.c b/src/ipcpd/normal/neighbors.c index 0dbc22f2..0fb721c2 100644 --- a/src/ipcpd/normal/neighbors.c +++ b/src/ipcpd/normal/neighbors.c @@ -23,7 +23,7 @@ #define OUROBOROS_PREFIX "neighbors" #include <ouroboros/config.h> -#include <ouroboros/shared.h> +#include <ouroboros/qoscube.h> #include <ouroboros/ipcp-dev.h> #include <ouroboros/errno.h> #include <ouroboros/logs.h> diff --git a/src/ipcpd/normal/pol/complete.c b/src/ipcpd/normal/pol/complete.c index 732556c6..74848a1f 100644 --- a/src/ipcpd/normal/pol/complete.c +++ b/src/ipcpd/normal/pol/complete.c @@ -23,7 +23,7 @@ #define OUROBOROS_PREFIX "complete" #include <ouroboros/config.h> -#include <ouroboros/shared.h> +#include <ouroboros/qoscube.h> #include <ouroboros/rib.h> #include <ouroboros/dev.h> #include <ouroboros/logs.h> @@ -92,11 +92,7 @@ static void * allocator(void * o) complete = (struct complete *) o; - qs.delay = 0; - qs.jitter = 0; - - /* FIXME: implement QoS specs */ - qs.cube = QOS_CUBE_BE; + qosspec_init(&qs); while (true) { len = rib_children(MEMBERS_PATH, &children); diff --git a/src/ipcpd/shim-data.h b/src/ipcpd/shim-data.h index d53373df..1951fa9d 100644 --- a/src/ipcpd/shim-data.h +++ b/src/ipcpd/shim-data.h @@ -23,7 +23,7 @@ #ifndef IPCPD_IPCP_DATA_H #define IPCPD_IPCP_DATA_H -#include <ouroboros/shared.h> +#include <ouroboros/qoscube.h> #include <ouroboros/list.h> #include <sys/types.h> diff --git a/src/ipcpd/shim-eth-llc/main.c b/src/ipcpd/shim-eth-llc/main.c index 971eeb49..99d46a1d 100644 --- a/src/ipcpd/shim-eth-llc/main.c +++ b/src/ipcpd/shim-eth-llc/main.c @@ -979,7 +979,7 @@ static int eth_llc_ipcp_flow_alloc(int fd, assert(hash); - if (cube != QOS_CUBE_BE && cube != QOS_CUBE_FRC) { + if (cube != QOS_CUBE_BE) { log_dbg("Unsupported QoS requested."); return -1; } diff --git a/src/ipcpd/shim-udp/main.c b/src/ipcpd/shim-udp/main.c index 892334b2..b793c414 100644 --- a/src/ipcpd/shim-udp/main.c +++ b/src/ipcpd/shim-udp/main.c @@ -196,10 +196,10 @@ static int send_shim_udp_msg(shim_udp_msg_t * msg, return 0; } -static int ipcp_udp_port_alloc(uint32_t dst_ip_addr, - uint16_t src_udp_port, +static int ipcp_udp_port_alloc(uint32_t dst_ip_addr, + uint16_t src_udp_port, const uint8_t * dst, - qoscube_t cube) + qoscube_t cube) { shim_udp_msg_t msg = SHIM_UDP_MSG__INIT; @@ -899,7 +899,7 @@ static int ipcp_udp_flow_alloc(int fd, assert(dst); - if (cube != QOS_CUBE_BE && cube != QOS_CUBE_FRC) { + if (cube != QOS_CUBE_BE) { log_dbg("Unsupported QoS requested."); return -1; } @@ -923,7 +923,6 @@ static int ipcp_udp_flow_alloc(int fd, return -1; } - if (!shim_data_dir_has(ipcpi.shim_data, dst)) { log_dbg("Could not resolve destination."); close(skfd); @@ -952,10 +951,7 @@ static int ipcp_udp_flow_alloc(int fd, pthread_rwlock_unlock(&udp_data.flows_lock); - if (ipcp_udp_port_alloc(ip_addr, - f_saddr.sin_port, - dst, - cube) < 0) { + if (ipcp_udp_port_alloc(ip_addr, f_saddr.sin_port, dst, cube) < 0) { pthread_rwlock_wrlock(&udp_data.flows_lock); udp_data.fd_to_uf[fd].udp = -1; |