On Tue, 4 Feb 2025 14:43:07 +1100 David Gibson <david(a)gibson.dropbear.id.au> wrote:On Tue, Feb 04, 2025 at 01:47:43AM +0100, Stefano Brivio wrote:Well, folding "[PATCH 6/6] migrate: Make migration handlers simpler and more flexible" into the first patches, where it belongs, was a lot of fun. As I mentioned, I didn't test this one, I just build-tested the final result.Very much draft quality, but it works. Ask passt-repair to switch TCP sockets to repair mode and dump their current sequence numbers to the flow table, which will be transferred and used by the target in the next step.[snip]@@ -268,6 +270,7 @@ void migrate_close(struct ctx *c) { if (c->device_state_fd != -1) { debug("Closing migration channel, fd: %d", c->device_state_fd); + epoll_del(c, c->device_state_fd);You have a stray revert hunks here again which breaks things horribly. And therefore makes me not confident that I'm actually testing the same code you are.Can you please post the fixed rebase...? -- Stefanoclose(c->device_state_fd); c->device_state_fd = -1; c->device_state_result = -1; @@ -282,14 +285,12 @@ void migrate_close(struct ctx *c) */ void migrate_request(struct ctx *c, int fd, bool target) { - debug("Migration requested, fd: %d (was %d)", - fd, c->device_state_fd); + debug("Migration requested, fd: %d", c->device_state_fd); if (c->device_state_fd != -1) migrate_close(c); c->device_state_fd = fd; - c->migrate_target = target;And here.