From: Antonio Quartulli <antonio(a)open-mesh.com>
Users may need information about the expected throughput
towards a given peer computed by the RC algorithm.
Export such value in Mbps/100 through the get_station() API.
This unit has been chosen because it is the same of the
throughput returned by MinstrelHT.
This information will be useful to the batman-adv module
which will use it for its new metric computation.
Signed-off-by: Antonio Quartulli <antonio(a)open-mesh.com>
---
Changes since the RFC:
- Change all the station_info_flags to use BIT()
- Properly comment about the unit used by the throughput value
- added new ieee80211_ops.get_expected_throughput() API (to support drivers
having HW RC)
- improved doc about new cfg80211_get_station() function
- minor cleanups
include/net/cfg80211.h | 63 ++++++++++++++++++++++++++++----------------------
1 file changed, 35 insertions(+), 28 deletions(-)
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 9496fe5..d4b85f7 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -862,36 +862,38 @@ int cfg80211_check_station_change(struct wiphy *wiphy,
* @STATION_INFO_NONPEER_PM: @nonpeer_pm filled
* @STATION_INFO_CHAIN_SIGNAL: @chain_signal filled
* @STATION_INFO_CHAIN_SIGNAL_AVG: @chain_signal_avg filled
+ * @STATION_INFO_EXPECTED_THROUGHPUT: @expected_throughput filled
*/
enum station_info_flags {
- STATION_INFO_INACTIVE_TIME = 1<<0,
- STATION_INFO_RX_BYTES = 1<<1,
- STATION_INFO_TX_BYTES = 1<<2,
- STATION_INFO_LLID = 1<<3,
- STATION_INFO_PLID = 1<<4,
- STATION_INFO_PLINK_STATE = 1<<5,
- STATION_INFO_SIGNAL = 1<<6,
- STATION_INFO_TX_BITRATE = 1<<7,
- STATION_INFO_RX_PACKETS = 1<<8,
- STATION_INFO_TX_PACKETS = 1<<9,
- STATION_INFO_TX_RETRIES = 1<<10,
- STATION_INFO_TX_FAILED = 1<<11,
- STATION_INFO_RX_DROP_MISC = 1<<12,
- STATION_INFO_SIGNAL_AVG = 1<<13,
- STATION_INFO_RX_BITRATE = 1<<14,
- STATION_INFO_BSS_PARAM = 1<<15,
- STATION_INFO_CONNECTED_TIME = 1<<16,
- STATION_INFO_ASSOC_REQ_IES = 1<<17,
- STATION_INFO_STA_FLAGS = 1<<18,
- STATION_INFO_BEACON_LOSS_COUNT = 1<<19,
- STATION_INFO_T_OFFSET = 1<<20,
- STATION_INFO_LOCAL_PM = 1<<21,
- STATION_INFO_PEER_PM = 1<<22,
- STATION_INFO_NONPEER_PM = 1<<23,
- STATION_INFO_RX_BYTES64 = 1<<24,
- STATION_INFO_TX_BYTES64 = 1<<25,
- STATION_INFO_CHAIN_SIGNAL = 1<<26,
- STATION_INFO_CHAIN_SIGNAL_AVG = 1<<27,
+ STATION_INFO_INACTIVE_TIME = BIT(0),
+ STATION_INFO_RX_BYTES = BIT(1),
+ STATION_INFO_TX_BYTES = BIT(2),
+ STATION_INFO_LLID = BIT(3),
+ STATION_INFO_PLID = BIT(4),
+ STATION_INFO_PLINK_STATE = BIT(5),
+ STATION_INFO_SIGNAL = BIT(6),
+ STATION_INFO_TX_BITRATE = BIT(7),
+ STATION_INFO_RX_PACKETS = BIT(8),
+ STATION_INFO_TX_PACKETS = BIT(9),
+ STATION_INFO_TX_RETRIES = BIT(10),
+ STATION_INFO_TX_FAILED = BIT(11),
+ STATION_INFO_RX_DROP_MISC = BIT(12),
+ STATION_INFO_SIGNAL_AVG = BIT(13),
+ STATION_INFO_RX_BITRATE = BIT(14),
+ STATION_INFO_BSS_PARAM = BIT(15),
+ STATION_INFO_CONNECTED_TIME = BIT(16),
+ STATION_INFO_ASSOC_REQ_IES = BIT(17),
+ STATION_INFO_STA_FLAGS = BIT(18),
+ STATION_INFO_BEACON_LOSS_COUNT = BIT(19),
+ STATION_INFO_T_OFFSET = BIT(20),
+ STATION_INFO_LOCAL_PM = BIT(21),
+ STATION_INFO_PEER_PM = BIT(22),
+ STATION_INFO_NONPEER_PM = BIT(23),
+ STATION_INFO_RX_BYTES64 = BIT(24),
+ STATION_INFO_TX_BYTES64 = BIT(25),
+ STATION_INFO_CHAIN_SIGNAL = BIT(26),
+ STATION_INFO_CHAIN_SIGNAL_AVG = BIT(27),
+ STATION_INFO_EXPECTED_THROUGHPUT = BIT(28),
};
/**
@@ -1013,6 +1015,9 @@ struct sta_bss_parameters {
* @local_pm: local mesh STA power save mode
* @peer_pm: peer mesh STA power save mode
* @nonpeer_pm: non-peer mesh STA power save mode
+ * @expected_throughput: expected throughput in Mbps/100 reported by the RC
+ * algorithm towards this station. The unit of this value has been chosen
+ * because it is the same of the throughput returned by MinstrelHT
*/
struct station_info {
u32 filled;
@@ -1051,6 +1056,8 @@ struct station_info {
enum nl80211_mesh_power_mode peer_pm;
enum nl80211_mesh_power_mode nonpeer_pm;
+ u32 expected_throughput;
+
/*
* Note: Add a new enum station_info_flags value for each new field and
* use it to check which fields are initialized.
--
1.8.3.2
This patch adds a switch for the new multicast_mode setting in
batman-adv.
Signed-off-by: Linus Lüssing <linus.luessing(a)web.de>
---
v3: fix merge conflict
(ordex was quicker with his isolation mark support patch :P)
README | 7 +++++++
man/batctl.8 | 4 ++++
sys.c | 6 ++++++
sys.h | 1 +
4 files changed, 18 insertions(+)
diff --git a/README b/README
index a4507b7..fe8eed9 100644
--- a/README
+++ b/README
@@ -392,6 +392,13 @@ Usage: batctl network_coding|nc [0|1]
Note that network coding requires a working promiscuous mode on all interfaces.
+batctl multicast_mode
+=====================
+
+display or modify the multicast mode setting
+
+Usage: batctl multicast_mode|mm [0|1]
+
batctl aggregation
==================
diff --git a/man/batctl.8 b/man/batctl.8
index b808293..f92bf3a 100644
--- a/man/batctl.8
+++ b/man/batctl.8
@@ -88,6 +88,10 @@ disable fragmentation.
If no parameter is given the current network coding mode setting is displayed. Otherwise the parameter is used to enable or
disable network coding.
.br
+.IP "\fBmulticast_mode\fP|\fBmm\fP [\fB0\fP|\fB1\fP]"
+If no parameter is given the current multicast mode setting is displayed. Otherwise the parameter is used to enable or
+disable multicast optimizations (i.e. disabling means always sending own multicast frames via classic flooding).
+.br
.IP "\fBloglevel\fP|\fBll\fP [\fBlevel\fP[ \fBlevel\fP[ \fBlevel\fP]] \fB...\fP]"
If no parameter is given the current log level settings are displayed otherwise the parameter(s) is/are used to set the log
level. Level 'none' disables all verbose logging. Level 'batman' enables messages related to routing / flooding / broadcasting.
diff --git a/sys.c b/sys.c
index fd6e107..d20696b 100644
--- a/sys.c
+++ b/sys.c
@@ -103,6 +103,12 @@ const struct settings_data batctl_settings[BATCTL_SETTINGS_NUM] = {
.sysfs_name = "isolation_mark",
.params = NULL,
},
+ {
+ .opt_long = "multicast_mode",
+ .opt_short = "mm",
+ .sysfs_name = "multicast_mode",
+ .params = sysfs_param_enable,
+ },
};
static void interface_usage(void)
diff --git a/sys.h b/sys.h
index 5633822..dd0bee5 100644
--- a/sys.h
+++ b/sys.h
@@ -47,6 +47,7 @@ enum batctl_settings_list {
BATCTL_SETTINGS_FRAGMENTATION,
BATCTL_SETTINGS_NETWORK_CODING,
BATCTL_SETTINGS_ISOLATION_MARK,
+ BATCTL_SETTINGS_MULTICAST_MODE,
BATCTL_SETTINGS_NUM,
};
--
1.7.10.4
From: Antonio Quartulli <antonio(a)open-mesh.com>
In the new fragmentation code the batadv_frag_send_packet()
function obtains a reference to the primary_if, but it does
not release it upon return.
This reference imbalance prevents the primary_if (and then
the related netdevice) to be properly released on shut down.
Fix this by releasing the primary_if in batadv_frag_send_packet().
Introduced by db56e4ecf5c2b179a0101138eacc2ec52b6ef45d
("batman-adv: Fragment and send skbs larger than mtu")
Cc: Martin Hundebøll <martin(a)hundeboll.net>
Signed-off-by: Antonio Quartulli <antonio(a)open-mesh.com>
---
fragmentation.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/fragmentation.c b/fragmentation.c
index 88df9b1..cc1cfd6 100644
--- a/fragmentation.c
+++ b/fragmentation.c
@@ -418,12 +418,13 @@ bool batadv_frag_send_packet(struct sk_buff *skb,
struct batadv_neigh_node *neigh_node)
{
struct batadv_priv *bat_priv;
- struct batadv_hard_iface *primary_if;
+ struct batadv_hard_iface *primary_if = NULL;
struct batadv_frag_packet frag_header;
struct sk_buff *skb_fragment;
unsigned mtu = neigh_node->if_incoming->net_dev->mtu;
unsigned header_size = sizeof(frag_header);
unsigned max_fragment_size, max_packet_size;
+ bool ret = false;
/* To avoid merge and refragmentation at next-hops we never send
* fragments larger than BATADV_FRAG_MAX_FRAG_SIZE
@@ -483,7 +484,11 @@ bool batadv_frag_send_packet(struct sk_buff *skb,
skb->len + ETH_HLEN);
batadv_send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr);
- return true;
+ ret = true;
+
out_err:
- return false;
+ if (primary_if)
+ batadv_hardif_free_ref(primary_if);
+
+ return ret;
}
--
1.8.3.2
If hard_iface is NULL and goto out is made batadv_hardif_free_ref()
doesn't check for NULL before dereferencing it to get to refcount.
Reported-by: Sven Eckelmann <sven(a)narfation.org>
Signed-off-by: Marek Lindner <mareklindner(a)neomailbox.ch>
---
originator.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/originator.c b/originator.c
index aa2468b..35b42f8 100644
--- a/originator.c
+++ b/originator.c
@@ -1074,7 +1074,8 @@ int batadv_orig_hardif_seq_print_text(struct seq_file *seq, void *offset)
bat_priv->bat_algo_ops->bat_orig_print(bat_priv, seq, hard_iface);
out:
- batadv_hardif_free_ref(hard_iface);
+ if (hard_iface)
+ batadv_hardif_free_ref(hard_iface);
return 0;
}
--
2.0.0.rc0
Recently i have experienced something quite usual to my experience and
that was not happening previously in the same scenario where it is
happening now.
Here is the example:
2 nodes at with adhoc at 2.4ghz at a distance of 415 meters
one uses an omni 15 dbi antenna at 18dbi and another 24 dbi grid at 16 dbi.
This link was previously providing up to 21 mbit being 17 mbit a the
lowest. Batman-adv TQ value was always around 230 being many times above
250.
However this has recently changed the same link with 230~250 TQ and the
same txpower is now outputting 1.93 Mbits/sec
I have used iperf for bandwidth tests. Batman-adv version is 2013.4.
Although i have considered several types of scenarios that can be
causing this issue i have also tested against some which leaves me
puzzled in regards to the presented TQ quality and dBm values as the
nodes dBm are sometimes bad (ie: -80 ~ -90)
One of the main questions is: shouldn't batman-adv TQ reflect or be
influenced by dBm values ? How come with -90 dBm i get batman-adv to
show me 230 TQ ?
Also any feedback based on your experience regarding this type of
scenario is welcome. This situation happened overnight without any
access point new configurations or physical setup changes.
--
Site: http://wirelesspt.net
Mesh: http://tinyurl.com/wirelesspt
Admin: http://wirelesspt.net/wiki/Cmsv
Twitter: http://twitter.com/wirelesspt
Youtube: https://youtube.com/wirelesspt
Facebook: https://www.facebook.com/wirelesspt
Suporte técnico via sms: 91 19 11 798
Donativos/Paypal: http://tinyurl.com/doar-verba
Chave publica PGP/SSH: http://wirelesspt.net/arquivos/pk
Email ao abrigo de: https://creativecommons.org/licenses/by-nc-sa/3.0/pt/
Following the Troubleshooting guide, I have changed the MTU for bat0
interface to 1524. I'm getting this message in my syslog:
Jan 1 00:00:53 localhost kernel: [ 26.899762] batman_adv: bat0: The
MTU of interface wlan0 is too small (1524) to handle the transport of
batman-adv packets. Packets going over this interface will be fragmented
on layer2 which could impact the performance. Setting the MTU to 1560
would solve the problem.
I'm not seeing any apparent performance issues, but do I really need to
make the MTU 1560?
-saurabh