From 806fbb0bb5e7b42cc03aea3f110df72aeb2fd84c Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Sat, 13 Sep 2014 21:12:11 +0400 Subject: 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 --- accel-pppd/triton/triton.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'accel-pppd/triton/triton.c') 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; -- cgit v1.2.3