On Tue, Jan 13, 2026 at 11:13:26PM +0100, Stefano Brivio wrote:
On Tue, 13 Jan 2026 16:12:02 +1100 David Gibson
wrote: On Tue, Jan 13, 2026 at 12:26:10AM +0100, Stefano Brivio wrote:
On Thu, 8 Jan 2026 13:29:36 +1100 David Gibson
wrote: +/** + * fwd_rules_print() - Print forwarding rules for debugging + * @fwd: Table to print + */ +void fwd_rules_print(const struct fwd_ports *fwd) +{ + unsigned i; + + for (i = 0; i < fwd->count; i++) { + const struct fwd_rule *rule = &fwd->rules[i]; + const char *weak = rule->flags & FWD_WEAK ? " WEAK" : "";
Should we print " might fail" or " can fail" instead of " WEAK"? This is for users.
Good point. THough I'm not sure "might fail" or "can fail" is terribly clear in context either. I've gone with " (best effort)" for now.
Or maybe " (if available)"?
I feel like that's also kind of vague. Available where, exactly?
I always find "best effort" a bit ambiguous because, well, it's a pretty good effort, being it's the best one, but it actually means we'll just give it a quick try,
I'm thinking of it as "best effort" for the rule as a whole: we attempt it for every component port.
once.
That's no longer true after 7/14: we'll call fwd_listen_sync() every second from fwd_scan_ports_timer(). That's intended for the FWD_SCAN rules, but it also means we'll re-attempt listens for any FWD_WEAK ports we previously failed on.
No strong preference though, "best effort" is rather idiomatic anyway.
I'll keep it as-is for now, but I'm open to different wordings if a clearly better one occurs to one of us. -- David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson