From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.173 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796032201; b=f62zyh7rD+JScHJnTUJnU5koOR+nb7tIxQJPnt46aPP0XfAmwP6Pu/S+DpnDqK+JBAFE cPptuEi98A+4ZLty0NuiRwT4RjTkigRPOPtM693era4HMSVFZQDOCPTcsoKEoD9skJMrY F0uQ311SQbeUMCAeBF0d4klcg1qpPE/qgDM54CU5hyyA764Pukf+HahQQARVHL6RUgOoJ zBMRiKA3Xi1DefoY1OSD88l13BuilVKQJZNGev7w6rCnNp06uP5kRvqM46NYdtTb9iNQH XJ1RN9FKaP1mmagTZTtAejB6HCZDyf27klG1M2vwCLrDsz1atzzlodhWStjYur1E1YQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796032201; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=xSGTyS/WrRCWBRAh6LcGIYsr/uP0shF7mv+4x+gY05Y=; b=glcoG8AndIYRQFWWRtmXFYD2piZznDZ3MGWAQB9r87+m8KG5vr0MMwrlYIOWZ+Zmuge9 nsaVsR9b3Ga6Ht7LIKcY1rrH3YlwvCy8LsVNIpaj3n3DleKBSLK4F8AOKwEta5DzNk3nc RpsfW+npNTPde1d/YmpH0lS/Nz82z4HqtIU6uGzWKweCOyOqqxFFsrC3oXRvsTbMnhEGO Tw5ljuSgbKRg1u6uFV9PI5Ev4eC8nRHjw/Mg3AWDX9xhqS7sU3kAEqMXj4b6WNr5WV7Za Zk3Crj94mkQSj7V0zxdU/cX6h+bITqQJpjP3uTja1QB0y7At9wx7zOWG1VqzI+32rdg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=blockcast.net; spf=pass smtp.mailfrom=blockcast.net; dkim=pass header.d=blockcast.net header.i=@blockcast.net header.a=rsa-sha256 header.s=google header.b=taurjdz4; arc=none smtp.remote-ip=74.125.82.173 Received: from mail-dy1-f173.google.com (mail-dy1-f173.google.com [74.125.82.173]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4EA90606A68C for ; Mon, 30 Nov 2026 09:50:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4EA90606A68C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=blockcast.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=blockcast.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=blockcast.net header.i=@blockcast.net header.a=rsa-sha256 header.s=google header.b=taurjdz4 Received: by mail-dy1-f173.google.com with SMTP id 5a478bee46e88-3866a784546so14474952eec.0 for ; Mon, 30 Nov 2026 01:50:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=blockcast.net; s=google; t=1796032200; x=1796637000; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=xSGTyS/WrRCWBRAh6LcGIYsr/uP0shF7mv+4x+gY05Y=; b=taurjdz4ZT2WeEbypR4UpVKPnJ6EbnDN+p7+QdB4BgSXX3pl10KXZgIymNDEZQIUnF MiSQw7no1zwVK42b5dF18x3HMcjVkbJLScP77fkAFfS16mp5tGDJ8Gi43eJF7Ny6Qwha WTtRwizw9w4dfACpcrOKvqnY480/+ce+rGJid+1r8EVvXjInskth1zvcFRRktez2TdXu VvS9GkTX7a3DK8uOxL5aBkZSg6KvdACHEpUj2leFxZzN90dv2N+1HEITDGEF5o+g0F1i DXK1953qR629yNDufiK5D4Z4v4b5Xg/kFAXT8kY0vb24zNtp3zzDcmncRp7OsIKvUtlh 1nrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796032200; x=1796637000; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=xSGTyS/WrRCWBRAh6LcGIYsr/uP0shF7mv+4x+gY05Y=; b=aSTIxaFQ+MyHyFaNC5WjRGB1TzkGuHFe9UNq+ku5FohzMGyynTUd1oiuFOPAd8ZUBS GWPbNUztARlVUqPsUmcExQbTnArbNvYbDb8otDzBZqIvUXUxZcEi1HKoSPSdBcjN5aW3 Ck40Vb8eC2RsOlWYRSwDJHwkcBqzLnUjyguyPfw2LLvpJJXaX9mS0sYUq2fbnlRZd+Qi wH0w6a5xsDhvbi466xAhRCKu/fYx/U+kjjtq5FSowBK3Whqn1Wu4BEjTn2rhthnPsVzj ZpWAnFLhoGE6GKioT4jw3tn+QOmJGghWmu+U/Mn2pqHdQLTQ49Aryov2vLY0JHqNQY2L yc9A== X-Forwarded-Encrypted: i=1; AL+hErFVb+W7eMWh1vvnuwznLtUYveoFwR5vfQnYHfgJC75CKylf0gqknsFkP2w3S938uc4+XbcZD5k=@vger.kernel.org X-Gm-Message-State: APuU4Z/R1k8Tv2861QkH+AwbE1OR4y0mPFCwJoUgK0jAxA8gyg5MvjFn SDwEiTKlRqfSOtPnh1vkDST147Td+ZBAcNZs5X4kq+VMddVMKaSJv0X4KJ2VAXtmS+4= X-Gm-Gg: AZFdTZePgTt6kIRRz/nxM/xrhXhsyTNdhis85J/nI8aSg1O+RJjhto1mAB1H17O8lcN 0BDj9qRKfuKo/e3x2HgLO7jjQ5hWuEFprUGSJ0UC05K9YX7hbuEsqHGuz4O1fzIHWD5NkVBx1p4 B+yDE2hU4RM/G+25uWgK0ZBDwxl9kRnCTWHfd9LXjOIoJvPWbcHiMR5+izq+Lwlt0Mwl3qbnYdH K/twrmsxcKvPDlujBJHVZhtYXhLSJrTMqYOa1syY/Dq2QeRFOwEX8BL7wCIWR315DNAEevvhFZV D3lt/AQOPDZRsz46XbsR6l52Zb+u2lbd76qCVXu9wSqFKgYIR2gL6C5EHHPHKW7aNJ7oHSbuLtY PwbkMkXyeru1nHzEUlWNJ+TcOHp4bKvej4F8GIYid/s2pfuFFQ5yX6cwG3p7RHSiHqzuATC2R7p egXOKN6f4F684+qNjNSvfaPlF7GO/DCZgds+vOr/hCkGo6Aio3DiSEkrlHCEU3tCHBhuGU6Skir Dj6ELiZn+ND7evhml4ScaAiF3KOssL6A01tyaNwGn7+h1YnUE8572Y63V6fqEPmOGwfUOj9k8Pe jq9SZhqApZGcMO/LtRkdUZhGvkHA6/ts/R9rIeePRS1PLiv7TS6mrAke7jK5+TVFsImVkTnUMPv BD+umFdmBCXRbJW329RNidMkf4JI= X-Received: by 2002:a05:693c:8959:10b0:386:a603:506f with SMTP id 5a478bee46e88-386a60351eamr25559761eec.26.1796032200193; Mon, 30 Nov 2026 01:50:00 -0800 (PST) Received: from devbox.ts.blockcast.net ([2602:f74d:1::32]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-38566fdce48sm105065560eec.14.2026.11.30.01.49.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 01:49:59 -0800 (PST) From: Omar Ramadan To: netdev-bot+sashiko@kernel.org Cc: ap420073@gmail.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, horms@kernel.org Subject: Re: [PATCH net-next v4 3/3] amt: make the per-tunnel group and source limits configurable Date: Mon, 30 Nov 2026 09:49:57 +0000 Message-ID: <20261130094957.1296951-1-omar@blockcast.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <179590132215.3135.4331794816051168597@kernel.org> References: <20261124210501.70394-4-omar@blockcast.net> <179590132215.3135.4331794816051168597@kernel.org> 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 On Sat, 28 Nov 2026 21:28:42 +0000, netdev-bot+sashiko@kernel.org wrote: > Do the defaults still keep the previous bound here? recs comes from > the relay amt device's own MTU. No. With the defaults the MTU term is the smaller one whenever the relay's amt MTU is 527 or less, as you compute (1792 * recs + 2816 against 120,320), and below about 256 it is smaller than a full refresh of 32 groups. A gateway sizes its reports to its own MTU, so a relay whose MTU was lowered would truncate the same tail of every periodic refresh. v5 assumes at least an Ethernet link for the second bound, 1500 / 8 = 187 records, and it floors that at min(max_groups, 187) groups. At the defaults the bound is 120,320 for a relay MTU of 528 or more, and no lower than the 60,160 that refreshing 32 groups costs below that. The comment and the message say so. > Does amt_report_budget() then really cap one Update at "about 416,000 > visits at the ceilings", as the commit message says? No, for the reason you give: a lookup that misses walks its bucket's whole chain, about 16 entries at 4096 sources in 256 buckets, and it was charged as one visit. v5 charges each lookup ceil(max_sources / hash_buckets) visits, one at the defaults, so the default bound stays 120,320, and 16 at the ceilings. The lookups the MTU bound may charge are capped at the sources one report can name, mtu / 4. Your example, one BLOCK record of about 16,000 absent sources against a full group, is then charged 7 * (256 + 4096 + 16000) + 8 * 16 * 16000 = 2,190,464 against a budget of 440,448 at a relay MTU of 1500, and is truncated at once. The bound at the ceilings is about 3.0 million for the first term and about 440,000 for the MTU term, 3.7 times the default and above the roughly 357,000 that the largest legitimate report costs. The 416,256 in v4 left the chain length out. This is arithmetic on the code, and the UML timings in the cover are re-measured for v5. I will send v5. pw-bot: cr -- Omar