]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: fd/cli: report the polling mask in "show fd"
authorWilly Tarreau <w@1wt.eu>
Thu, 2 Mar 2023 14:05:31 +0000 (15:05 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 8 Mar 2023 15:07:32 +0000 (16:07 +0100)
It's missing and often needed when trying to debug a situation, let's
report the polling mask as well in "show fd".

src/cli.c

index 62c4fc587cfae7ee9322de1dbddfc715eaec30df..b5de8861282a97757327399cb88c0fa345164763 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -1323,7 +1323,7 @@ static int cli_io_handler_show_fd(struct appctx *appctx)
                        suspicious = 1;
 
                chunk_printf(&trash,
-                            "  %5d : st=0x%06x(%c%c %c%c%c%c%c W:%c%c%c R:%c%c%c) ref=%#x gid=%d tmask=0x%lx umask=0x%lx owner=%p iocb=%p(",
+                            "  %5d : st=0x%06x(%c%c %c%c%c%c%c W:%c%c%c R:%c%c%c) ref=%#x gid=%d tmask=0x%lx umask=0x%lx prmsk=0x%lx pwmsk=0x%lx owner=%p iocb=%p(",
                             fd,
                             fdt.state,
                             (fdt.state & FD_CLONED) ? 'C' : 'c',
@@ -1342,6 +1342,8 @@ static int cli_io_handler_show_fd(struct appctx *appctx)
                             (fdt.refc_tgid >> 4) & 0xffff,
                             (fdt.refc_tgid) & 0xffff,
                             fdt.thread_mask, fdt.update_mask,
+                            polled_mask[fd].poll_recv,
+                            polled_mask[fd].poll_send,
                             fdt.owner,
                             fdt.iocb);
                resolve_sym_name(&trash, NULL, fdt.iocb);