Re: [B.A.T.M.A.N.] [RFC 15/23] batman-adv: ELP - send unicast ELP packets for throughput sampling

Andrew Lunn
2014-02-12T09:12:15Z

On Tue, Feb 11, 2014 at 01:48:15PM +0100, Antonio Quartulli wrote:
> From: Antonio Quartulli <antonio@open-mesh.com>
>
> In case of a unused link, the throughput estimation will
> get stuck to the last sampled value and therefore the
> reported metric will becomes obsolete.
>
> Send unicast ELP packets to each neighbor to trigger throughput
> sampling on unused links.

Humm, i can understand the need for this, but i really think the rate
control code should be sending the probes, not batman. What do the
wifi people say about this? Have they tried submitting patches to
them?

> /* Instead of updating the metric each "received" ELP packet, it is
> * better to do it on each ELP sending. This way, if a node is dead and
> * does not send packets anymore, batman-adv is still able to timely
> * react to its death.
> + *
> + * The metric is updated by following these steps:
> + * 1) if the hard_iface if wifi => send a unicast ELP for
> + * probing/sampling to each neighbor
> + * 2) update the metric value of each neighbor

Might be worth pointing out here, that because of queuing, there is no
guarantee the ELP packets have been send yet and the RC estimated
bandwidth could be up to 100ms old.

> + *
> */
> rcu_read_lock();
> - hlist_for_each_entry_rcu(neigh, &hard_iface->bat_v.neigh_list, list)
> + hlist_for_each_entry_rcu(neigh, &hard_iface->bat_v.neigh_list, list) {
> + if (batadv_v_elp_wifi_neigh_probe(hard_iface, neigh) < 0)
> + /* if something goes wrong while probing, better to stop
> + * sending packets immediately and reschedule the task
> + */
> + break;
> +
> ewma_add(&neigh->metric, batadv_v_elp_get_throughput(neigh));
> + }
> rcu_read_unlock();
>