From: Antonio Quartulli <a@unstable.cc>
To: The list for a Better Approach To Mobile Ad-hoc Networking
<b.a.t.m.a.n@lists.open-mesh.org>
Cc: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Subject: Re: [B.A.T.M.A.N.] [PATCH v8 2/2] batman-adv: throughput meter implementation
Date: Tue, 17 May 2016 17:40:15 +0800 [thread overview]
Message-ID: <20160517094015.GD12056@prodigo.lan> (raw)
In-Reply-To: <1462959332-23410-2-git-send-email-sven@open-mesh.com>
[-- Attachment #1: Type: text/plain, Size: 2662 bytes --]
On Wed, May 11, 2016 at 11:35:30AM +0200, Sven Eckelmann wrote:
[...]
> +/**
> + * enum batadv_tp_meter_reason - reason of a a tp meter test run stop
typ0: double "a"
> + * @BATADV_TP_COMPLETE: sender finished tp run
> + * @BATADV_TP_SIGINT: sender was stopped during run
how about calling this TP_CANCEL ? batman-adv does not know much about the
SIGINT because that is only an interface between the user and batctl.
Another thing: how about adding the prefix "REASON" to all these attributes to
avoid confusion with the others ? What do you think ?
i.e. @BATADV_TP_CANCEL --> BATADV_TP_REASON_CANCEL
> + * @BATADV_TP_DST_UNREACHABLE: receiver could not be reached or didn't answer
> + * @BATADV_TP_RESEND_LIMIT: (unused) sender retry reached limit
> + * @BATADV_TP_ALREADY_ONGOING: test to or from the same node already ongoing
> + * @BATADV_TP_MEMORY_ERROR: test was stopped due to low memory
> + * @BATADV_TP_CANT_SEND: failed to send via outgoing interface
> + * @BATADV_TP_TOO_MANY: too many ongoing sessions
> + */
> +enum batadv_tp_meter_reason {
> + BATADV_TP_COMPLETE = 3,
> + BATADV_TP_SIGINT = 4,
> + /* error status >= 128 */
> + BATADV_TP_DST_UNREACHABLE = 128,
> + BATADV_TP_RESEND_LIMIT = 129,
> + BATADV_TP_ALREADY_ONGOING = 130,
> + BATADV_TP_MEMORY_ERROR = 131,
> + BATADV_TP_CANT_SEND = 132,
> + BATADV_TP_TOO_MANY = 133,
> +};
> +
[...]
> --- a/net/batman-adv/bat_iv_ogm.c
> +++ b/net/batman-adv/bat_iv_ogm.c
> @@ -160,8 +160,10 @@ static int batadv_iv_ogm_orig_add_if(struct batadv_orig_node *orig_node,
> orig_node->bat_iv.bcast_own = data_ptr;
>
> data_ptr = kmalloc_array(max_if_num, sizeof(u8), GFP_ATOMIC);
> - if (!data_ptr)
> + if (!data_ptr) {
> + kfree(orig_node->bat_iv.bcast_own);
> goto unlock;
> + }
>
is this chunk coming from another patch ?
[...]
> --- a/net/batman-adv/routing.c
> +++ b/net/batman-adv/routing.c
> @@ -45,6 +45,7 @@
> #include "packet.h"
> #include "send.h"
> #include "soft-interface.h"
> +#include "tp_meter.h"
> #include "translation-table.h"
>
> static int batadv_route_unicast_packet(struct sk_buff *skb,
> @@ -242,7 +243,6 @@ static int batadv_recv_my_icmp_packet(struct batadv_priv *bat_priv,
> /* receive the packet */
> if (skb_linearize(skb) < 0)
> break;
> -
why removing this line ? is it a style adjustment ?
[...]
> +
> +/**
> + * BATADV_TP_PLEN - length of the payload (data after the batadv_unicast header)
> + * to simulate
> + */
> +#define BATADV_TP_PLEN 1450
shouldn't this depend on BATADV_TP_PACKET_LEN ?
Cheers,
--
Antonio Quartulli
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-05-17 9:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-11 9:34 [B.A.T.M.A.N.] [PATCH v8 0/4] batman-adv: throughput meter Sven Eckelmann
2016-05-11 9:35 ` [B.A.T.M.A.N.] [PATCH v8 1/2] batman-adv: return netdev status in the TX path Sven Eckelmann
2016-05-11 9:35 ` [B.A.T.M.A.N.] [PATCH v8 2/2] batman-adv: throughput meter implementation Sven Eckelmann
2016-05-17 9:40 ` Antonio Quartulli [this message]
2016-05-11 9:35 ` [B.A.T.M.A.N.] [PATCH v8 1/2] batctl: Add attributes/command for BATADV_CMD_GET_MESH_INFO Sven Eckelmann
2016-05-17 9:19 ` Marek Lindner
2016-05-11 9:35 ` [B.A.T.M.A.N.] [PATCH v8 2/2] batctl: introduce throughput meter support Sven Eckelmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160517094015.GD12056@prodigo.lan \
--to=a@unstable.cc \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=sven.eckelmann@open-mesh.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox