diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2014-09-13 21:12:11 +0400 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2014-09-13 21:17:59 +0400 |
commit | 806fbb0bb5e7b42cc03aea3f110df72aeb2fd84c (patch) | |
tree | d7b46feccf14baaaa0522015342128a755e3b76c /accel-pppd/triton | |
parent | 96b5cb33e6a79f36c716e07e42da5008ca898494 (diff) | |
download | accel-ppp-806fbb0bb5e7b42cc03aea3f110df72aeb2fd84c.tar.gz accel-ppp-806fbb0bb5e7b42cc03aea3f110df72aeb2fd84c.zip |
pppoe: start interfaces asynchronously
When there are many interfaces to start accel-ppp stucks on startup because kernel slowly creates raw sockets.
So starting this proccess asynchronous improves accel-ppp responsiveness
Diffstat (limited to 'accel-pppd/triton')
-rw-r--r-- | accel-pppd/triton/triton.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/accel-pppd/triton/triton.c b/accel-pppd/triton/triton.c index cdcccdb8..3c4de31d 100644 --- a/accel-pppd/triton/triton.c +++ b/accel-pppd/triton/triton.c @@ -485,13 +485,18 @@ void __export triton_context_wakeup(struct triton_context_t *ud) int __export triton_context_call(struct triton_context_t *ud, void (*func)(void *), void *arg) { - struct _triton_context_t *ctx = (struct _triton_context_t *)ud->tpd; + struct _triton_context_t *ctx; struct _triton_ctx_call_t *call = mempool_alloc(call_pool); int r; if (!call) return -1; - + + if (ud) + ctx = (struct _triton_context_t *)ud->tpd; + else + ctx = (struct _triton_context_t *)default_ctx.tpd; + call->func = func; call->arg = arg; |