The following commit has been merged in the master branch:
commit 6ffb0a7b1bcd7a3ab572a7b05b11ec6f4e20a45f
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sun May 8 09:39:55 2011 +0200
batman-adv: Fix line over 80 characters
160dd1399c4d589c0c5678a759e8ac7a7eefe64e introduced a line over 80 and
can not be accepted according to the Linux Coding Style.
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
diff --git a/translation-table.c b/translation-table.c
index 2bd6a31..7b72966 100644
--- a/translation-table.c
+++ b/translation-table.c
@@ -505,7 +505,8 @@ int tt_global_seq_print_text(struct seq_file *seq, void *offset)
goto out;
}
- seq_printf(seq, "Globally announced TT entries received via the mesh %s\n",
+ seq_printf(seq,
+ "Globally announced TT entries received via the mesh %s\n",
net_dev->name);
spin_lock_bh(&bat_priv->tt_ghash_lock);
--
batman-adv
The following commit has been merged in the master branch:
commit 621928cd16a3bd7b682d6b54e699d0b8ed87410a
Author: Antonio Quartulli <ordex(a)autistici.org>
Date: Thu May 5 08:43:27 2011 +0200
batctl: rename stuff from *hna* to *tt* (translation table)
To be coherent, all the functions/variables/constats have been renamed to the
TranslationTable style
Signed-off-by: Antonio Quartulli <ordex(a)autistici.org>
diff --git a/README b/README
index 8f22eb1..d11c6d3 100644
--- a/README
+++ b/README
@@ -312,7 +312,7 @@ Usage: batctl translocal|tl
Example:
$ batctl translocal
-Locally retrieved addresses (from bat0) announced via HNA:
+Locally retrieved addresses (from bat0) announced via TT:
* d6:e0:fd:d9:00:00
batctl transglobal
@@ -324,7 +324,7 @@ Usage: batctl transglobal|tg
Example:
-Globally announced HNAs received via the mesh (translation table):
+Globally announced TT entries received via the mesh (translation table):
* 16:aa:c4:a2:00:00 via fe:fe:00:00:09:01
* 5a:32:f9:df:00:00 via fe:fe:00:00:03:01
* 32:ae:5a:00:00:00 via fe:fe:00:00:04:01
@@ -356,9 +356,9 @@ display the VIS data in dot or JSON format
Usage:
-batctl vis dot {-h}{--no-HNA|-H} {--no-2nd|-2} {--numbers|-n}
+batctl vis dot {-h}{--no-TT|-T} {--no-2nd|-2} {--numbers|-n}
or
-batctl vis json {-h}{--no-HNA|-H} {--no-2nd|-2} {--numbers|-n}
+batctl vis json {-h}{--no-TT|-T} {--no-2nd|-2} {--numbers|-n}
Example:
@@ -367,19 +367,19 @@ Example:
$ batctl vis_data dot
digraph {
"A" -> "B" [label="1.00"]
- "A" -> "00:ff:f3:cc:68:ac" [label="HNA"]
+ "A" -> "00:ff:f3:cc:68:ac" [label="TT"]
subgraph "cluster_A" {
"A" [peripheries=2]
}
"B" -> "A" [label="1.00"]
"B-if2" -> "C" [label="2.00"]
- "B" -> "22:ff:f3:cc:68:ac" [label="HNA"]
+ "B" -> "22:ff:f3:cc:68:ac" [label="TT"]
subgraph "cluster_B" {
"B" [peripheries=2]
"B-if2"
}
"C" -> "B-if2" [label="2.00"]
- "C" -> "44:ff:f3:cc:68:ac" [label="HNA"]
+ "C" -> "44:ff:f3:cc:68:ac" [label="TT"]
subgraph "cluster_C" {
"C" [peripheries=2]
}
@@ -395,7 +395,7 @@ connection (100%), 2.0 means 50%, 3.0 means 33% and so on.
A host's mac address which is currently connected to the interface of a mesh
node (either the mesh node itself or hosts being bridged into the mesh) is
-being displayed with an "HNA"-label. (--no-hna omits this output)
+being displayed with an "TT"-label. (--no-TT omits this output)
To still have the information about which interfaces belong to which mesh node
a subgraph/cluster is being added. The subpgraph is being labeled with a mesh
@@ -422,7 +422,7 @@ Meaning of the shapes in this image file:
* Boxes: interfaces belonging to one BATMAN-node
* double circled interfaces: the primary interface of a BATMAN-node
(which is known to other BATMAN-nodes only, except direct neighbours)
-* Ellipses with an HNA-arrow: mesh clients (this can be a BATMAN-node itself
+* Ellipses with a TT-arrow: mesh clients (this can be a BATMAN-node itself
with its bat0 interface or computers/devices being bridged into the mesh)
* Arrows with numbers: the transmit quality (in the form 1/TQ) from one
BATMAN interface to another BATMAN interface
diff --git a/man/batctl.8 b/man/batctl.8
index 5aafce1..7ee389a 100644
--- a/man/batctl.8
+++ b/man/batctl.8
@@ -65,7 +65,7 @@ Once started batctl will display the list of announced gateways in the network.
If no parameter is given the current originator interval setting is displayed otherwise the parameter is used to set the originator interval. The interval is in units of milliseconds.
.br
.IP "\fBloglevel\fP|\fBll\fP [\fBlevel\fP]"
-If no parameter is given the current log level settings are displayed otherwise the parameter is used to set the log level. Level 0 disables all verbose logging. Level 1 enables messages related to routing / flooding / broadcasting. Level 2 enables messages related to route or hna added / changed / deleted. Level 3 enables all messages. The messages are sent to the batman-adv debug log. Use \fBbatctl log\fP to see them. Make sure to have debugging output enabled when compiling the module otherwise the output as well as the loglevel options won't be available.
+If no parameter is given the current log level settings are displayed otherwise the parameter is used to set the log level. Level 0 disables all verbose logging. Level 1 enables messages related to routing / flooding / broadcasting. Level 2 enables messages related to route or tt entry added / changed / deleted. Level 3 enables all messages. The messages are sent to the batman-adv debug log. Use \fBbatctl log\fP to see them. Make sure to have debugging output enabled when compiling the module otherwise the output as well as the loglevel options won't be available.
.br
.IP "\fBlog\fP|\fBl\fP [\fB\-n\fP]\fP"
batctl will read the batman-adv debug log which has to be compiled into the kernel module. If "\-n" is given batctl will not replace the MAC addresses with bat\-host names in the output.
@@ -127,18 +127,18 @@ Display the soft\-interface neighbor table. batctl will refresh the list every s
.IP "\fBvis_mode|vm\fP [\fBmode\fP]\fP"
If no parameter is given the current vis mode is displayed otherwise the parameter is used to set the vis mode.
.br
-.IP "\fBvis_data|vd dot\fP [\fB\-n\fP|\fB\-\-numbers\fP][\fB\-H\fP|\fB\-\-no-HNA\fP][\fB\-2\fP|\fB\-\-no-2nd\fP]"
+.IP "\fBvis_data|vd dot\fP [\fB\-n\fP|\fB\-\-numbers\fP][\fB\-T\fP|\fB\-\-no-TT\fP][\fB\-2\fP|\fB\-\-no-2nd\fP]"
Display the visualisation data in graphviz \fBdot\fP(1) format. If
"\-\-numbers" or "\-n" is given batctl will not replace the MAC
-addresses with bat-host names in the output. With "\-\-no-HNA" or
-"\-H" the HNA entries are not displayed, so the pure mesh topology can
+addresses with bat-host names in the output. With "\-\-no-TT" or
+"\-T" the TT entries are not displayed, so the pure mesh topology can
be seen. With "\-\-no-2nd" or "\-2" a dot cluster is not formed around
primary and secondary addresses from the same device.
.br
-.IP "\fBvis_data|vd json\fP [\fB\-n\fP|\fB\-\-numbers\fP][\fB\-H\fP|\fB\-\-no-HNA\fP][\fB\-2\fP|\fB\-\-no-2nd\fP]"
+.IP "\fBvis_data|vd json\fP [\fB\-n\fP|\fB\-\-numbers\fP][\fB\-T\fP|\fB\-\-no-TT\fP][\fB\-2\fP|\fB\-\-no-2nd\fP]"
Display the visualisation data in JSON format. If "\-\-numbers" or
"\-n" is given batctl will not replace the MAC addresses with bat-host
-names in the output. With "\-\-no-HNA" or "\-H" the HNA entries are
+names in the output. With "\-\-no-TT" or "\-T" the TT entries are
not displayed, so the pure mesh topology can be seen. With
"\-\-no-2nd" or "\-2" a dot cluster is not formed around primary and
secondary addresses from the same device.
diff --git a/packet.h b/packet.h
index e757187..c225c3a 100644
--- a/packet.h
+++ b/packet.h
@@ -61,7 +61,7 @@ struct batman_packet {
uint8_t orig[6];
uint8_t prev_sender[6];
uint8_t ttl;
- uint8_t num_hna;
+ uint8_t num_tt;
uint8_t gw_flags; /* flags related to gateway class */
uint8_t align;
} __packed;
diff --git a/sys.c b/sys.c
index 3511b40..f8fa1f2 100644
--- a/sys.c
+++ b/sys.c
@@ -213,7 +213,7 @@ int handle_loglevel(char *mesh_iface, int argc, char **argv)
printf("[%c] %s (%d)\n", (line_ptr[0] == '1') ? 'x' : ' ',
"messages related to routing / flooding / broadcasting", 1);
printf("[%c] %s (%d)\n", (line_ptr[0] == '2') ? 'x' : ' ',
- "messages related to route or hna added / changed / deleted", 2);
+ "messages related to route or tt entry added / changed / deleted", 2);
printf("[%c] %s (%d)\n", (line_ptr[0] == '3') ? 'x' : ' ',
"all debug messages", 3);
diff --git a/vis.c b/vis.c
index adb12d0..1a8d181 100644
--- a/vis.c
+++ b/vis.c
@@ -37,7 +37,7 @@
#define TQ_MAX_VALUE 255
typedef void (*print_tq_t) (char *orig, char *from, const long tq);
-typedef void (*print_HNA_t) (char *orig, char *from);
+typedef void (*print_TT_t) (char *orig, char *from);
typedef void (*print_1st_t) (char *orig);
typedef void (*print_2nd_t) (char *orig, char *from);
typedef void (*print_header_t) (void);
@@ -45,22 +45,22 @@ typedef void (*print_footer_t) (void);
struct funcs {
print_tq_t print_tq;
- print_HNA_t print_HNA;
+ print_TT_t print_TT;
print_1st_t print_1st;
print_2nd_t print_2nd;
print_header_t print_header;
print_footer_t print_footer;
};
-static bool with_HNA = true;
+static bool with_TT = true;
static bool with_2nd = true;
static bool with_names = true;
static void usage(void)
{
- printf("batctl vis_data dot {-h}{--no-HNA|-H} {--no-2nd|-2} {--numbers|-n}\n");
+ printf("batctl vis_data dot {-h}{--no-TT|-T} {--no-2nd|-2} {--numbers|-n}\n");
printf("or\n");
- printf("batctl vis_data json {-h}{--no-HNA|-H} {--no-2nd|-2} {--numbers|-n}\n");
+ printf("batctl vis_data json {-h}{--no-TT|-T} {--no-2nd|-2} {--numbers|-n}\n");
}
static void dot_print_tq(char *orig, char *from, const long tq)
@@ -75,11 +75,11 @@ static void dot_print_tq(char *orig, char *from, const long tq)
int_part, frac_part);
}
-static void dot_print_HNA(char *orig, char *from)
+static void dot_print_TT(char *orig, char *from)
{
printf("\t\"%s\" -> ",
get_name_by_macstr(orig, (with_names ? USE_BAT_HOSTS : 0)));
- printf("\"%s\" [label=\"HNA\"]\n",
+ printf("\"%s\" [label=\"TT\"]\n",
get_name_by_macstr(from, (with_names ? USE_BAT_HOSTS : 0)));
}
@@ -114,7 +114,7 @@ static void dot_print_footer(void)
}
const struct funcs dot_funcs = { dot_print_tq,
- dot_print_HNA,
+ dot_print_TT,
dot_print_1st,
dot_print_2nd,
dot_print_header,
@@ -133,11 +133,11 @@ static void json_print_tq(char *orig, char *from, const long tq)
int_part, frac_part);
}
-static void json_print_HNA(char *orig, char *from)
+static void json_print_TT(char *orig, char *from)
{
printf("{ \"router\" : \"%s\", ",
get_name_by_macstr(orig, (with_names ? USE_BAT_HOSTS : 0)));
- printf("\"gateway\" : \"%s\", \"label\" : \"HNA\" }\n",
+ printf("\"gateway\" : \"%s\", \"label\" : \"TT\" }\n",
get_name_by_macstr(from, (with_names ? USE_BAT_HOSTS : 0)));
}
@@ -157,7 +157,7 @@ static void json_print_2nd(char *orig, char *from)
}
const struct funcs json_funcs = { json_print_tq,
- json_print_HNA,
+ json_print_TT,
json_print_1st,
json_print_2nd,
NULL,
@@ -217,12 +217,12 @@ static int format(char *mesh_iface, const struct funcs *funcs)
funcs->print_tq(orig, from, tq);
continue;
}
- if (!strcmp(flag, "HNA")) {
- /* We have an HNA record */
- if (!with_HNA)
+ if (!strcmp(flag, "TT")) {
+ /* We have a TT record */
+ if (!with_TT)
continue;
from = strtok_r(NULL, " ", &component_save_ptr);
- funcs->print_HNA(orig, from);
+ funcs->print_TT(orig, from);
continue;
}
if (!strcmp(flag, "SEC") && with_2nd) {
@@ -274,19 +274,19 @@ int vis_data(char *mesh_iface, int argc, char *argv[])
while (1) {
int option_index = 0;
static struct option long_options[] = {
- {"no-HNA", 0, 0, 'H'},
+ {"no-TT", 0, 0, 'T'},
{"no-2nd", 0, 0, '2'},
{"numbers", 0, 0, 'n'},
{0, 0, 0, 0}
};
- c = getopt_long(argc, argv, "hH2n", long_options, &option_index);
+ c = getopt_long(argc, argv, "hT2n", long_options, &option_index);
if (c == -1)
break;
switch (c) {
- case 'H':
- with_HNA = false;
+ case 'T':
+ with_TT = false;
break;
case '2':
with_2nd = false;
--
batctl
The annotated tag, v2.6.39-rc6 has been created
at 8630f22a089f0d777893ee6a53eb3e6acef06044 (tag)
tagging 0ee5623f9a6e52df90a78bd21179f8ab370e102e (commit)
replaces v2.6.39-rc5
tagged by Linus Torvalds
on Tue May 3 19:59:23 2011 -0700
- Shortlog ------------------------------------------------------------
Linux 2.6.39-rc6
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
iEYEABECAAYFAk3AwRQACgkQF3YsRnbiHLui0wCeJNA7BfCx/NHFiygpfvmRO5JL
EO4An3qPsRJzyFHqDKLIs4xzA2yW+bFR
=d8Xg
-----END PGP SIGNATURE-----
-----------------------------------------------------------------------
--
linux integration
The following commit has been merged in the master branch:
commit b278a6c18262a5cf3bc7adb7dd0d9b3730cd9113
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Tue May 3 13:10:06 2011 +0200
batman-adv: Avoid deadlock between rtnl_lock and s_active
The hard_if_event is called by the notifier with rtnl_lock and tries to
remove sysfs entries when a NETDEV_UNREGISTER event is received. This
will automatically take the s_active lock.
The s_active lock is also used when a new interface is added to a meshif
through sysfs. In that situation we cannot wait for the rntl_lock before
creating the actual batman-adv interface to prevent a deadlock. It is
still possible to try to get the rtnl_lock and immediately abort the
current operation when the trylock call failed.
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
diff --git a/bat_sysfs.c b/bat_sysfs.c
index 85ba20d..497a070 100644
--- a/bat_sysfs.c
+++ b/bat_sysfs.c
@@ -488,24 +488,24 @@ static ssize_t store_mesh_iface(struct kobject *kobj, struct attribute *attr,
(strncmp(hard_iface->soft_iface->name, buff, IFNAMSIZ) == 0))
goto out;
+ if (!rtnl_trylock()) {
+ ret = -ERESTARTSYS;
+ goto out;
+ }
+
if (status_tmp == IF_NOT_IN_USE) {
- rtnl_lock();
hardif_disable_interface(hard_iface);
- rtnl_unlock();
- goto out;
+ goto unlock;
}
/* if the interface already is in use */
- if (hard_iface->if_status != IF_NOT_IN_USE) {
- rtnl_lock();
+ if (hard_iface->if_status != IF_NOT_IN_USE)
hardif_disable_interface(hard_iface);
- rtnl_unlock();
- }
- rtnl_lock();
ret = hardif_enable_interface(hard_iface, buff);
- rtnl_unlock();
+unlock:
+ rtnl_unlock();
out:
hardif_free_ref(hard_iface);
return ret;
--
batman-adv
The following commit has been merged in the master branch:
commit a2a260389ea0a902479430594361eaa23b584b26
Author: David Decotigny <decot(a)google.com>
Date: Wed May 4 10:25:32 2011 +0200
batman-adv: cosmetic: Use ethtool ethtool_cmd_speed API
This updates the network drivers so that they don't access the
ethtool_cmd::speed field directly, but use ethtool_cmd_speed()
instead.
For most of the drivers, these changes are purely cosmetic and don't
fix any problem, such as for those 1GbE/10GbE drivers that indirectly
call their own ethtool get_settings()/mii_ethtool_gset(). The changes
are meant to enforce code consistency and provide robustness with
future larger throughputs, at the expense of a few CPU cycles for each
ethtool operation.
All drivers compiled with make allyesconfig ion x86_64 have been
updated.
Tested: make allyesconfig on x86_64 + e1000e/bnx2x work
Signed-off-by: David Decotigny <decot(a)google.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
[sven(a)narfation.org: compat function added]
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
diff --git a/compat.h b/compat.h
index 0c5ad82..c3fd2cd 100644
--- a/compat.h
+++ b/compat.h
@@ -183,6 +183,9 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27)
+#define ethtool_cmd_speed_set(_ep, _speed) \
+ do { (_ep)->speed = (_speed); } while (0)
+
#ifndef dereference_function_descriptor
#define dereference_function_descriptor(p) (p)
#endif
diff --git a/soft-interface.c b/soft-interface.c
index 7717d62..f48bc67 100644
--- a/soft-interface.c
+++ b/soft-interface.c
@@ -897,7 +897,7 @@ static int bat_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{
cmd->supported = 0;
cmd->advertising = 0;
- cmd->speed = SPEED_10;
+ ethtool_cmd_speed_set(cmd, SPEED_10);
cmd->duplex = DUPLEX_FULL;
cmd->port = PORT_TP;
cmd->phy_address = 0;
--
batman-adv