You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
batman-adv: Introduce forward packet creation helper
This patch abstracts the forward packet creation into the new function batadv_forw_packet_alloc(). The queue counting and interface reference counters are now handled internally within batadv_forw_packet_alloc() and its batadv_forw_packet_free() counterpart. This should reduce the risk of having reference/queue counting bugs again and should increase code readibility. Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
This commit is contained in:
committed by
Simon Wunderlich
parent
4fd261bf58
commit
a65e548131
@@ -1375,6 +1375,7 @@ struct batadv_skb_cb {
|
||||
* locally generated packet
|
||||
* @if_outgoing: packet where the packet should be sent to, or NULL if
|
||||
* unspecified
|
||||
* @queue_left: The queue (counter) this packet was applied to
|
||||
*/
|
||||
struct batadv_forw_packet {
|
||||
struct hlist_node list;
|
||||
@@ -1387,6 +1388,7 @@ struct batadv_forw_packet {
|
||||
struct delayed_work delayed_work;
|
||||
struct batadv_hard_iface *if_incoming;
|
||||
struct batadv_hard_iface *if_outgoing;
|
||||
atomic_t *queue_left;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user