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. I think patches 1..3 are pretty straightforward and safe. 4/4 I think is a good idea in principle - promoting the priority of a number of messages now that we have ratelimiting. However, plumbing 'now' all the places we need it resuls in a *lot* of churn, so we might want to postpone or split it up. Still, current drafted posted for consideration. 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 | 103 ++++++------- flow.h | 72 ++++----- 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 | 61 +++++--- udp_flow.c | 18 ++- 19 files changed, 528 insertions(+), 398 deletions(-) -- 2.54.0