mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Omar Ramadan <omar@blockcast.net>
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	[thread overview]
Message-ID: <20261130094957.1296951-1-omar@blockcast.net> (raw)
In-Reply-To: <179590132215.3135.4331794816051168597@kernel.org>

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

      reply	other threads:[~2026-11-30  9:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 21:04 [PATCH net-next v4 0/3] amt: configurable per-tunnel limits, with bounded report work Omar Ramadan
2026-11-24 21:04 ` [PATCH net-next v4 1/3] amt: make the A-B source walk linear Omar Ramadan
2026-11-24 21:05 ` [PATCH net-next v4 2/3] amt: bound the source-state work of one Membership Update Omar Ramadan
2026-11-28 21:28   ` netdev-bot+sashiko
2026-11-24 21:05 ` [PATCH net-next v4 3/3] amt: make the per-tunnel group and source limits configurable Omar Ramadan
2026-11-28 21:28   ` netdev-bot+sashiko
2026-11-30  9:49     ` Omar Ramadan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261130094957.1296951-1-omar@blockcast.net \
    --to=omar@blockcast.net \
    --cc=andrew+netdev@lunn.ch \
    --cc=ap420073@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev-bot+sashiko@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®