Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3006190rdh; Mon, 27 Nov 2023 04:38:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IEiUTG0Vo03APeLo8XWYU2ZM5VbR0TwhYYISAOscC2e3zSm2nhnX5mL/gX+0nUX4qYFdo8H X-Received: by 2002:a17:902:9a8c:b0:1cf:e012:9fb8 with SMTP id w12-20020a1709029a8c00b001cfe0129fb8mr460200plp.60.1701088733031; Mon, 27 Nov 2023 04:38:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701088733; cv=none; d=google.com; s=arc-20160816; b=vA/7iFoDvMy8gBsfGT+deoxZ1Xh0sPxGkksQ9eHsR3ZKMpdsXPmEUk9fi6wtydEfYt XLzCmCa+RXdAvUIhTolTiB32SCMqscTsArUm+59qFO3vu/ABydgHlJ9EF+5Mmvaylkka tY3KK7CottvIRh+UVHDMeC+GAkeeVI1/zuKV9pCrGD3MI9iKX11J0WViReZJJeQcnpym kj7tjy4ad8shj00iJxkm8PWU1MSmJr6m3PRg2BuO32O6N6QNR6RvXT70WMXIHYrI75cy WV4M5Uf6393seA8piSPTpqIc7Ltl+9EpCLhFsgpoTv7UoaVmscQ6syAUulrCO7o+z2fs ZMHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=QiL7oag+cJ/F+t+DJ7imSm1/aE6P2+MOKU8xTw7R4AY=; fh=HzV5w5t0x/Dkdo/FZGgbQQ665RvCgOHMyALNrZyIkag=; b=tjME3aVbV5JItoYv4h/WdZC76O46DNLVG/NOLtPvplIaELEDOPFzn1KQCtGy7+SQMY FvIe/j+nY85g9UWU1hflD/ren0Ax+kcAVBOb0WLd5oZA1U6w7QCpA7pNye7u15KCPXkY Hlk0or/1RhwKZkMn5lbae8uj4u1Wl1Nu8ClLWfvCAIms2OhbIDjNVBI8zyNQCDJdWcy+ 9ETX/IXvdjOkTDAdBpZZzRSYPkEIYR3I7P/w/JpVe4TLL69MPQGV34fEwjbWsvloUcfq 7IUfGlU/jslJQyOJZAuGlkHU2lpdiDeDI3A6cdPKmpI8LjQORH3xQtwzoLGFnpCPLiAJ tUlw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id u6-20020a17090282c600b001cc2a0618f4si8045318plz.199.2023.11.27.04.38.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 04:38:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 4ED538068FE7; Mon, 27 Nov 2023 04:38:49 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233192AbjK0Mid (ORCPT + 99 others); Mon, 27 Nov 2023 07:38:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233389AbjK0MiQ (ORCPT ); Mon, 27 Nov 2023 07:38:16 -0500 Received: from ganesha.gnumonks.org (ganesha.gnumonks.org [IPv6:2001:780:45:1d:225:90ff:fe52:c662]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C27301BD; Mon, 27 Nov 2023 04:38:16 -0800 (PST) Received: from [78.30.43.141] (port=38766 helo=gnumonks.org) by ganesha.gnumonks.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r7asJ-001Z1Q-Bn; Mon, 27 Nov 2023 13:38:09 +0100 Date: Mon, 27 Nov 2023 13:38:06 +0100 From: Pablo Neira Ayuso To: Felix Huettner Cc: linux-kernel@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, kadlec@netfilter.org, fw@strlen.de, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, shuah@kernel.org, luca.czesla@mail.schwarz, max.lamprecht@mail.schwarz Subject: Re: [PATCH net-next v2] net: ctnetlink: support filtering by zone Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Score: -1.8 (-) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 27 Nov 2023 04:38:49 -0800 (PST) Hi, On Mon, Nov 27, 2023 at 11:49:16AM +0000, Felix Huettner wrote: > conntrack zones are heavily used by tools like openvswitch to run > multiple virtual "routers" on a single machine. In this context each > conntrack zone matches to a single router, thereby preventing > overlapping IPs from becoming issues. > In these systems it is common to operate on all conntrack entries of a > given zone, e.g. to delete them when a router is deleted. Previously this > required these tools to dump the full conntrack table and filter out the > relevant entries in userspace potentially causing performance issues. > > To do this we reuse the existing CTA_ZONE attribute. This was previous > parsed but not used during dump and flush requests. Now if CTA_ZONE is > set we filter these operations based on the provided zone. > However this means that users that previously passed CTA_ZONE will > experience a difference in functionality. > > Alternatively CTA_FILTER could have been used for the same > functionality. However it is not yet supported during flush requests and > is only available when using AF_INET or AF_INET6. You mean, AF_UNSPEC cannot be specified in CTA_FILTER? Please, extend libnetfilter_conntrack to support for this feature, there is a filter API that can be used for this purpose. Thanks.