On Wed, May 06, 2026 at 09:06:05AM +0200, Laurent Vivier wrote:
On 5/6/26 07:38, David Gibson wrote:
On Wed, May 06, 2026 at 01:47:10AM +0200, Stefano Brivio wrote:
From: David Gibson
Start implementing pesto in earnest. Create a control/configuration socket in passt. Have pesto connect to it and retrieve a server greeting Perform some basic version checking.
Signed-off-by: David Gibson
[sbrivio: Avoid potential recursive calling between conf_accept() and conf_close(), reported by clang-tidy] Huh. For some reason that warning didn't trip for me. Although it's technically true they can mutually recurse, I believe they're both tail calls, so it shouldn't eat the stack.
[sbrivio: In conf(), check we're not exceeding sizeof(c->control_path) instead of sizeof(c->socket_path), and, in pesto's main(), print argv[optind] instead of argv[1] to indicate an invalid socket path, both reported by Jon Maloy] [sbrivio: In pesto's main(), drop unnecessary newline from error message, reported by Laurent] [sbrivio: Don't use SOCK_NONBLOCK on accept4(), as that only applies to the *new* file descriptor, which we don't want -- set O_NONBLOCK on the listening file descriptor using fcntl()]
Making the new (accepted) socket non-blocking was the intended behaviour here. We also want non-blocking for the listening socket, but that was already done in feab892c7 ("tap, repair: Use SOCK_NONBLOCK and SOCK_CLOEXEC on Unix sockets").
This patch has been dropped since v6 of the series.
Oh, right. Sorry, I forgot it had been part of this series; thought it was already merged from an earlier series. What was the reason for dropping it? -- 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