Re: [B.A.T.M.A.N.] [RFC 1/3] batman-adv: bandwidth meter implementation

2012-08-13 Thread Sven Eckelmann
On Sunday 12 August 2012 14:20:57 Sven Eckelmann wrote:
[...]
 Sry, disapproved.

And just because I just saw it in your git branch:

 --- a/Makefile
 +++ b/Makefile
 @@ -22,7 +22,7 @@
  # B.A.T.M.A.N. debugging:
  export CONFIG_BATMAN_ADV_DEBUG=n
  # B.A.T.M.A.N. bridge loop avoidance:
 -export CONFIG_BATMAN_ADV_BLA=y
 +export CONFIG_BATMAN_ADV_BLA=n
  
  PWD:=$(shell pwd)
  KERNELPATH ?= /lib/modules/$(shell uname -r)/build

This is also not acceptable.

Kind regards,
Sven


signature.asc
Description: This is a digitally signed message part.


Re: [B.A.T.M.A.N.] [RFC 1/3] batman-adv: bandwidth meter implementation

2012-08-13 Thread Sven Eckelmann
On Thursday 09 August 2012 14:15:24 Edo Monticelli wrote:
[...]
 +dst_unreach:
 + /* TODO not in .h
 + icmp_to_send-msg_type = DESTINATION_UNREACHABLE;
 + batadv_socket_add_packet(socket_client, icmp_to_send, packet_len);
 +  */
[...]
 + goto out; /* TODO send an ack! */
[...]
 + goto out; /* TODO ?? */
[...]
 + /* TODO redefine BW_PACKET_LEN */
 + skb_reserve(skb, ETH_HLEN);
 + icmp_to_send = (struct batadv_icmp_packet *)
 + skb_put(skb, bw_packet_len);
[...]
 + /* TODO notify batctl */
 + spin_unlock_bh(bat_priv-bw_list_lock);
 + batadv_dbg(BATADV_DBG_BATMAN, bat_priv,
 +Meter: trying to interrupt an already over 
 connection\n);
 + return;
 + }
[...]
 + /* TODO notify batctl */
 + spin_unlock_bh(bat_priv-bw_list_lock);
 + batadv_dbg(BATADV_DBG_BATMAN, bat_priv,
 +Meter: test to or from the same node already 
 ongoing, 
aborting\n);
 + goto out;
 + }

Mh, Looks like some open tasks... ;)


Can you also convert (and of course add) the documentation of all new 
functions/structures to KernelDoc style. Example templates can be found at 
http://www.open-mesh.org/projects/batman-adv/wiki/KernelDoc

Kind regards,
Sven

signature.asc
Description: This is a digitally signed message part.


Re: [B.A.T.M.A.N.] [RFC 1/3] batman-adv: bandwidth meter implementation

2012-08-12 Thread Sven Eckelmann
On Thursday 09 August 2012 14:15:24 Edo Monticelli wrote:
 The bandwith meter module is a simple, kernel-space replacement for bandwith
 measurements tool like iperf and netper. It is intended to approximate TCP
 behaviour.
 
 It is invoked through ``batctl bw: the protocol is connection oriented,
 with cumulative acknowledgment and sliding window. Sender keeps a timeout,
 which is checked by a worker function regoularly invoked through the
 workqueue mechanism. If the timeout is expired at the time worker is
 executed, the whole window is re-transmitted.
 
 Struct bw_vars, one for each connection, are collected into a linked list.
 Thus access to them is protected with a spinlock.
 
 Another spinlock prevents more than one instance of multiple_send to run
 concurrently. Ack code is mutually exclusive (two ack handler cannot run at
 the same time for differnent acks), but they are not mutually exclusive
 with send_remaining_window, that is to say the ack handler shifts the
 window ``while send_remaining_window is running. Maybe some atomic
 variable (window_first) is needed to avoid problems.
 
 When the test is over, the results are returned to batctl through a call to
 the function batadv_socket_receive_packet(), before freeing struct
 batadv_bw_vars.
 
 The function only accepts struct batadv_icmp_packet_rr, so that structure is
 used and a cast is done to struct batadv_bw_result.
 
 The test interruptable with CTRL-C. A receiver side timeout avoids
 unlimited waitings for sender packets: after one second of inactivity, the
 receiver abort the ongoing test.
 
 Signed-off-by: Edo Monticelli mon...@autistici.org
 ---
  Makefile |2 +-
  Makefile.kbuild  |1 +
  bw_meter.c   |  513
 ++ bw_meter.h   |  
  7 +
  icmp_socket.c|   18 ++
  main.c   |2 +
  packet.h |   22 ++-
  routing.c|   15 ++-
  soft-interface.c |5 +
  types.h  |   36 
  10 files changed, 614 insertions(+), 7 deletions(-)
  create mode 100644 bw_meter.c
  create mode 100644 bw_meter.h
 
 diff --git a/Makefile b/Makefile
 index bd8d30c..12aebe5 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -20,7 +20,7 @@
 
  # changing the CONFIG_* line to 'y' enables the related feature
  # B.A.T.M.A.N. debugging:
 -export CONFIG_BATMAN_ADV_DEBUG=n
 +export CONFIG_BATMAN_ADV_DEBUG=y
  # B.A.T.M.A.N. bridge loop avoidance:
  export CONFIG_BATMAN_ADV_BLA=y


Sry, disapproved.

Kind regards,
Sven

signature.asc
Description: This is a digitally signed message part.