pull request for net-next: batman-adv 2026-06-05
Subsystems (3)
Simon Wunderlich
maintainercover pull request for net-next: batman-adv 2026-06-05
Dear net maintainers,
here is another cleanup pull request of batman-adv to go into net-next.
Please pull or let me know of any problem!
Thank you,
Simon
The following changes since commit 626fd14371614b7a8177f79b357fd323a7b91032:
batman-adv: tt: directly retrieve wifi flags of net_device (2026-06-03 08:27:17 +0200)
are available in the Git repository at:
https://git.open-mesh.org/batadv.git tags/batadv-next-pullrequest-20260605
for you to fetch changes up to 1e2fa2b10c234578d3c98c70f89c04a7aba4db92:
batman-adv: fix kernel-doc typos and grammar errors (2026-06-05 09:12:09 +0200)
----------------------------------------------------------------
This cleanup patchset includes the following patches, all by Sven Eckelmann:
- tp_meter: initialize last_recv_time during init
- convert cancellation of work items to disable helper
- clean up wifi detection cache (3 patches)
- clean up kernel-doc: corrections, reword, typos (6 patches)
----------------------------------------------------------------
Sven Eckelmann (11):
batman-adv: tp_meter: initialize last_recv_time during init
batman-adv: convert cancellation of work items to disable helper
batman-adv: drop duplicated wifi_flags assignments
batman-adv: use GFP_KERNEL allocations for the wifi detection cache
batman-adv: document cleanup of batadv_wifi_net_devices entries
batman-adv: correct batadv_wifi_* kernel-doc
batman-adv: tp_meter: update stale kernel-doc after refactoring
batman-adv: bla: update stale kernel-doc
batman-adv: uapi: keep kernel-doc in struct member order
batman-adv: fix batadv_v_ogm_packet_recv error handling kernel-doc
batman-adv: fix kernel-doc typos and grammar errors
include/uapi/linux/batadv_packet.h | 6 +++--- net/batman-adv/bat_iv_ogm.c | 2 +- net/batman-adv/bat_v.c | 4 +++- net/batman-adv/bat_v_elp.c | 6 +++--- net/batman-adv/bat_v_ogm.c | 16 +++++++++------- net/batman-adv/bitarray.c | 2 +- net/batman-adv/bitarray.h | 2 +- net/batman-adv/bridge_loop_avoidance.c | 6 +++--- net/batman-adv/bridge_loop_avoidance.h | 2 +- net/batman-adv/distributed-arp-table.c | 2 +- net/batman-adv/fragmentation.c | 3 ++- net/batman-adv/hard-interface.c | 15 +++++++++------ net/batman-adv/hard-interface.h | 4 ++-- net/batman-adv/hash.h | 4 ++-- net/batman-adv/mesh-interface.c | 6 +++--- net/batman-adv/multicast.c | 2 +- net/batman-adv/netlink.c | 4 ++-- net/batman-adv/originator.c | 6 +++--- net/batman-adv/send.c | 2 +- net/batman-adv/tp_meter.c | 28 ++++++++++++++++------------ net/batman-adv/translation-table.c | 2 +- net/batman-adv/tvlv.c | 4 ++-- net/batman-adv/types.h | 24 +++++++++++++++--------- 23 files changed, 85 insertions(+), 67 deletions(-)
Simon Wunderlich
maintainerPATCH 1/11 batman-adv: tp_meter: initialize last_recv_time during init
From: Sven Eckelmann <[email protected]>
The last_recv_time is the most important indicator for a receiver session to figure out whether a session timed out or not. But this information was only initialized after the session was added to the tp_receiver_list and after the timer was started.
In the worst case, the timer (function) could have tried to access this information before the actual initialization was reached. Like rest of the variables of the tp_meter receiver session, this field has to be filled out before any other (parallel running) context has the chance to access it.
--- net/batman-adv/tp_meter.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
net/batman-adv/tp_meter.c +7 -3
@@ -1511,8 +1511,10 @@ batadv_tp_init_recv(struct batadv_priv *bat_priv, tp_vars =batadv_tp_list_find_receiver_session (bat_priv, icmp->orig, icmp->session); -if (tp_vars) +if (tp_vars) { + tp_vars->last_recv_time = jiffies; goto out_unlock; + }if (!atomic_add_unless (&bat_priv->tp_num,1 ,BATADV_TP_MAX_NUM )) { batadv_dbg(BATADV_DBG_TP_METER, bat_priv,
@@ -1539,6 +1541,8 @@ batadv_tp_init_recv(struct batadv_priv *bat_priv,kref_get (&tp_vars->common.refcount);timer_setup (&tp_vars->common.timer, batadv_tp_receiver_shutdown,0 ); + tp_vars->last_recv_time = jiffies; +kref_get (&tp_vars->common.refcount);hlist_add_head_rcu (&tp_vars->common.list, &bat_priv->tp_receiver_list);
@@ -1587,9 +1591,9 @@ static void batadv_tp_recv_msg(struct batadv_priv *bat_priv, icmp->orig); goto out; } - } - tp_vars->last_recv_time = jiffies; + tp_vars->last_recv_time = jiffies; + }/* if the packet is a duplicate, it may be the case that an ACK has been * lost. Resend the ACK
Signature · 1 line
2.47.3
Re: [PATCH net-next 01/11] batman-adv: tp_meter: initialize last_recv_time during init
This series was applied to netdev/net-next.git (main) by Sven Eckelmann <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by Sven Eckelmann <[email protected]>:
Quoted 8 lines · On Fri, 5 Jun 2026 09:19:55 +0200 you wrote:
From: Sven Eckelmann <[email protected]>
The
last_recv_timeis the most important indicator for a receiver session to figure out whether a session timed out or not. But this information was only initialized after the session was added to thetp_receiver_listand after the timer was started.[...]
Here is the summary with links:
- [net-next,01/11] batman-adv: tp_meter: initialize last_recv_time during init
https://git.kernel.org/netdev/net-next/c/811cb00fa8cd - [net-next,02/11] batman-adv: convert cancellation of work items to disable helper https://git.kernel.org/netdev/net-next/c/e9dc4072c549 - [net-next,03/11] batman-adv: drop duplicated wifi_flags assignments https://git.kernel.org/netdev/net-next/c/b2e44a67ef4f - [net-next,04/11] batman-adv: use GFP_KERNEL allocations for the wifi detection cache https://git.kernel.org/netdev/net-next/c/ed497f64a617 - [net-next,05/11] batman-adv: document cleanup of batadv_wifi_net_devices entries https://git.kernel.org/netdev/net-next/c/bb9e48e32d31 - [net-next,06/11] batman-adv: correct batadv_wifi_* kernel-doc https://git.kernel.org/netdev/net-next/c/0e8c38fe9f50 - [net-next,07/11] batman-adv: tp_meter: update stale kernel-doc after refactoring https://git.kernel.org/netdev/net-next/c/0c0f658d9abd - [net-next,08/11] batman-adv: bla: update stale kernel-doc https://git.kernel.org/netdev/net-next/c/219b4c46db7f - [net-next,09/11] batman-adv: uapi: keep kernel-doc in struct member order https://git.kernel.org/netdev/net-next/c/f3ff3eb0d6a4 - [net-next,10/11] batman-adv: fix batadv_v_ogm_packet_recv error handling kernel-doc https://git.kernel.org/netdev/net-next/c/7b915cd40bb2 - [net-next,11/11] batman-adv: fix kernel-doc typos and grammar errors https://git.kernel.org/netdev/net-next/c/1e2fa2b10c23
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Simon Wunderlich
maintainerPATCH 2/11 batman-adv: convert cancellation of work items to disable helper
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
With commit 86898fa6b8cd ("workqueue: Implement disable/enable for (delayed) work items"), work queues gained the ability to permanently disallow re-queuing of work items. This is particularly important during object teardown, where a work item must not be re-armed after shutdown begins.
Convert all cancel_work_sync() and cancel_delayed_work_sync() call sites to their disable_* equivalents to clarify the intent to prevent re-arming after teardown.
--- net/batman-adv/bat_iv_ogm.c | 2 +- net/batman-adv/bat_v.c | 2 ++ net/batman-adv/bat_v_elp.c | 6 +++--- net/batman-adv/bat_v_ogm.c | 6 ++++-- net/batman-adv/bridge_loop_avoidance.c | 4 ++-- net/batman-adv/distributed-arp-table.c | 2 +- net/batman-adv/multicast.c | 2 +- net/batman-adv/originator.c | 2 +- net/batman-adv/send.c | 2 +- net/batman-adv/tp_meter.c | 2 +- net/batman-adv/translation-table.c | 2 +- 11 files changed, 18 insertions(+), 14 deletions(-)
net/batman-adv/bat_iv_ogm.c +1 -1
@@ -230,7 +230,7 @@ static void batadv_iv_ogm_iface_disable(struct batadv_hard_iface *hard_iface)mutex_unlock (&hard_iface->bat_iv.ogm_buff_mutex); -cancel_delayed_work_sync (&hard_iface->bat_iv.reschedule_work); +disable_delayed_work_sync (&hard_iface->bat_iv.reschedule_work); }static void batadv_iv_ogm_iface_update_mac (struct batadv_hard_iface *hard_iface)
net/batman-adv/bat_v.c +2 -0
@@ -819,6 +819,8 @@ void batadv_v_hardif_init(struct batadv_hard_iface *hard_iface)skb_queue_head_init (&hard_iface->bat_v.aggr_list);INIT_DELAYED_WORK (&hard_iface->bat_v.aggr_wq, batadv_v_ogm_aggr_work); +/* make sure it doesn't run until interface gets enabled */ +disable_delayed_work (&hard_iface->bat_v.aggr_wq); }/**
net/batman-adv/bat_v_elp.c +3 -3
@@ -115,7 +115,7 @@ static bool batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh, goto default_throughput;/* only use rtnl_trylock because the elp worker will be cancelled while -* the rntl_lock is held. the cancel_delayed_work_sync() would otherwise +* the rntl_lock is held. the disable_delayed_work_sync() would otherwise * wait forever when the elp work_item was started and it is then also * trying to rtnl_lock */
@@ -162,7 +162,7 @@ static bool batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh, }/* only use rtnl_trylock because the elp worker will be cancelled while -* the rntl_lock is held. the cancel_delayed_work_sync() would otherwise +* the rntl_lock is held. the disable_delayed_work_sync() would otherwise * wait forever when the elp work_item was started and it is then also * trying to rtnl_lock */
@@ -447,7 +447,7 @@ int batadv_v_elp_iface_enable(struct batadv_hard_iface *hard_iface)*/ void batadv_v_elp_iface_disable (struct batadv_hard_iface *hard_iface) { -cancel_delayed_work_sync (&hard_iface->bat_v.elp_wq); +disable_delayed_work_sync (&hard_iface->bat_v.elp_wq);dev_kfree_skb (hard_iface->bat_v.elp_skb); hard_iface->bat_v.elp_skb =NULL ;
net/batman-adv/bat_v_ogm.c +4 -2
@@ -415,6 +415,8 @@ int batadv_v_ogm_iface_enable(struct batadv_hard_iface *hard_iface) {struct batadv_priv *bat_priv =netdev_priv (hard_iface->mesh_iface); +enable_delayed_work (&hard_iface->bat_v.aggr_wq); +batadv_v_ogm_start_queue_timer (hard_iface);batadv_v_ogm_start_timer (bat_priv);
@@ -427,7 +429,7 @@ int batadv_v_ogm_iface_enable(struct batadv_hard_iface *hard_iface)*/ void batadv_v_ogm_iface_disable (struct batadv_hard_iface *hard_iface) { -cancel_delayed_work_sync (&hard_iface->bat_v.aggr_wq); +disable_delayed_work_sync (&hard_iface->bat_v.aggr_wq);spin_lock_bh (&hard_iface->bat_v.aggr_list.lock);batadv_v_ogm_aggr_list_free (hard_iface);
@@ -1080,7 +1082,7 @@ int batadv_v_ogm_init(struct batadv_priv *bat_priv)*/ void batadv_v_ogm_free (struct batadv_priv *bat_priv) { -cancel_delayed_work_sync (&bat_priv->bat_v.ogm_wq); +disable_delayed_work_sync (&bat_priv->bat_v.ogm_wq);mutex_lock (&bat_priv->bat_v.ogm_buff_mutex);
net/batman-adv/bridge_loop_avoidance.c +2 -2
@@ -1282,7 +1282,7 @@ static void batadv_bla_purge_backbone_gw(struct batadv_priv *bat_priv, int now)if (purged) {/* reference for pending report_work */ -if (cancel_work_sync (&backbone_gw->report_work)) +if (disable_work_sync (&backbone_gw->report_work))batadv_backbone_gw_put (backbone_gw);/* reference for hash_entry */
@@ -1850,7 +1850,7 @@ void batadv_bla_free(struct batadv_priv *bat_priv) {struct batadv_hard_iface *primary_if; -cancel_delayed_work_sync (&bat_priv->bla.work); +disable_delayed_work_sync (&bat_priv->bla.work); primary_if =batadv_primary_if_get_selected (bat_priv);if (bat_priv->bla.claim_hash) {
net/batman-adv/distributed-arp-table.c +1 -1
@@ -838,7 +838,7 @@ void batadv_dat_free(struct batadv_priv *bat_priv)batadv_tvlv_container_unregister (bat_priv,BATADV_TVLV_DAT ,1 );batadv_tvlv_handler_unregister (bat_priv,BATADV_TVLV_DAT ,1 ); -cancel_delayed_work_sync (&bat_priv->dat.work); +disable_delayed_work_sync (&bat_priv->dat.work);batadv_dat_hash_free (bat_priv); }
net/batman-adv/multicast.c +1 -1
@@ -2161,7 +2161,7 @@ int batadv_mcast_flags_dump(struct sk_buff *msg, struct netlink_callback *cb)*/ void batadv_mcast_free (struct batadv_priv *bat_priv) { -cancel_delayed_work_sync (&bat_priv->mcast.work); +disable_delayed_work_sync (&bat_priv->mcast.work);batadv_tvlv_container_unregister (bat_priv,BATADV_TVLV_MCAST ,2 );batadv_tvlv_handler_unregister (bat_priv,BATADV_TVLV_MCAST_TRACKER ,1 );
net/batman-adv/originator.c +1 -1
@@ -908,7 +908,7 @@ void batadv_originator_free(struct batadv_priv *bat_priv)if (!hash)return ; -cancel_delayed_work_sync (&bat_priv->orig_work); +disable_delayed_work_sync (&bat_priv->orig_work); bat_priv->orig_hash =NULL ;
net/batman-adv/send.c +1 -1
@@ -629,7 +629,7 @@ static void batadv_forw_packet_list_free(struct hlist_head *head)hlist_for_each_entry_safe (forw_packet, safe_tmp_node, head, cleanup_list) { -cancel_delayed_work_sync (&forw_packet->delayed_work); +disable_delayed_work_sync (&forw_packet->delayed_work);hlist_del (&forw_packet->cleanup_list);batadv_forw_packet_free (forw_packet, true);
net/batman-adv/tp_meter.c +1 -1
@@ -421,7 +421,7 @@ static bool batadv_tp_list_detach(struct batadv_tp_vars_common *tp_vars)*/ static void batadv_tp_sender_cleanup (struct batadv_tp_sender *tp_vars) { -cancel_delayed_work_sync (&tp_vars->finish_work); +disable_delayed_work_sync (&tp_vars->finish_work);if (batadv_tp_list_detach (&tp_vars->common))batadv_tp_sender_put (tp_vars);
net/batman-adv/translation-table.c +1 -1
@@ -3574,7 +3574,7 @@ void batadv_tt_free(struct batadv_priv *bat_priv)batadv_tvlv_container_unregister (bat_priv,BATADV_TVLV_TT ,1 );batadv_tvlv_handler_unregister (bat_priv,BATADV_TVLV_TT ,1 ); -cancel_delayed_work_sync (&bat_priv->tt.work); +disable_delayed_work_sync (&bat_priv->tt.work);batadv_tt_local_table_free (bat_priv);batadv_tt_global_table_free (bat_priv);
Signature · 1 line
2.47.3
Simon Wunderlich
maintainerPATCH 3/11 batman-adv: drop duplicated wifi_flags assignments
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
During the initialization of the batadv_wifi_net_device_state, it is enough to write the wifi_flags once before the batadv_wifi_net_device_state is added to the batadv_wifi_net_devices rhashtable.
--- net/batman-adv/hard-interface.c | 1 - 1 file changed, 1 deletion(-)
net/batman-adv/hard-interface.c +0 -1
@@ -987,7 +987,6 @@ batadv_wifi_net_device_insert(struct net_device *net_dev, u32 wifi_flags)if (!device_state)return -ENOMEM ; - device_state->wifi_flags = wifi_flags;netdev_hold (net_dev, &device_state->dev_tracker,GFP_ATOMIC ); device_state->netdev = net_dev;WRITE_ONCE (device_state->wifi_flags, wifi_flags);
Signature · 1 line
2.47.3
Simon Wunderlich
maintainerPATCH 4/11 batman-adv: use GFP_KERNEL allocations for the wifi detection cache
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
The batadv_wifi_net_device_insert() is called with ASSERT_RTNL() held, but not inside a spinlock or another context which prevents "might_sleep" functions. To relax the requirements for the allocator, use GFP_KERNEL.
--- net/batman-adv/hard-interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/batman-adv/hard-interface.c +2 -2
@@ -983,11 +983,11 @@ batadv_wifi_net_device_insert(struct net_device *net_dev, u32 wifi_flags)ASSERT_RTNL (); - device_state =kzalloc_obj (*device_state,GFP_ATOMIC ); + device_state =kzalloc_obj (*device_state,GFP_KERNEL );if (!device_state)return -ENOMEM ; -netdev_hold (net_dev, &device_state->dev_tracker,GFP_ATOMIC ); +netdev_hold (net_dev, &device_state->dev_tracker,GFP_KERNEL ); device_state->netdev = net_dev;WRITE_ONCE (device_state->wifi_flags, wifi_flags);
Signature · 1 line
2.47.3
Simon Wunderlich
maintainerPATCH 5/11 batman-adv: document cleanup of batadv_wifi_net_devices entries
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
It doesn't seem to be obvious how the entries from the batadv_wifi_net_devices rhashtable are getting removed before the actual rhashtable is destroyed. Document the idea behind the process and which steps are involved.
--- net/batman-adv/hard-interface.c | 4 ++++ 1 file changed, 4 insertions(+)
net/batman-adv/hard-interface.c +4 -0
@@ -1185,5 +1185,9 @@ int __init batadv_wifi_net_devices_init(void)*/ void batadv_wifi_net_devices_deinit (void ) { +/* just destroy table. entries should have been removed by +* unregister_netdevice_notifier() and the corresponding +* NETDEV_UNREGISTER events +*/ rhashtable_destroy (&batadv_wifi_net_devices); }
Signature · 1 line
2.47.3
Simon Wunderlich
maintainerPATCH 6/11 batman-adv: correct batadv_wifi_* kernel-doc
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
The original kernel documentation for the batadv_wifi_* functions contained copy+paste errors. Correct them to make it easier understandable.
--- net/batman-adv/hard-interface.c | 6 +++--- net/batman-adv/hard-interface.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-)
net/batman-adv/hard-interface.c +3 -3
@@ -971,9 +971,9 @@ static int batadv_hard_if_event_meshif(unsigned long event,/** * batadv_wifi_net_device_insert() - save information about wifi net_device * @net_dev: net_device to add to batadv_wifi_net_devices -* @wifi_flags: net_device which generated an event +* @wifi_flags: extracted batadv_hard_iface_wifi_flags of a net_device * -* Return: 0 on result, negative value on error +* Return: 0 on success, negative value on error */ static int batadv_wifi_net_device_insert (struct net_device *net_dev,u32 wifi_flags)
@@ -1006,7 +1006,7 @@ batadv_wifi_net_device_insert(struct net_device *net_dev, u32 wifi_flags)/** * batadv_wifi_net_device_remove() - remove information about wifi net_device -* @device_state: wifi net_device state to remove from batadv_wifi_net_device_state +* @device_state: wifi net_device state to remove from batadv_wifi_net_devices */ static void batadv_wifi_net_device_remove (struct batadv_wifi_net_device_state *device_state)
net/batman-adv/hard-interface.h +2 -2
@@ -126,7 +126,7 @@ batadv_primary_if_get_selected(struct batadv_priv *bat_priv)/** * batadv_is_cfg80211() - check if the given hardif is a cfg80211 * wifi interface -* @wifi_flags: extracted batadv_hard_iface_wifi_flagss of an net_device +* @wifi_flags: extracted batadv_hard_iface_wifi_flags of a net_device * * Return: true if the net device is a cfg80211 wireless device, false * otherwise.
@@ -143,7 +143,7 @@ static inline bool batadv_is_cfg80211(u32 wifi_flags)/** * batadv_is_wifi() - check if flags belong to wifi interface -* @wifi_flags: extracted batadv_hard_iface_wifi_flagss of an net_device +* @wifi_flags: extracted batadv_hard_iface_wifi_flags of a net_device * * Return: true if the net device is a 802.11 wireless device, false otherwise. */
Signature · 1 line
2.47.3
Simon Wunderlich
maintainerPATCH 7/11 batman-adv: tp_meter: update stale kernel-doc after refactoring
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
The tp_meter codebase was recently refactored:
* throughput meter sender and receiver variables were split into two different structures
* the congestion control variables were extracted in a separate structure
But the kernel-doc was not updated everywhere to reflect these changes.
--- net/batman-adv/tp_meter.c | 16 ++++++++-------- net/batman-adv/types.h | 14 ++++++++------ 2 files changed, 16 insertions(+), 14 deletions(-)
net/batman-adv/tp_meter.c +8 -8
@@ -289,7 +289,7 @@ batadv_tp_list_find_sender(struct batadv_priv *bat_priv, const u8 *dst)* @bat_priv: the bat priv with all the mesh interface information * @dst: the other endpoint MAC address to look for * -* Return: if matching session with @dst was found +* Return: true if a matching session with @dst was found, false otherwise */ static bool batadv_tp_list_active(struct batadv_priv *bat_priv, const u8 *dst) __must_hold(&bat_priv->tp_list_lock)
@@ -355,7 +355,7 @@ batadv_tp_list_find_sender_session(struct batadv_priv *bat_priv, const u8 *dst,/** * batadv_tp_vars_common_release() - release batadv_tp_vars_common from lists * and queue for free after rcu grace period -* @ref: kref pointer of the batadv_tp_vars +* @ref: kref pointer of the batadv_tp_vars_common */ static void batadv_tp_vars_common_release (struct kref *ref) {
@@ -391,7 +391,7 @@ static void batadv_tp_sender_put(struct batadv_tp_sender *tp_vars) }/** -* batadv_tp_list_detach() - remove tp receiver session from mesh session list once +* batadv_tp_list_detach() - remove tp session from mesh session list once * @tp_vars: the private data of the current TP meter session * * Return: whether tp_vars was detached from list and reference must be freed
@@ -509,7 +509,7 @@ static void batadv_tp_sender_finish(struct work_struct *work)* batadv_tp_reset_sender_timer() - reschedule the sender timer * @tp_vars: the private TP meter data for this session * -* Reschedule the timer using tp_vars->rto as delay +* Reschedule the timer using tp_vars->cc.rto as delay */ static void batadv_tp_reset_sender_timer (struct batadv_tp_sender *tp_vars) {
@@ -621,9 +621,9 @@ static void batadv_tp_fill_prerandom(struct batadv_tp_sender *tp_vars,* * Create and send a single TP Meter message. * -* Return: 0 on success, BATADV_TP_REASON_DST_UNREACHABLE if the destination is -* not reachable, BATADV_TP_REASON_MEMORY_ERROR if the packet couldn't be -* allocated +* Return: 0 on success, BATADV_TP_REASON_MEMORY_ERROR if the packet couldn't +* be allocated, BATADV_TP_REASON_CANT_SEND if the packet could not be +* transmitted */ static int batadv_tp_send_msg(struct batadv_tp_sender *tp_vars, const u8 *src, struct batadv_orig_node *orig_node,
@@ -913,7 +913,7 @@ static int batadv_tp_wait_available(struct batadv_tp_sender *tp_vars, size_t ple* batadv_tp_send() - main sending thread of a tp meter session * @arg: address of the related tp_vars * -* Return: nothing, this function never returns +* Return: 0 */ static int batadv_tp_send (void *arg) {
net/batman-adv/types.h +8 -6
@@ -1331,7 +1331,7 @@ struct batadv_tp_unacked {/** @len: length of the packet */ u16 len; -/** @list: list node for &batadv_tp_vars.unacked_list */ +/** @list: list node for &batadv_tp_vars_common.unacked_list */ struct list_head list; };
@@ -1367,7 +1367,9 @@ struct batadv_tp_vars_common {struct rcu_head rcu; }; -/** struct batadv_tp_sender_cc - congestion control variables */ +/** +* struct batadv_tp_sender_cc - congestion control variables +*/ struct batadv_tp_sender_cc {/** @fast_recovery: true if in Fast Recovery mode */ bool fast_recovery:1 ;
@@ -1410,7 +1412,7 @@ struct batadv_tp_sender_cc {* struct batadv_tp_sender - sender tp meter private variables per session */ struct batadv_tp_sender { -/** @common: common batadv_tp_vars (best be first member) */ +/** @common: common batadv_tp_vars_common (must be first member) */ struct batadv_tp_vars_common common;/** @start_time: start time in jiffies */
@@ -1437,7 +1439,7 @@ struct batadv_tp_sender {/** @cc: congestion control variables */ struct batadv_tp_sender_cc cc; -/** @cc_lock: lock do protect @cc */ +/** @cc_lock: lock to protect @cc */ spinlock_t cc_lock;/** @tot_sent: amount of data sent/ACKed so far */
@@ -1460,7 +1462,7 @@ struct batadv_tp_sender {* struct batadv_tp_receiver - receiver tp meter private variables per session */ struct batadv_tp_receiver { -/** @common: common batadv_tp_vars (best be first member) */ +/** @common: common batadv_tp_vars_common (must be first member) */ struct batadv_tp_vars_common common;/** @receiving: receiving binary semaphore: 1 if receiving, 0 is not */
@@ -1662,7 +1664,7 @@ struct batadv_priv {/** @forw_bcast_list_lock: lock protecting forw_bcast_list */ spinlock_t forw_bcast_list_lock; -/** @tp_list_lock: spinlock protecting @tp_list */ +/** @tp_list_lock: spinlock protecting @tp_sender_list + @tp_receiver_list */ spinlock_t tp_list_lock;/** @tp_num: number of currently active tp sessions */
Signature · 1 line
2.47.3
Simon Wunderlich
maintainerPATCH 8/11 batman-adv: bla: update stale kernel-doc
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
The bridge-loop-avoidance code was changed recently to avoid inconsistent state and race condition problems. The kernel-doc addded in these commits (and related code) has various minor deficits which are now resolved.
--- net/batman-adv/bridge_loop_avoidance.c | 2 +- net/batman-adv/bridge_loop_avoidance.h | 2 +- net/batman-adv/types.h | 10 +++++++--- 3 files changed, 9 insertions(+), 5 deletions(-)
net/batman-adv/bridge_loop_avoidance.c +1 -1
@@ -123,7 +123,7 @@ static bool batadv_compare_backbone_gw(const struct hlist_node *node,* @node: list node of the first entry to compare * @data2: pointer to the second claims * -* Return: true if the claim have the same data, 0 otherwise +* Return: true if the claims have the same data, false otherwise */ static bool batadv_compare_claim (const struct hlist_node *node,const void *data2)
net/batman-adv/bridge_loop_avoidance.h +1 -1
@@ -21,7 +21,7 @@* detect frame sent by bridge loop avoidance * @mac: mac address to check * -* Return: true if the it looks like a loop detect frame +* Return: true if it looks like a loop detect frame * (mac starts with BA:BE), false otherwise */ static inline bool batadv_bla_is_loopdetect_mac (const uint8_t *mac)
net/batman-adv/types.h +7 -3
@@ -1723,22 +1723,26 @@ struct batadv_priv {#ifdef CONFIG_BATMAN_ADV_BLA +/** +* enum batadv_bla_backbone_gw_state - state of a bridge loop avoidance +* backbone gateway +*/ enum batadv_bla_backbone_gw_state {/** * @BATADV_BLA_BACKBONE_GW_STOPPED: backbone gw is being removed -* and it must not longer work on requests +* and it must no longer work on requests */ BATADV_BLA_BACKBONE_GW_STOPPED ,/** * @BATADV_BLA_BACKBONE_GW_UNSYNCED: backbone was detected out -* of sync and a request was send. No traffic is forwarded until the +* of sync and a request was sent. No traffic is forwarded until the * situation is resolved */ BATADV_BLA_BACKBONE_GW_UNSYNCED ,/** -* @BATADV_BLA_BACKBONE_GW_SYNCED: backbone is consider to be in +* @BATADV_BLA_BACKBONE_GW_SYNCED: backbone is considered to be in * sync. traffic can be forwarded */ BATADV_BLA_BACKBONE_GW_SYNCED,
Signature · 1 line
2.47.3
Simon Wunderlich
maintainerPATCH 9/11 batman-adv: uapi: keep kernel-doc in struct member order
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
The order of the members of struct batadv_coded_packet and struct batadv_unicast_tvlv_packet didn't match the kernel doc. This is the case for all other structures and should also be done the same way for these two.
--- include/uapi/linux/batadv_packet.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
include/uapi/linux/batadv_packet.h +3 -3
@@ -518,16 +518,16 @@ struct batadv_mcast_packet {* @packet_type: batman-adv packet type, part of the general header * @version: batman-adv protocol version, part of the general header * @ttl: time to live for this packet, part of the general header +* @first_ttvn: tt-version number of first included packet * @first_source: original source of first included packet * @first_orig_dest: original destination of first included packet * @first_crc: checksum of first included packet -* @first_ttvn: tt-version number of first included packet * @second_ttl: ttl of second packet +* @second_ttvn: tt version number of second included packet * @second_dest: second receiver of this coded packet * @second_source: original source of second included packet * @second_orig_dest: original destination of second included packet * @second_crc: checksum of second included packet -* @second_ttvn: tt version number of second included packet * @coded_len: length of network coded part of the payload */ struct batadv_coded_packet {
@@ -554,8 +554,8 @@ struct batadv_coded_packet {* @version: batman-adv protocol version, part of the general header * @ttl: time to live for this packet, part of the general header * @reserved: reserved field (for packet alignment) -* @src: address of the source * @dst: address of the destination +* @src: address of the source * @tvlv_len: length of tvlv data following the unicast tvlv header * @align: 2 bytes to align the header to a 4 byte boundary */
Signature · 1 line
2.47.3
Simon Wunderlich
maintainerPATCH 10/11 batman-adv: fix batadv_v_ogm_packet_recv error handling kernel-doc
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
All receive handlers in batman-adv are consuming the skbuff independent of the result of the handler. The "(without freeing the skb) on failure" is therefore not corrrect anymore for the current implementation.
--- net/batman-adv/bat_v_ogm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/batman-adv/bat_v_ogm.c +1 -1
@@ -984,7 +984,7 @@ static void batadv_v_ogm_process(const struct sk_buff *skb, int ogm_offset,* @if_incoming: the interface where this OGM has been received * * Return: NET_RX_SUCCESS and consume the skb on success or returns NET_RX_DROP -* (without freeing the skb) on failure +* (freeing the skb) on failure */ int batadv_v_ogm_packet_recv (struct sk_buff *skb,struct batadv_hard_iface *if_incoming)
Signature · 1 line
2.47.3
Simon Wunderlich
maintainerPATCH 11/11 batman-adv: fix kernel-doc typos and grammar errors
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
Various minor errors were gathered over the time in batman-adv's kernel-doc comments. Get rid of many of them before they are copied (again) to new functions.
--- net/batman-adv/bat_v.c | 2 +- net/batman-adv/bat_v_ogm.c | 8 ++++---- net/batman-adv/bitarray.c | 2 +- net/batman-adv/bitarray.h | 2 +- net/batman-adv/fragmentation.c | 3 ++- net/batman-adv/hash.h | 4 ++-- net/batman-adv/mesh-interface.c | 6 +++--- net/batman-adv/netlink.c | 4 ++-- net/batman-adv/originator.c | 4 ++-- net/batman-adv/tvlv.c | 4 ++-- 10 files changed, 20 insertions(+), 19 deletions(-)
net/batman-adv/bat_v.c +1 -1
@@ -587,7 +587,7 @@ batadv_v_gw_get_best_gw_node(struct batadv_priv *bat_priv) }/** -* batadv_v_gw_is_eligible() - check if a originator would be selected as GW +* batadv_v_gw_is_eligible() - check if an originator would be selected as GW * @bat_priv: the bat priv with all the mesh interface information * @curr_gw_orig: originator representing the currently selected GW * @orig_node: the originator representing the new candidate
net/batman-adv/bat_v_ogm.c +4 -4
@@ -515,7 +515,7 @@ static u32 batadv_v_forward_penalty(struct batadv_priv *bat_priv,* @bat_priv: the bat priv with all the mesh interface information * @ogm_received: previously received OGM to be forwarded * @orig_node: the originator which has been updated -* @neigh_node: the neigh_node through with the OGM has been received +* @neigh_node: the neigh_node through which the OGM has been received * @if_incoming: the interface on which this OGM was received on * @if_outgoing: the interface to which the OGM has to be forwarded to *
@@ -602,7 +602,7 @@ static void batadv_v_ogm_forward(struct batadv_priv *bat_priv,* @bat_priv: the bat priv with all the mesh interface information * @ogm2: OGM2 structure * @orig_node: Originator structure for which the OGM has been received -* @neigh_node: the neigh_node through with the OGM has been received +* @neigh_node: the neigh_node through which the OGM has been received * @if_incoming: the interface where this packet was received * @if_outgoing: the interface for which the packet should be considered *
@@ -686,7 +686,7 @@ static int batadv_v_ogm_metric_update(struct batadv_priv *bat_priv,* @ethhdr: the Ethernet header of the OGM2 * @ogm2: OGM2 structure * @orig_node: Originator structure for which the OGM has been received -* @neigh_node: the neigh_node through with the OGM has been received +* @neigh_node: the neigh_node through which the OGM has been received * @if_incoming: the interface where this packet was received * @if_outgoing: the interface for which the packet should be considered *
@@ -781,7 +781,7 @@ static bool batadv_v_ogm_route_update(struct batadv_priv *bat_priv,* @ethhdr: the Ethernet header of the OGM2 * @ogm2: OGM2 structure * @orig_node: Originator structure for which the OGM has been received -* @neigh_node: the neigh_node through with the OGM has been received +* @neigh_node: the neigh_node through which the OGM has been received * @if_incoming: the interface where this packet was received * @if_outgoing: the interface for which the packet should be considered */
net/batman-adv/bitarray.c +1 -1
@@ -24,7 +24,7 @@ static void batadv_bitmap_shift_left(unsigned long *seq_bits, s32 n)* batadv_bit_get_packet() - receive and process one packet within the sequence * number window * @priv: the bat priv with all the mesh interface information -* @seq_bits: pointer to the sequence number receive packet +* @seq_bits: pointer to the sequence number bitmap of received packets * @seq_num_diff: difference between the current/received sequence number and * the last sequence number * @set_mark: whether this packet should be marked in seq_bits
net/batman-adv/bitarray.h +1 -1
@@ -17,7 +17,7 @@/** * batadv_test_bit() - check if bit is set in the current window * -* @seq_bits: pointer to the sequence number receive packet +* @seq_bits: pointer to the sequence number bitmap of received packets * @last_seqno: latest sequence number in seq_bits * @curr_seqno: sequence number to test for *
net/batman-adv/fragmentation.c +2 -1
@@ -309,7 +309,8 @@ batadv_frag_merge_packets(struct hlist_head *chain)* batadv_skb_is_frag() - check if newly merged skb contains unicast fragment * @skb: newly merged skb * -* Return: if newly merged skb is of type BATADV_UNICAST_FRAG +* Return: true if the newly merged skb is of type BATADV_UNICAST_FRAG, false +* otherwise */ static bool batadv_skb_is_frag (struct sk_buff *skb) {
net/batman-adv/hash.h +2 -2
@@ -120,10 +120,10 @@ static inline int batadv_hash_add(struct batadv_hashtable *hash,* @choose: callback calculating the hash index * @data: data passed to the aforementioned callbacks as argument * -* ata could be the structure you use with just the key filled, we just need +* data could be the structure you use with just the key filled, we just need * the key for comparing. * -* Return: returns pointer do data on success, so you can remove the used +* Return: returns pointer to data on success, so you can remove the used * structure yourself, or NULL on error */ static inline void *batadv_hash_remove(struct batadv_hashtable *hash,
net/batman-adv/mesh-interface.c +3 -3
@@ -392,13 +392,13 @@ static netdev_tx_t batadv_interface_tx(struct sk_buff *skb,* @orig_node: originator from which the batman-adv packet was sent * * Sends an ethernet frame to the receive path of the local @mesh_iface. -* skb->data has still point to the batman-adv header with the size @hdr_size. +* skb->data must still point to the batman-adv header with the size @hdr_size. * The caller has to have parsed this header already and made sure that at least * @hdr_size bytes are still available for pull in @skb. * * The packet may still get dropped. This can happen when the encapsulated -* ethernet frame is invalid or contains again an batman-adv packet. Also -* unicast packets will be dropped directly when it was sent between two +* ethernet frame is invalid or contains again a batman-adv packet. Also +* unicast packets will be dropped directly when they were sent between two * isolated clients. */ void batadv_interface_rx(struct net_device *mesh_iface,
net/batman-adv/netlink.c +2 -2
@@ -944,7 +944,7 @@ static int batadv_netlink_set_hardif(struct sk_buff *skb, }/** -* batadv_netlink_dump_hardif() - Dump all hard interface into a messages +* batadv_netlink_dump_hardif() - Dump all hard interfaces into a message * @msg: Netlink message to dump into * @cb: Parameters from query *
@@ -1101,7 +1101,7 @@ static int batadv_netlink_get_vlan(struct sk_buff *skb, struct genl_info *info) }/** -* batadv_netlink_set_vlan() - Get vlan attributes +* batadv_netlink_set_vlan() - Set vlan attributes * @skb: Netlink message with request data * @info: receiver information *
net/batman-adv/originator.c +2 -2
@@ -439,7 +439,7 @@ batadv_orig_ifinfo_new(struct batadv_orig_node *orig_node, }/** -* batadv_neigh_ifinfo_get() - find the ifinfo from an neigh_node +* batadv_neigh_ifinfo_get() - find the ifinfo from a neigh_node * @neigh: the neigh node to be queried * @if_outgoing: the interface for which the ifinfo should be acquired *
@@ -472,7 +472,7 @@ batadv_neigh_ifinfo_get(struct batadv_neigh_node *neigh, }/** -* batadv_neigh_ifinfo_new() - search and possibly create an neigh_ifinfo object +* batadv_neigh_ifinfo_new() - search and possibly create a neigh_ifinfo object * @neigh: the neigh node to be queried * @if_outgoing: the interface for which the ifinfo should be acquired *
net/batman-adv/tvlv.c +2 -2
@@ -48,7 +48,7 @@ static void batadv_tvlv_handler_release(struct kref *ref) }/** -* batadv_tvlv_handler_put() - decrement the tvlv container refcounter and +* batadv_tvlv_handler_put() - decrement the tvlv handler refcounter and * possibly release it * @tvlv_handler: the tvlv handler to free */
@@ -272,7 +272,7 @@ void batadv_tvlv_container_register(struct batadv_priv *bat_priv,* @additional_packet_len: requested additional packet size on top of minimum * size * -* Return: true of the packet buffer could be changed to the requested size, +* Return: true if the packet buffer could be changed to the requested size, * false otherwise. */ static bool batadv_tvlv_realloc_packet_buff(struct batadv_ogm_buf *ogm_buff,
Signature · 1 line
2.47.3