Re: [PATCH net-next 10/10] batman-adv: remove negative returns for batadv_send_skb_unicast
Sven Eckelmann <[email protected]>
| Newsgroups | org.open-mesh.lists.batman,org.kernel.vger.netdev |
|---|---|
| Message-ID | <3216364.e9J7NaK4W3@sven-desktop> |
https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260805143200.722098-1-sw%40simonwunderlich.de?part=10
> --- Patch [10]: [PATCH net-next 10/10] batman-adv: remove negative returns for batadv_send_skb_unicast ---
[...]
> > @@ -360,7 +361,10 @@ int batadv_send_skb_unicast(struct batadv_priv *bat_priv,
> > if (batadv_tt_global_client_is_roaming(bat_priv, ethhdr->h_dest, vid))
> > unicast_packet->ttvn = unicast_packet->ttvn - 1;
> >
> > - ret = batadv_send_skb_to_orig(skb, orig_node, NULL);
> > + res = batadv_send_skb_to_orig(skb, orig_node, NULL);
> > + if (res == NET_XMIT_SUCCESS)
> > + ret = NET_XMIT_SUCCESS;
> > +
>
> Discovered by: opus-5, old-prompts · Missed by: sashiko-gemini
> Does this change more than the counter in
> batadv_dat_snoop_incoming_arp_request()?
>
> In distributed-arp-table.c the same condition that bumps the counter also
> sets the boolean return value:
>
> err = batadv_send_skb_via_tt_4addr(bat_priv, skb_new,
> BATADV_P_DAT_CACHE_REPLY,
> NULL, vid);
> if (err != NET_XMIT_DROP) {
> batadv_inc_counter(bat_priv, BATADV_CNT_DAT_CACHED_REPLY_TX);
> ret = true;
> }
> out:
> batadv_dat_entry_put(dat_entry);
> if (ret)
> kfree_skb(skb);
> return ret;
[...]
> Could the changelog also mention that the packet disposition changes, i.e.
> that the snooped ARP request is now delivered locally instead of being
> dropped when the cached reply cannot be sent?
Fair enough, but not sure if it is worth sending the PR again to document that
this is the correct behavior too.
Regards,
Sven
signature.asc
(application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQS81G/PswftH/OW8cVND3cr0xT1ywUCanS1nwAKCRBND3cr0xT1 y7CvAQDMBvgESXFOmJfS2TUbdom9xSRdSCv5fy8cxYRiXvFVlwEAvSAvBEy1uAlu +cteZTtC4bu4dF5Hsa+aXx3bkZnHHwc= =0ajW -----END PGP SIGNATURE-----