While working on podman bug 23739, I found some deficiences in how and when we report various socket errors related to specific flows. Here are some preliminary patches to improve that. v3: * Added a attribute((printf)) for the base flow log function * And fixed a couple of bad calls that caught * Removed one change from a plain log to a flow-specific log in UDP, where it turned out we didn't necessarily have a well defined flow * Fixing a cppcheck warning in the process * Put an explanatory comment and clang-tidy suppression for the (very limited) recursion in flow_log__() v2: * Added patch 2/6 At Stefano's suggestion * Simplified the errno Handling fix at Stefano's suggestion * Added patch 6/6 which I noticed while revising 5/6. * Made a handful of minor corrections based on feedback. David Gibson (6): flow: Regularise flow specific logging helpers flow: Indent flow details messages flow: Include flow details with higher priority log messages flow, udp: Fix errno handling in udp_flow_sock() flow, treewide: Promote priority of selected flow-linked messages udp: Improve messages for errors getting errors flow.c | 108 +++++++------- flow.h | 79 +++++----- icmp.c | 27 ++-- icmp.h | 3 +- migrate.c | 27 ++-- migrate.h | 8 +- passt.c | 8 +- tcp.c | 387 ++++++++++++++++++++++++++++--------------------- tcp.h | 5 +- tcp_buf.c | 67 +++++---- tcp_buf.h | 7 +- tcp_conn.h | 8 +- tcp_internal.h | 27 ++-- tcp_splice.c | 59 +++++--- tcp_splice.h | 3 +- tcp_vu.c | 31 ++-- tcp_vu.h | 5 +- udp.c | 57 +++++--- udp_flow.c | 18 ++- 19 files changed, 534 insertions(+), 400 deletions(-) -- 2.54.0