From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.169 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796032201; b=2TxkW+Xf+7DwYjS2dECKQWjbvBDL8QGzzi1Aen7lhjcNNS7D3lbeNPtNChznQAUIGm/C S2xzCdRJjrb9Ymau71VMosb5M+HGx1Z/mNndaHpiYtEEmxQq4Nn5VSX3/3RlOxBBaJciT Bo8/KS2qAX/9+GuYXeeUUdT2H9M+4VWaqq1Cr67eW5peNu7h2rJwFlEMkmryURNQXHgNt 2Iu6zDyGmaLSFBlQhhZJ9onaAprNSjrki73qpcilfNHchhukD0KUcL0UGSYGDv8gWbx7S GYhykpC1Xn2NKTGTLi0IaEX6CSCETFg0fe7w1QPf15ivZMDZQBLU12Taj7QKP7QJpCg== 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=u/GC/vwYsdb5Il9y6+b7IeGkaropDTN5H6rmAW5EZEaRJeqpXZa97V0NxfS4FRZG6KPB E+sxrvaO9umTwvzznSPZ/Dfx7aT/PLMJzdz78LpRJ3WbxtOdop1JFsbUqp35hYh5rh2g8 qrf67OaF9BFM47f6e0bSWmKQbHlmLGInLwvQfwpUG4+uVAYBb2gdMdXzopsUtAg93lBN1 PKyEgQN4+HEXUBrLbizXQmoq+FSOxMddefGgrYzI93IiRNcdHQePdQ/GBPw3NuPoZCBNN t/zleE5ZmY6L6/VCFlQJ8ko62rk5o4Ed9uuNplvMbI0yg4j+85/IfXuLz4EsuMwyttQ== 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.169 Received: from mail-dy1-f169.google.com (mail-dy1-f169.google.com [74.125.82.169]) (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 4F9D5606A68D for ; Mon, 30 Nov 2026 09:50:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4F9D5606A68D 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, unprotected) header.d=blockcast.net header.i=@blockcast.net header.a=rsa-sha256 header.s=google header.b=taurjdz4 Received: by mail-dy1-f169.google.com with SMTP id 5a478bee46e88-386ab9ab619so15145047eec.1 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=tRDTxph1KnVb7Bk//wAsfeRXoNlhQiYKL1dTSBsEpoIwkROIOdhttumMlKfQUgkUkx fpiWd3KPiWzKyI+ocyejqsBFqhjDN4jNbLnRnaiNdl71T5/rwS0bjSxrrs2diOn9RSL6 8LqqKW2jKhMopK5aRFH37QWQoaHFMn9SuGLUhch/GB4j19cF8IW/yZVVCxiKS1rKB9DI t9rSCxw/W1vTFfYUqW4S1vx8m6gbX3SiU0nJdtY905xLwkJkgIOXE+cDOBss9FyHAxkb pok7Fz0rWuYe8K5LwhmJD+VXTYAEywWpVKM2C5HSuoe8Dva2U5YITzllYiFcD5Vtpcof tCCw== X-Forwarded-Encrypted: i=1; AL+hErGn0yG3rBHunSleKV4JHhhRPSBwsiHffqz26SfufgS2oqhrUxjuQpSnPf896m6ZCkdD09NBCs3ef6DqN5k=@vger.kernel.org X-Gm-Message-State: APuU4Z+EXoi5OqXVS7cp5RvbfC8p9ElPdwBGydJuR9eV7S0rgJjb4cNQ Oy2kYQq+2VvBrEi8LKQ+JMztz6ME7VDyYI8oQvVGB4tWyy4hBTZytxjWQMiOSu0bRU4= X-Gm-Gg: AZFdTZcW8QYZi/Wcc+kl7ySaSI/xFwr+QtbeDr+AB3YoRGU1fcETSqAGXgjzsew/5Wc HrZD1AuJ8bua5K4g63c6aX4HNm5MH+WWv5F5DCvoF/KUpk7Q8L0qE0Mg6ZU0wcAzk+/zWF5I/1o WwYkXF1kLDJwv7tD/V1N3EpbOSxQ55GKC7D3SUCOOMIBZB1gPkiX3gXjotk01J0LjJBvCHaLu5F PBEZ8Mu7bZMiBCoYKCgQOz11uJ1zkXxkPo3jdgfJCHq/w3BPODI7o6FgHaDJQfAvpVaCbYIn3jc 8ZRyRRiXYXmAn6onmo9bU+cqmfAkisIKmuUhphjaDE3lTlbI1oQfAuuGkio4eG0UpQE8wOIRG05 V6Ldmq9h/PyTpSvAKk+WKC6zyGNGGuLU79SRacVDimxKkCaO0tf+pnMAXc/5a6y2It1KaoCa5MR tEljLLfsPXD8k8z7LKrlQfWXMMBSFc4gXpePL6/JY2GndJBiahp9mAJogojfBtWALPWlmfdHvq0 t3ZHo3zWdp+zmtaf1/I6kYilAO6Q6lKQ8iqnc9lAnhZaa7QZq9nsKxcDWdr1NLcu0XrTN0Zt3uL pbMxSvfiWJQWG7PhLj34OuMIjElOeLsPv8fwbz9gTT4ZwxMO0hqSoHCSudZSiOKJfLuj8daFGYW YwR8/SnzXmLPrzMitrkUwyGzusDQ= 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: linux-kernel@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