From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=195.10.208.47 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796321170; b=KnWvD2oGADoEM2nvgrK+RN5pPRngEfGpawdBruAItVSbaVHJOAP1NmbfcG1ppyrTe7d4 1ryw0nzTvfvmY2jv2kODHhoc30oeFQflIZIOi088+KM4aQzt4oq8ZHiWQenh4iUVGHMW/ Cwz+deeWFaVyAEUhehmNZ9INcZjeY8JNrctryMXgESxYadYq78xfWuwLkk1LzxrXkWaKD i96H406lcqLLi4eBZBUHwRBkyAtErWed83DUzPPm8Ywa7x7yBOd5BQjQVIciqXwxEQ/wB lCSyb3pz2rBb7UK5iw+/wUU0epmPuy4X3Xj7QDoqsvgMHpgMhCGEXrIW1oYf8Hipc2Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796321170; h=DMARC-Filter:Received:DKIM-Signature:From:To:Cc:Subject:Date: Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Rspamd-Queue-Id; bh=xI6glpZQRaITVebxGFJeUEByuwoYSqwQaXIBdfSu8eU=; b=wlygo9CmG0Nups5sn66Co3d+NvHjmh5JUE0PzTGnSMjZu3ojedgyl9FC3uJZSZsmANOJ 9JApJ8IwjBbYS4hle+Jw3RWx2wTKmZ9O8rJp6kKoX70Vg6hpswE3rGqPgcInmyoOOQlDt dMz9PcTfOdLhLhH0KmrzL3bptzEUbDg3tVbAwjFe9L1v0EauHGeusOIO69b3rWPRz54eA 54/cGBNi1sCY1TYblWjvGp0+jwP5jCs536di/YHhEWXblR32wAknDt1t0EW72UPjFN+Zz Nz19SoTZCpVfiNWOfYfBKHDCJQAYk7FosVDj3XMVUXD7CZaIXJSMJQNm0isRsO4mkdg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=mandelbit.com; spf=pass smtp.mailfrom=mandelbit.com; dkim=pass header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=YDY53Dth; arc=none smtp.remote-ip=195.10.208.47 Received: from mout-b-107.mailbox.org (mout-b-107.mailbox.org [195.10.208.47]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 49E2C606A322; Thu, 3 Dec 2026 18:06:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 49E2C606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mandelbit.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mandelbit.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=YDY53Dth Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519MLKEM768 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-b-107.mailbox.org (Postfix) with ESMTPS id 4jgMxm2wFVz3yLL; Thu, 03 Dec 2026 19:06:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandelbit.com; s=MBO0001; t=1796321164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xI6glpZQRaITVebxGFJeUEByuwoYSqwQaXIBdfSu8eU=; b=YDY53Dthy+uq6T37xdb4iLxRjYGN+fENtY4uflhIyzr3MpyWAVd5caeMPOUoqNEA329MUJ sSthNdaLntmA91jmjCK7LLkNYSKk1i4ODNaM/bPqfRARWKweWwMR2O9eokYAkrMg7pt++z lRnZR+U0o4blqHT3rwBm9oShYayetzpK5uWqdl/HhcThtq7qbSazMb9DQ2yTSsEki04sa1 oxzefqaVfXMvNkTrjj6pPcJUerJhFx9dAIXWcn6JOxDWcZ3chUl0khZw+lz47bcP6xwZ3m zV3XNAZET1L+9AZi5XAsfITKZG9uKoZq1v5hEMj2bVl62MZmoeqTjbAGknVvPw== Authentication-Results: outgoing_mbo_mout; dkim=none; spf=pass (outgoing_mbo_mout: domain of ralf@mandelbit.com designates 2001:67c:2050:b231:465::102 as permitted sender) smtp.mailfrom=ralf@mandelbit.com From: Ralf Lici To: Xavier HSINYUAN Cc: antonio@mandelbit.com, bgalvani@redhat.com, coreteam@netfilter.org, davem@davemloft.net, dsahern@kernel.org, dxld@darkboxed.org, edumazet@kernel.org, fw@strlen.de, horms@kernel.org, idosch@nvidia.com, kuba@kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, netfilter-devel@vger.kernel.org, pabeni@redhat.com, pablo@netfilter.org, phil@nwl.cc, toke@kernel.org Subject: Re: [RFC net-next v2 00/18] net: introduce ipxlat stateless IPv4/IPv6 translation Date: Thu, 3 Dec 2026 19:05:51 +0100 Message-ID: <20261203180552.924347-1-ralf@mandelbit.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: References: <20261114094722.114623-1-ralf@mandelbit.com> X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4jgMxm2wFVz3yLL Hi Xavier, Sorry for the slow reply, I wanted a working prototype before answering. On Mon, 23 Nov 2026 10:27:33 +0800, Xavier HSINYUAN wrote: > Hi Ralf, > > Thanks for looking into this! > > > Actually v2 has no netdevice attachment any more, the LWT is the only > > harness in this series. > > > > Ah, I was thinking of a possible future netdev attachment at the time. > Thanks again for pointing that out. > Right, with the engine separate from the harness that is possible now, and it may be a good follow-up for host CLAT deployments. > > Which setup do you have in mind: SNAT before translation, filtering, or > > accounting? > > My interest is mainly SNAT and counting before translation. Well, > stateful SNAT seems a bit odd for IPv6, but with multiple upstreams we > may need to adjust the source prefix based on the selected output > interface for load balancing or failover. > That's a sensible setup, and v2 can't really do it because the selecting route ends original-family processing before POST_ROUTING. > That said, separating NAT and translation by utilizing netns and veth > pairs could already provide this, but letting packets pass through > original-family POST_ROUTING before translation would make setup (looks) > simpler. > Agreed, that's why I decided to revisit the attachment point. v3 replaces the LWT harness with an nf_tables object (yet another model, I know), referenced from filter chains at prerouting or postrouting through objref. At postrouting the original family has already routed, filtered and NATed the packet, and its conntrack entry is confirmed when the packet leaves, so replies translated back are established and the NAT is reversed. The translated packet then goes through the translated family's routing and hooks, so interface-based decisions work there as well. During v1 I was wary of a netfilter attachment because of reinjecting into the other family but patches 01-03 now take care of that and of the fragmentation details, which made a hook far more tractable than it looked. v3 docs will also spell out what each hook placement runs in each family (which is the per-hook table I promised). I plan to post v3 by early next week at the latest, with CLAT (NAT44 + CLAT) and PLAT (NAPT66 + SIIT) examples and selftests covering both. Your setup is a good real-world case, so feedback would be very welcome. Thanks! -- Ralf Lici Mandelbit Srl