From: Willy Tarreau Date: Fri, 30 Mar 2018 13:00:15 +0000 (+0200) Subject: MINOR: cli: report cache indexes in "show fd" X-Git-Tag: v1.9-dev1~330 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c754b343a2e8accaea8d6151cb7d814b0ee5c263;p=thirdparty%2Fhaproxy.git MINOR: cli: report cache indexes in "show fd" Instead of just indicating "cache={0,1}" we now report cache.next and cache.prev since they are the ones used with the lockless fd cache. --- diff --git a/src/cli.c b/src/cli.c index 035f4e5a8b..018d508d32 100644 --- a/src/cli.c +++ b/src/cli.c @@ -798,7 +798,7 @@ static int cli_io_handler_show_fd(struct appctx *appctx) li = fdt.owner; chunk_printf(&trash, - " %5d : st=0x%02x(R:%c%c%c W:%c%c%c) ev=0x%02x(%c%c%c%c%c) [%c%c] cache=%u owner=%p iocb=%p(%s) tmask=0x%lx umask=0x%lx", + " %5d : st=0x%02x(R:%c%c%c W:%c%c%c) ev=0x%02x(%c%c%c%c%c) [%c%c] cnext=%d cprev=%d tmask=0x%lx umask=0x%lx owner=%p iocb=%p(%s)", fd, fdt.state, (fdt.state & FD_EV_POLLED_R) ? 'P' : 'p', @@ -815,15 +815,16 @@ static int cli_io_handler_show_fd(struct appctx *appctx) (fdt.ev & FD_POLL_IN) ? 'I' : 'i', fdt.linger_risk ? 'L' : 'l', fdt.cloned ? 'C' : 'c', - fdt.cache.next >= -2 ? 1 : 0, + fdt.cache.next, + fdt.cache.prev, + fdt.thread_mask, fdt.update_mask, fdt.owner, fdt.iocb, (fdt.iocb == conn_fd_handler) ? "conn_fd_handler" : (fdt.iocb == dgram_fd_handler) ? "dgram_fd_handler" : (fdt.iocb == listener_accept) ? "listener_accept" : (fdt.iocb == thread_sync_io_handler) ? "thread_sync_io_handler" : - "unknown", - fdt.thread_mask, fdt.update_mask); + "unknown"); if (fdt.iocb == conn_fd_handler) { chunk_appendf(&trash, " cflg=0x%08x", conn_flags);