summaryrefslogtreecommitdiff
path: root/src/ipcpd/unicast/pol
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipcpd/unicast/pol')
-rw-r--r--src/ipcpd/unicast/pol/ca-mb-ecn.c9
-rw-r--r--src/ipcpd/unicast/pol/ca-mb-ecn.h5
-rw-r--r--src/ipcpd/unicast/pol/ca-nop.c6
-rw-r--r--src/ipcpd/unicast/pol/ca-nop.h5
4 files changed, 16 insertions, 9 deletions
diff --git a/src/ipcpd/unicast/pol/ca-mb-ecn.c b/src/ipcpd/unicast/pol/ca-mb-ecn.c
index 1baaca7a..1791e42a 100644
--- a/src/ipcpd/unicast/pol/ca-mb-ecn.c
+++ b/src/ipcpd/unicast/pol/ca-mb-ecn.c
@@ -222,8 +222,9 @@ void mb_ecn_ctx_update_ece(void * _ctx,
ctx->tx_cav = true;
}
-uint8_t mb_ecn_calc_ecn(int fd,
- size_t len)
+int mb_ecn_calc_ecn(int fd,
+ uint8_t * ecn,
+ size_t len)
{
size_t q;
@@ -231,7 +232,9 @@ uint8_t mb_ecn_calc_ecn(int fd,
q = ipcp_flow_queued(fd);
- return (uint8_t) (q >> ECN_Q_SHFT);
+ *ecn |= (uint8_t) (q >> ECN_Q_SHFT);
+
+ return 0;
}
ssize_t mb_ecn_print_stats(void * _ctx,
diff --git a/src/ipcpd/unicast/pol/ca-mb-ecn.h b/src/ipcpd/unicast/pol/ca-mb-ecn.h
index 945b0df5..30dba4a2 100644
--- a/src/ipcpd/unicast/pol/ca-mb-ecn.h
+++ b/src/ipcpd/unicast/pol/ca-mb-ecn.h
@@ -42,8 +42,9 @@ void mb_ecn_ctx_update_ece(void * ctx,
void mb_ecn_wnd_wait(ca_wnd_t wnd);
-uint8_t mb_ecn_calc_ecn(int fd,
- size_t len);
+int mb_ecn_calc_ecn(int fd,
+ uint8_t * ecn,
+ size_t len);
ssize_t mb_ecn_print_stats(void * ctx,
char * buf,
diff --git a/src/ipcpd/unicast/pol/ca-nop.c b/src/ipcpd/unicast/pol/ca-nop.c
index 15b253ca..ce210cfb 100644
--- a/src/ipcpd/unicast/pol/ca-nop.c
+++ b/src/ipcpd/unicast/pol/ca-nop.c
@@ -84,11 +84,13 @@ void nop_ctx_update_ece(void * ctx,
}
-uint8_t nop_calc_ecn(int fd,
- size_t len)
+int nop_calc_ecn(int fd,
+ uint8_t * ecn,
+ size_t len)
{
(void) fd;
(void) len;
+ (void) ecn;
return 0;
}
diff --git a/src/ipcpd/unicast/pol/ca-nop.h b/src/ipcpd/unicast/pol/ca-nop.h
index baf649d8..859b52dc 100644
--- a/src/ipcpd/unicast/pol/ca-nop.h
+++ b/src/ipcpd/unicast/pol/ca-nop.h
@@ -42,8 +42,9 @@ void nop_ctx_update_ece(void * ctx,
void nop_wnd_wait(ca_wnd_t wnd);
-uint8_t nop_calc_ecn(int fd,
- size_t len);
+int nop_calc_ecn(int fd,
+ uint8_t * ecn,
+ size_t len);
extern struct pol_ca_ops nop_ca_ops;