batman-adv: fix kernel-doc for functions holding skb ownership

Most functions in batman-adv will take the ownership of an skb when they
receive it as argument.  Their NET_RX_DROP return value is only indicating
whether there was direct visible problem while processing it. The caller
must not try to also free the skb when such a negative return code was
received.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
This commit is contained in:
Sven Eckelmann 2026-07-10 22:27:36 +02:00
parent 3ebcaccc88
commit 104570fe64
No known key found for this signature in database
GPG Key ID: 4D0F772BD314F5CB

View File

@ -263,8 +263,7 @@ static bool batadv_skb_decrement_ttl(struct sk_buff *skb)
* @bat_priv: the bat priv with all the mesh interface information
* @skb: icmp packet to process
*
* Return: NET_RX_SUCCESS if the packet has been consumed or NET_RX_DROP
* otherwise.
* Return: NET_RX_SUCCESS on success or NET_RX_DROP in case of failure
*/
static int batadv_recv_my_icmp_packet(struct batadv_priv *bat_priv,
struct sk_buff *skb)
@ -986,8 +985,7 @@ static bool batadv_check_unicast_ttvn(struct batadv_priv *bat_priv,
* @skb: unicast tvlv packet to process
* @recv_if: pointer to interface this packet was received on
*
* Return: NET_RX_SUCCESS if the packet has been consumed or NET_RX_DROP
* otherwise.
* Return: NET_RX_SUCCESS on success or NET_RX_DROP in case of failure
*/
int batadv_recv_unhandled_unicast_packet(struct sk_buff *skb,
struct batadv_hard_iface *recv_if)
@ -1120,8 +1118,7 @@ int batadv_recv_unicast_packet(struct sk_buff *skb,
* @skb: unicast tvlv packet to process
* @recv_if: pointer to interface this packet was received on
*
* Return: NET_RX_SUCCESS if the packet has been consumed or NET_RX_DROP
* otherwise.
* Return: NET_RX_SUCCESS on success or NET_RX_DROP in case of failure
*/
int batadv_recv_unicast_tvlv(struct sk_buff *skb,
struct batadv_hard_iface *recv_if)
@ -1177,7 +1174,7 @@ int batadv_recv_unicast_tvlv(struct sk_buff *skb,
* the assembled packet will exceed our MTU; 2) Buffer fragment, if we still
* lack further fragments; 3) Merge fragments, if we have all needed parts.
*
* Return: NET_RX_DROP if the skb is not consumed, NET_RX_SUCCESS otherwise.
* Return: NET_RX_SUCCESS on success or NET_RX_DROP in case of failure
*/
int batadv_recv_frag_packet(struct sk_buff *skb,
struct batadv_hard_iface *recv_if)