B.A.T.M.A.N Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: "Linus Lüssing" <linus.luessing@c0d3.blue>
Subject: Re: [batadv,v12 2/5] batman-adv: split DAT cache into DAT cache and DAT DHT
Date: Sat, 03 Oct 2026 10:04:10 +0200	[thread overview]
Message-ID: <3606315.aeNJFYEL58@sven-desktop> (raw)
In-Reply-To: <20261003072628.28052-3-linus.luessing@c0d3.blue>

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

On Saturday, 3 October 2026 09:26:25 CEST Linus Lüssing wrote:
>  #if LINUX_VERSION_IS_GEQ(6, 1, 0) // UGLY_HACK_NEW
> -       .resv_start_op = BATADV_CMD_SET_VLAN + 1,
> +       .resv_start_op = BATADV_CMD_GET_DAT_DHT + 1,
>  #endif // UGLY_HACK_STOP

No, this field is never to be changed for new commands.


 * @resv_start_op: first operation for which reserved fields of the header
 *	can be validated and policies are required (see below);
 *	new families should leave this field at zero
[...]
 * Attribute policies (the combination of @policy and @maxattr fields)
 * can be attached at the family level or at the operation level.
 * If both are present the per-operation policy takes precedence.
 * For operations before @resv_start_op lack of policy means that the core
 * will perform no attribute parsing or validation. For newer operations
 * if policy is not provided core will reject all TLV attributes.

You should make sure that your new op has an appropriate policy and the client 
does the right thing. The former is already the case because the family policy 
is inherited.

See

* https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9c5d03d362519f36cd551aec596388f895c93d2d
* https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4fa86555d1cd338afc6e6308cc1ff890a014ec8c
* https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ce48ebdd56513fa5ad9dab683a96399e00dbf464


> @@ -1498,6 +1498,12 @@ static const struct genl_small_ops batadv_netlink_ops[] = {
>                 .flags = GENL_UNS_ADMIN_PERM,
>                 .dumpit = batadv_dat_cache_dump,
>         },
> +       {
> +               .cmd = BATADV_CMD_GET_DAT_DHT,
> +               .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
> +               .flags = GENL_UNS_ADMIN_PERM,
> +               .dumpit = batadv_dat_dht_dump,
> +       },
>         {
>                 .cmd = BATADV_CMD_GET_MCAST_FLAGS,
>                 .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
> 

Please keep it in the enum batadv_nl_commands order.

Regards,
	Sven

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

  reply	other threads:[~2026-10-03  8:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-03  7:26 [batadv,v12 0/5] batman-adv: increase DAT DHT timeout Linus Lüssing
2026-10-03  7:26 ` [batadv,v12 1/5] batman-adv: move local ARP reply code to subfunctions Linus Lüssing
2026-10-03  7:26 ` [batadv,v12 2/5] batman-adv: split DAT cache into DAT cache and DAT DHT Linus Lüssing
2026-10-03  8:04   ` Sven Eckelmann [this message]
2026-10-03  7:26 ` [batadv,v12 3/5] batman-adv: increase DAT DHT timeout Linus Lüssing
2026-10-03  7:26 ` [batadv,v12 4/5] batman-adv: avoid superfluous DAT DHT_PUT if self-candidate Linus Lüssing
2026-10-03  7:26 ` [batadv,v12 5/5] batman-adv: avoid superfluous DAT DHT_PUT additions to local DAT Linus Lüssing

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=3606315.aeNJFYEL58@sven-desktop \
    --to=sven@narfation.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=linus.luessing@c0d3.blue \
    /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