Netdev List
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: netdev@vger.kernel.org, Simon Wunderlich <sw@simonwunderlich.de>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	b.a.t.m.a.n@lists.open-mesh.org,
	Antonio Quartulli <antonio@mandelbit.com>,
	Simon Wunderlich <sw@simonwunderlich.de>
Subject: Re: [PATCH net-next 01/10] batman-adv: dat: drop non-4addr backwards compatibility
Date: Thu, 06 Aug 2026 17:03:41 +0200	[thread overview]
Message-ID: <14211429.uLZWGnKmhe@sven-desktop> (raw)
In-Reply-To: <20260805143200.722098-2-sw@simonwunderlich.de>

[-- Attachment #1: Type: text/plain, Size: 2151 bytes --]

https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260805143200.722098-1-sw%40simonwunderlich.de?part=1

> --- Patch [1]: [PATCH net-next 01/10] batman-adv: dat: drop non-4addr backwards compatibility ---
[...]
> Discovered by: opus-5 · Missed by: old-prompts, sashiko-gemini · Confirmed by: old-prompts
> Was the removed else branch really only reachable when talking to
> pre-compat-15 nodes?

This is a misrepresentation of the commit. The code was added in batman-adv 
with compat 14 when not all nodes had support for 4-addr packets. 
With compat-15, all nodes must have support for 4addr packets and the 
backwards compatibility hack is no longer needed

[...]
> After this change those cache replies go out as BATADV_UNICAST_4ADDR, and on
> the receiver batadv_recv_unicast_packet() now takes the is4addr path:
> 
> 			subtype = unicast_4addr_packet->subtype;
> 			batadv_dat_inc_counter(bat_priv, subtype);
> 
> so BATADV_P_DAT_CACHE_REPLY RX accounting is incremented where it previously
> was not, and the encapsulation of these replies changes in packet captures.

Yes, but what is wrong about the correct packets and correct accounting?

[...] 
> Discovered by: opus-5 · Missed by: old-prompts, sashiko-gemini · Confirmed by: old-prompts
> This is a pre-existing issue and not introduced by this patch, but while
> looking at the DAT subtype decoding: the default arm of the inner switch in
> batadv_dbg_arp() prints the packet type where the message says subtype:
> 
> 		switch (unicast_4addr_packet->subtype) {
> 		...
> 		default:
> 			batadv_dbg(BATADV_DBG_DAT, bat_priv, "* type: Unknown (%u)!\n",
> 				   unicast_4addr_packet->u.packet_type);
> 		}
> 
> That arm is only reachable from case BATADV_UNICAST_4ADDR: of the outer
> switch, so the value printed is always 0x42 rather than the unrecognized
> value from enum batadv_subtype in include/uapi/linux/batadv_packet.h.

Irrelevant for this patch but I've submitted a mini fix:
https://patchwork.open-mesh.org/project/b.a.t.m.a.n./patch/20260806-4addr-unknown-subtype-print-v1-1-e906357a5895@narfation.org/

Regards,
	Sven


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2026-08-06 15:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-05 14:27 [PATCH net-next 00/10] pull request for net-next: batman-adv 2026-08-05 Simon Wunderlich
2026-08-05 14:27 ` [PATCH net-next 01/10] batman-adv: dat: drop non-4addr backwards compatibility Simon Wunderlich
2026-08-06 15:03   ` Sven Eckelmann [this message]
2026-08-05 14:27 ` [PATCH net-next 02/10] batman-adv: tvlv: handle negative tvlv processing return codes Simon Wunderlich
2026-08-06 15:36   ` Sven Eckelmann
2026-08-05 14:27 ` [PATCH net-next 03/10] batman-adv: add missing kernel-doc comments Simon Wunderlich
2026-08-06 16:02   ` Sven Eckelmann
2026-08-06 18:25   ` Sven Eckelmann
2026-08-05 14:27 ` [PATCH net-next 04/10] batman-adv: fix kernel-doc for functions holding skb ownership Simon Wunderlich
2026-08-05 14:27 ` [PATCH net-next 05/10] batman-adv: annotate functions which may reallocate the skbuff Simon Wunderlich
2026-08-06 16:13   ` Sven Eckelmann
2026-08-05 14:27 ` [PATCH net-next 06/10] batman-adv: split multiple declarations per line Simon Wunderlich
2026-08-05 14:27 ` [PATCH net-next 07/10] batman-adv: switch var declarations to reverse x-mas tree order Simon Wunderlich
2026-08-05 14:27 ` [PATCH net-next 08/10] batman-adv: handle errors in batadv_init() Simon Wunderlich
2026-08-05 14:27 ` [PATCH net-next 09/10] batman-adv: correct NET_RX_* NET_XMIT_* confusion Simon Wunderlich
2026-08-05 14:27 ` [PATCH net-next 10/10] batman-adv: remove negative returns for batadv_send_skb_unicast Simon Wunderlich
2026-08-06 16:26   ` Sven Eckelmann

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=14211429.uLZWGnKmhe@sven-desktop \
    --to=sven@narfation.org \
    --cc=antonio@mandelbit.com \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sw@simonwunderlich.de \
    /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