On Sat, Nov 07, 2026 at 06:44:28PM +0000, Omar Ramadan wrote:
> + if (b->path == AMT_OFFLOAD_PATH_INGRESS) {
> + amt_offload_count(amt, AMT_OFFLOAD_CNT_PUNT_DROPPED);
> + consume_skb(skb);
> + gone = true;
> + goto out;
> + }
amt can't tell a punted copy from a packet legitimately routed to the
relay. Traffic for the group that never crossed the hardware, from
another NIC or a local sender, is dropped here and the only trace is
punt_dropped. In addition, on ingress a leave doesn't clear hw_active,
so a departed gateway keeps receiving until the recommit.
No provider implements this path; so I presume it can be dropped from
this series.
> + res = b->ops->xmit(&b->pub, g->hw, skb, READ_ONCE(g->hw_gen));
> + switch (res) {
> + case AMT_OFFLOAD_CONSUMED:
> + gone = true;
> + break;
With a hardware provider, consumed traffic never shows up in the
relay's counters: ip -s link stays flat, and ops->stats is never called.
netdevsim hides this because its copies go back through amt_udp_xmit().
IFLA_STATS_LINK_OFFLOAD_XSTATS is probably the place for these counters.
A leave withdraws the group to software at once, but a join keeps
serving the old committed set until the reconciler recommits. A new
gateway therefore gets nothing for as long as the reconciler is behind,
which is unbounded under a backlog or a reset loop. Software would have
served it from the next packet. Withdrawing around every commit (see
1/9) fixes this.
> +EXPORT_SYMBOL_GPL(amt_offload_encap_xmit);
This is exported only so that netdevsim can reuse amt's own encap. The
reference provider therefore runs amt's code, and the "byte-identical to
software" check is circular.
> + default:
> + WARN_ONCE(1, "amt: offload xmit returned %d\n", res);
> + break;
After an unknown return value the skb's ownership is unknown, yet the
code falls back to software and uses it. Treat it as consumed, or make
the contract leave no third option. What do you think?
Regards,
Antonio