From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202502 header.b=EQEXxRQT; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 4F01E5A061C for ; Mon, 03 Feb 2025 10:26:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202502; t=1738574768; bh=i1GTtZuB/YC2v8S3L9ixPcxCQORL5/SWZxoI8Dd56hY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EQEXxRQTo4C7q3xn9vW4mEaMgjjrqsqdsQ8K9XtD+kCmapGaXGZpN/Jt0SiYreYQi A+asaIg9WUfwEhxVNw57rVBDELI+9pSRb2UUr4WXeH6Ih+GRtsV4v/YYcbg1769j2W x0dSny1o+svpidAkxj0azo7P35DM95TbIlBHwSqIvSlF8/4F4XGJx40sueDyTYZ6Fm vfSdhorUVdYnnuVGdng95M57Ra11uHDicEeY4+mlQWC6NmoCXBbAUvgYR7viKx9Tmm aCSWcPNAqm1FZuTzq89DmvcxJ3/5KckcnVA8oUyZcXnorTlHvRw/6hnvoig9AZw8QV eunocWn+1dU8w== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Ymh282LMQz4wxx; Mon, 3 Feb 2025 20:26:08 +1100 (AEDT) From: David Gibson To: Stefano Brivio , passt-dev@passt.top Subject: [PATCH 2/6] migrate, flow: Abort migration on repair_flush() failure Date: Mon, 3 Feb 2025 20:26:11 +1100 Message-ID: <20250203092615.500163-3-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250203092615.500163-1-david@gibson.dropbear.id.au> References: <20250203092615.500163-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: 6BX3HXFLDAE3PHDPIAIJSWLGWVY63IPU X-Message-ID-Hash: 6BX3HXFLDAE3PHDPIAIJSWLGWVY63IPU X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: If we're unable to set our sockets into repair mode, we won't be able to complete our migration. However flow_migrate_source_pre() currently ignores errors from repair_flush(). Propagate the error instead. Since we're not currently able to properly roll back a partial migration setup this fails rather messily, but better than carrying on as if nothing was wrong. [This is a candidate to fold into the earlier patch] Signed-off-by: David Gibson --- flow.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flow.c b/flow.c index 8fcf8c44..ceb20183 100644 --- a/flow.c +++ b/flow.c @@ -898,7 +898,8 @@ int flow_migrate_source_pre(struct ctx *c, struct migrate_meta *m) return rc; /* TODO: rollback */ } - repair_flush(c); /* TODO: move to TCP logic */ + if ((rc = repair_flush(c))) /* TODO: move to TCP logic */ + return rc; for (i = 0; i < FLOW_MAX; i++) { /* TODO: iterator with skip */ union flow *flow = &flowtab[i]; -- 2.48.1