The annotated tag, batman-adv-for-davem has been created
at 854aab63b9a42293ef950da1567f2d524a50175a (tag)
tagging 92dcdf09a139e51b7b043b9443b8fd69de298dff (commit)
replaces v4.5-rc2
tagged by Antonio Quartulli
on Wed Feb 10 23:28:33 2016 +0800
- Shortlog ------------------------------------------------------------
Here you have a batch of patches by Sven Eckelmann that
drops our private reference counting implementation and
substitutes it with the kref objects/functions.
On top of that you have a patch, by Simon Wunderlich, that
makes the broadcast protection window code more generic so
that it can be re-used in the future by other components
with different requirements.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAABCAAGBQJWu1lEAAoJENpFlCjNi1MRQ3oQALvbL6OLosj/s8aNmGsxDavt
AxiOfSh9Q2m83ayIqFSRqPcGgfvWgVRsSXtJsEHOJEyA91r0WF5zbW/MBBhQE+rx
D0+XTCoQnMRuSH45Oeg411LfQnzVKIe3geE64utpDwEzjL5iIPIUN+JfqkLV46/Q
Bf7QUBVnINsIO2srIPduMChpC7ime8XamvGQWC+ca5wMp3mtucDRTfPYdM+qEiBV
C3WkLNDADa5w/4SSQ8lp0WLLiDRU6ZrjCg+lkZU/Wd4K6OQw/MvOyVEOtfQd6+4u
zXXxegelr3PmoYWO39gxsvQDMWazqnytT7BHCaje+RB4W1Kjerci72qAQxzzdEGV
u8ndcA0oxfoKcnDgnFyO8YjApzAbvHZOBHMorAb/nVANj9nFYXESochOlFcJpzy1
fDvrlzfzksA+fdCrSeXjjEi73f7OQH3Uari+0BFBJI4xGlERk4rXx6cYVnsaHLWc
swFYG1+Tsjvg4Onh7VW1wzzUPlrfZ8piDXZ8i/u+iPgZWOZv2oDigIEoOU5BsliS
41Mv9wgOLoKwlFgtwO1eZLq2eB/9potuZQfiD6xmvbvz1qbtNzK3ZzIKMYlPJrEG
ULW7VsUUOlrB9/2H+FKmwrt+jQGGbva0bARBJNeF+MgUwphfe7YQJXRUGuXtEqSj
RgmnvYSCzGs8cBQz8nar
=cdxB
-----END PGP SIGNATURE-----
Antonio Quartulli (3):
batman-adv: fix kerneldoc for DAT functions
batman-adv: fix kerneldoc for TT functions
batman-adv: add kernel doc for AP isolation attributes in bat_priv
Marek Lindner (1):
batman-adv: kernel doc readability updates
Simon Wunderlich (3):
batman-adv: Update/repair bridge loop avoidance kerneldoc
batman-adv: add kerneldoc for batadv_iv_ogm_aggr_packet
batman-adv: add seqno maximum age and protection start flag parameters
Sven Eckelmann (30):
batman-adv: Fix kerneldoc parsing of structs/enums
batman-adv: Remove kerneldoc for missing parameters
batman-adv: Fix names in kerneldoc of functions
batman-adv: Drop invalid kerneldoc for variable batadv_vlan_attrs
batman-adv: Fix kerneldoc parsing of return description
batman-adv: Fix kerneldoc of main functions
batman-adv: Fix kerneldoc of network-coding functions
batman-adv: Fix kernel-doc for batadv_claim_free_ref
batman-adv: update copyright years for 2016
batman-adv: Switch to HTTPS version of links
batman-adv: Drop reference to netdevice on last reference
batman-adv: Add lockdep assert for container_list_lock
batman-adv: Convert batadv_hardif_neigh_node to kref
batman-adv: Convert batadv_gw_node to kref
batman-adv: Convert batadv_softif_vlan to kref
batman-adv: Convert batadv_bla_backbone_gw to kref
batman-adv: Convert batadv_bla_claim to kref
batman-adv: Convert batadv_nc_node to kref
batman-adv: Convert batadv_nc_path to kref
batman-adv: Convert batadv_dat_entry to kref
batman-adv: Convert batadv_tvlv_container to kref
batman-adv: Convert batadv_tvlv_handler to kref
batman-adv: Convert batadv_tt_orig_list_entry to kref
batman-adv: Convert batadv_neigh_ifinfo to kref
batman-adv: Convert batadv_orig_ifinfo to kref
batman-adv: Convert batadv_neigh_node to kref
batman-adv: Convert batadv_hard_iface to kref
batman-adv: Convert batadv_orig_node_vlan to kref
batman-adv: Convert batadv_orig_node to kref
batman-adv: Convert batadv_tt_common_entry to kref
-----------------------------------------------------------------------
--
linux integration
The annotated tag, batman-adv-for-davem has been deleted
was 8a8ec185069e23624c8b4f32b09a2367a1ce3788
-----------------------------------------------------------------------
tag batman-adv-for-davem
This batch of patches includes a number of corrections and
improvements for our kernel-doc. These changes also make sure
that our doc is now properly processed by the kernel-doc
parsing tool.
Other than that you have a patch updating all the copyright
lines to 2016 and another patch switching the URLs in our
readme, Kconfig and MAINTAINERS file from "http" to "https".
Both by Sven Eckelmann.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAABCAAGBQJWsV4cAAoJENpFlCjNi1MRXloP/2tpnEdIABtAzZWvdUeE7eLP
7yZGhociLYYWRbGc/uiKeHBr9UvZy+Abo0qJDrW/10BHuFb2SmIqZwBINEhIiLAm
+jpwzGKWvbeXPU/fQ9EfhG9CR7U2ceeI6c/0F8eAAofTzDZSEu2JTk43/wzXhh46
LuKKHhvqZ3T+S7LLrMm0uJmwPBGJwdFYEWgvG18WB/1VEJTsrYipM/tbinpEKfiw
QaGYXClQmOx/n0yo46/H5lR8VB4RfCF8Gtx6+5teMcYXtVO6j6lnacgoztt5P7Ku
6j/9+r/5xXmFMO/D+xkE/QprbYtomB+R4t8c2FaQZxae4FN5sIEggFphFj5XwQ4L
OpuQWFH0UhJLaxFjq54lO0tzMICy6tpQIy0EstgKoa91VOOlyniS0bb3up9/tP3O
nWpPbgVz+xB3KbAdUT0cPcN0TePGJxLC0v1Gli1KjwiVkU0kC+ADfXj54b+aNn5T
N5aTbWFiJyW/9p+hDEh+/NBqg56v40qFri7KcEBNWsV6qI2R9pmKyj68oyV/GVYS
wYi+6wIKjwW4x6Gk1AqeZsJ+nj5QVnzYOTf1XT1zGQjwseMJxUhHW2/ct2Fae7PM
9CHZVEd129BdE66NRlWzjjfefMjNlIFqMKxLGyqEKQp5ClWDdfsHtiC78ry1fHWR
n4ymPVPZXOTQ+plyObr2
=IfQN
-----END PGP SIGNATURE-----
7b5e73961915438d623cb80eea97868b3a66cc48 batman-adv: Switch to HTTPS version of links
-----------------------------------------------------------------------
--
linux integration
Repository : ssh://git@open-mesh.org/batman-adv
On branch : master
>---------------------------------------------------------------
commit 507dba0808a6301ae73ec3cf1bb506a58c214c0a
Author: Simon Wunderlich <simon(a)open-mesh.com>
Date: Mon Feb 1 15:21:38 2016 +0100
batman-adv: Merge batadv_v_ogm_orig_update into batadv_v_ogm_route_update
Since batadv_v_ogm_orig_update() was only called from one place and the
calling function became very short, merge these two functions together.
This should also reflect the protocol description of B.A.T.M.A.N. V
better.
Signed-off-by: Simon Wunderlich <simon(a)open-mesh.com>
Signed-off-by: Marek Lindner <mareklindner(a)neomailbox.ch>
>---------------------------------------------------------------
507dba0808a6301ae73ec3cf1bb506a58c214c0a
net/batman-adv/bat_v_ogm.c | 117 ++++++++++++++++++---------------------------
1 file changed, 46 insertions(+), 71 deletions(-)
diff --git a/net/batman-adv/bat_v_ogm.c b/net/batman-adv/bat_v_ogm.c
index 341ff27..1b2399e 100644
--- a/net/batman-adv/bat_v_ogm.c
+++ b/net/batman-adv/bat_v_ogm.c
@@ -234,73 +234,6 @@ void batadv_v_ogm_primary_iface_set(struct batadv_hard_iface *primary_iface)
}
/**
- * batadv_v_ogm_orig_update - update the originator status based on the received
- * OGM
- * @bat_priv: the bat priv with all the soft interface information
- * @orig_node: the originator to update
- * @neigh_node: the neighbour the OGM has been received from (to update)
- * @ogm2: the received OGM
- * @if_outgoing: the interface where this OGM is going to be forwarded through
- */
-static void
-batadv_v_ogm_orig_update(struct batadv_priv *bat_priv,
- struct batadv_orig_node *orig_node,
- struct batadv_neigh_node *neigh_node,
- const struct batadv_ogm2_packet *ogm2,
- struct batadv_hard_iface *if_outgoing)
-{
- struct batadv_neigh_ifinfo *router_ifinfo = NULL, *neigh_ifinfo = NULL;
- struct batadv_neigh_node *router = NULL;
- s32 neigh_seq_diff;
- u32 neigh_last_seqno;
- u32 router_last_seqno;
- u32 router_throughput, neigh_throughput;
-
- batadv_dbg(BATADV_DBG_BATMAN, bat_priv,
- "Searching and updating originator entry of received packet\n");
-
- /* if this neighbor already is our next hop there is nothing
- * to change
- */
- router = batadv_orig_router_get(orig_node, if_outgoing);
- if (router == neigh_node)
- goto out;
-
- /* don't consider neighbours with worse throughput.
- * also switch route if this seqno is BATADV_V_MAX_ORIGDIFF newer than
- * the last received seqno from our best next hop.
- */
- if (router) {
- router_ifinfo = batadv_neigh_ifinfo_get(router, if_outgoing);
- neigh_ifinfo = batadv_neigh_ifinfo_get(neigh_node, if_outgoing);
-
- /* if these are not allocated, something is wrong. */
- if (!router_ifinfo || !neigh_ifinfo)
- goto out;
-
- neigh_last_seqno = neigh_ifinfo->bat_v.last_seqno;
- router_last_seqno = router_ifinfo->bat_v.last_seqno;
- neigh_seq_diff = neigh_last_seqno - router_last_seqno;
- router_throughput = router_ifinfo->bat_v.throughput;
- neigh_throughput = neigh_ifinfo->bat_v.throughput;
-
- if ((neigh_seq_diff < BATADV_OGM_MAX_ORIGDIFF) &&
- (router_throughput >= neigh_throughput))
- goto out;
- }
-
- batadv_update_route(bat_priv, orig_node, if_outgoing, neigh_node);
-
-out:
- if (router_ifinfo)
- batadv_neigh_ifinfo_put(router_ifinfo);
- if (neigh_ifinfo)
- batadv_neigh_ifinfo_put(neigh_ifinfo);
- if (router)
- batadv_neigh_node_put(router);
-}
-
-/**
* batadv_v_forward_penalty - apply a penalty to the throughput metric forwarded
* with B.A.T.M.A.N. V OGMs
* @bat_priv: the bat priv with all the soft interface information
@@ -546,6 +479,11 @@ static bool batadv_v_ogm_route_update(struct batadv_priv *bat_priv,
struct batadv_neigh_node *router = NULL;
struct batadv_orig_node *orig_neigh_node = NULL;
struct batadv_neigh_node *orig_neigh_router = NULL;
+ struct batadv_neigh_ifinfo *router_ifinfo = NULL, *neigh_ifinfo = NULL;
+ u32 router_throughput, neigh_throughput;
+ u32 router_last_seqno;
+ u32 neigh_last_seqno;
+ s32 neigh_seq_diff;
bool forward = false;
orig_neigh_node = batadv_v_ogm_orig_get(bat_priv, ethhdr->h_source);
@@ -565,11 +503,44 @@ static bool batadv_v_ogm_route_update(struct batadv_priv *bat_priv,
goto out;
}
- /* Update routes, and check if the OGM is from the best next hop */
- batadv_v_ogm_orig_update(bat_priv, orig_node, neigh_node, ogm2,
- if_outgoing);
-
+ /* Mark the OGM to be considered for forwarding, and update routes
+ * if needed.
+ */
forward = true;
+
+ batadv_dbg(BATADV_DBG_BATMAN, bat_priv,
+ "Searching and updating originator entry of received packet\n");
+
+ /* if this neighbor already is our next hop there is nothing
+ * to change
+ */
+ if (router == neigh_node)
+ goto out;
+
+ /* don't consider neighbours with worse throughput.
+ * also switch route if this seqno is BATADV_V_MAX_ORIGDIFF newer than
+ * the last received seqno from our best next hop.
+ */
+ if (router) {
+ router_ifinfo = batadv_neigh_ifinfo_get(router, if_outgoing);
+ neigh_ifinfo = batadv_neigh_ifinfo_get(neigh_node, if_outgoing);
+
+ /* if these are not allocated, something is wrong. */
+ if (!router_ifinfo || !neigh_ifinfo)
+ goto out;
+
+ neigh_last_seqno = neigh_ifinfo->bat_v.last_seqno;
+ router_last_seqno = router_ifinfo->bat_v.last_seqno;
+ neigh_seq_diff = neigh_last_seqno - router_last_seqno;
+ router_throughput = router_ifinfo->bat_v.throughput;
+ neigh_throughput = neigh_ifinfo->bat_v.throughput;
+
+ if ((neigh_seq_diff < BATADV_OGM_MAX_ORIGDIFF) &&
+ (router_throughput >= neigh_throughput))
+ goto out;
+ }
+
+ batadv_update_route(bat_priv, orig_node, if_outgoing, neigh_node);
out:
if (router)
batadv_neigh_node_put(router);
@@ -577,6 +548,10 @@ out:
batadv_neigh_node_put(orig_neigh_router);
if (orig_neigh_node)
batadv_orig_node_put(orig_neigh_node);
+ if (router_ifinfo)
+ batadv_neigh_ifinfo_put(router_ifinfo);
+ if (neigh_ifinfo)
+ batadv_neigh_ifinfo_put(neigh_ifinfo);
return forward;
}
Repository : ssh://git@open-mesh.org/batman-adv
Branch 'master' now includes:
c215e4e batman-adv: Only put gw_node list reference when removed
ead9389 batman-adv: Only put orig_node_vlan list reference when removed
de6db08 Merge branch 'maint' into next
Repository : ssh://git@open-mesh.org/batman-adv
Branch 'next' now includes:
c215e4e batman-adv: Only put gw_node list reference when removed
ead9389 batman-adv: Only put orig_node_vlan list reference when removed
de6db08 Merge branch 'maint' into next
Repository : ssh://git@open-mesh.org/batman-adv
On branch : maint
>---------------------------------------------------------------
commit ead9389a3a0af4de210c977a0b11d57180d7c941
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sun Jan 31 13:28:00 2016 +0100
batman-adv: Only put orig_node_vlan list reference when removed
The batadv_orig_node_vlan reference counter in batadv_tt_global_size_mod
can only be reduced when the list entry was actually removed. Otherwise the
reference counter may reach zero when batadv_tt_global_size_mod is called
from two different contexts for the same orig_node_vlan but only one
context is actually removing the entry from the list.
The release function for this orig_node_vlan is not called inside the
vlan_list_lock spinlock protected region because the function
batadv_tt_global_size_mod still holds a orig_node_vlan reference for the
object pointer on the stack. Thus the actual release function (when
required) will be called only at the end of the function.
Fixes: 21a57f6e7a3b ("batman-adv: make the TT CRC logic VLAN specific")
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
Signed-off-by: Marek Lindner <mareklindner(a)neomailbox.ch>
>---------------------------------------------------------------
ead9389a3a0af4de210c977a0b11d57180d7c941
net/batman-adv/translation-table.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index 9fcf6bf..7301a92 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -311,9 +311,11 @@ static void batadv_tt_global_size_mod(struct batadv_orig_node *orig_node,
if (atomic_add_return(v, &vlan->tt.num_entries) == 0) {
spin_lock_bh(&orig_node->vlan_list_lock);
- hlist_del_init_rcu(&vlan->list);
+ if (!hlist_unhashed(&vlan->list)) {
+ hlist_del_init_rcu(&vlan->list);
+ batadv_orig_node_vlan_free_ref(vlan);
+ }
spin_unlock_bh(&orig_node->vlan_list_lock);
- batadv_orig_node_vlan_free_ref(vlan);
}
batadv_orig_node_vlan_free_ref(vlan);
Repository : ssh://git@open-mesh.org/batman-adv
On branch : maint
>---------------------------------------------------------------
commit c215e4e249753acec3e4b8614623132a2f28671f
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sun Jan 31 13:27:59 2016 +0100
batman-adv: Only put gw_node list reference when removed
The batadv_gw_node reference counter in batadv_gw_node_update can only be
reduced when the list entry was actually removed. Otherwise the reference
counter may reach zero when batadv_gw_node_update is called from two
different contexts for the same gw_node but only one context is actually
removing the entry from the list.
The release function for this gw_node is not called inside the list_lock
spinlock protected region because the function batadv_gw_node_update still
holds a gw_node reference for the object pointer on the stack. Thus the
actual release function (when required) will be called only at the end of
the function.
Fixes: 0511575c4d03 ("batman-adv: remove obsolete deleted attribute for gateway node")
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
Signed-off-by: Marek Lindner <mareklindner(a)neomailbox.ch>
>---------------------------------------------------------------
c215e4e249753acec3e4b8614623132a2f28671f
net/batman-adv/gateway_client.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/net/batman-adv/gateway_client.c b/net/batman-adv/gateway_client.c
index 8350775..c9b8b48 100644
--- a/net/batman-adv/gateway_client.c
+++ b/net/batman-adv/gateway_client.c
@@ -527,11 +527,12 @@ void batadv_gw_node_update(struct batadv_priv *bat_priv,
* gets dereferenced.
*/
spin_lock_bh(&bat_priv->gw.list_lock);
- hlist_del_init_rcu(&gw_node->list);
+ if (!hlist_unhashed(&gw_node->list)) {
+ hlist_del_init_rcu(&gw_node->list);
+ batadv_gw_node_free_ref(gw_node);
+ }
spin_unlock_bh(&bat_priv->gw.list_lock);
- batadv_gw_node_free_ref(gw_node);
-
curr_gw = batadv_gw_get_selected_gw_node(bat_priv);
if (gw_node == curr_gw)
batadv_gw_reselect(bat_priv);