Simon Wunderlich | 24 May 14:49 2016
Picon

Re: [PATCH] RFC: batman-adv: Remove unused primary_if variable

Hi,

On Tuesday 24 May 2016 18:00:18 Antonio Quartulli wrote:
> On Tue, May 24, 2016 at 12:31:17AM +0200, Linus Lüssing wrote:
> > Fixes: 29b9256e6631 ("batman-adv: consider outgoing interface in OGM
> > sending") Signed-off-by: Linus Lüssing <linus.luessing@...>
> > ---
> > 
> > Note sure whether the "forw_packet->if_incoming != primary_if" check
> > vanished on purpose or by accident in the mentioned commit. Or whether it
> > got substituted by some other check. Therefore sending the patch as RFC.
> I think Simon can better comment on this, but my understanding is that such
> check has been moved to batadv_iv_ogm_schedule(), thus primary_if is useless
> in this function.
> 
> Simon, comments ?

Yes, the check has been moved. I would agree that the check is redundant now. 
Please resend without RFC and add my Acked-by :)

Cheers,
     Simon
Linus Lüssing | 24 May 00:31 2016

[PATCH] RFC: batman-adv: Remove unused primary_if variable

Fixes: 29b9256e6631 ("batman-adv: consider outgoing interface in OGM sending")
Signed-off-by: Linus Lüssing <linus.luessing@...>
---

Note sure whether the "forw_packet->if_incoming != primary_if" check vanished
on purpose or by accident in the mentioned commit. Or whether it got
substituted by some other check. Therefore sending the patch as RFC.

 net/batman-adv/bat_iv_ogm.c |   17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
index 5a7923c..2076048 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
 <at>  <at>  -529,35 +529,26  <at>  <at>  static void batadv_iv_ogm_emit(struct batadv_forw_packet *forw_packet)
 {
 	struct net_device *soft_iface;
 	struct batadv_priv *bat_priv;
-	struct batadv_hard_iface *primary_if = NULL;

 	if (!forw_packet->if_incoming) {
 		pr_err("Error - can't forward packet: incoming iface not specified\n");
-		goto out;
+		return;
 	}

 	soft_iface = forw_packet->if_incoming->soft_iface;
 	bat_priv = netdev_priv(soft_iface);

(Continue reading)

Linus Lüssing | 24 May 00:14 2016

[PATCHv2] batman-adv: Refactor forward packet creation/destruction

This patch abstracts the forward packet creation and destruction via
the new functions batadv_forw_packet_alloc() and batadv_forw_packet_free().

This should simplify the freeing of a forward packet as for instance queue
counting is now done internally.

Signed-off-by: Linus Lüssing <linus.luessing@...>
---
Changelog v2:
* Rebase to current master
* Fixed typo: "ressources" vs. "resources"
* Moved forw_packet->num_packets initialization into forw_packet_alloc(), too
* Adjusted commit message

Zombie patch - rotten & dead since 2013, but w{al,or}ks again!

 net/batman-adv/bat_iv_ogm.c |   34 ++++----------
 net/batman-adv/send.c       |  103 +++++++++++++++++++++++++++++++------------
 net/batman-adv/send.h       |    6 +++
 net/batman-adv/types.h      |    2 +
 4 files changed, 92 insertions(+), 53 deletions(-)

diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
index e2d8848..5a7923c 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
 <at>  <at>  -685,19 +685,12  <at>  <at>  static void batadv_iv_ogm_aggregate_new(const unsigned char *packet_buff,
 	struct batadv_forw_packet *forw_packet_aggr;
 	unsigned char *skb_buff;
 	unsigned int skb_size;
(Continue reading)

Linus Lüssing | 24 May 00:10 2016

[PATCHv2] batman-adv: Refactor forward packet creation/destruction

This patch abstracts the forward packet creation and destruction via
the new functions batadv_forw_packet_alloc() and batadv_forw_packet_free().

This should simplify the freeing of a forward packet as for instance queue
counting is now done internally.

Signed-off-by: Linus Lüssing <linus.luessing@...>
---
Changelog v2:
* Rebase to current master
* Fixed typo: "ressources" vs. "resources"
* Moved forw_packet->num_packets initialization into forw_packet_alloc(), too
* Adjusted commit message

Zombie patch - rotten & dead since 2013, but w{al,or}ks again!

 net/batman-adv/bat_iv_ogm.c |   34 ++++----------
 net/batman-adv/send.c       |  103 +++++++++++++++++++++++++++++++------------
 net/batman-adv/send.h       |    6 +++
 net/batman-adv/types.h      |    2 +
 4 files changed, 92 insertions(+), 53 deletions(-)

diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
index e2d8848..5a7923c 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
 <at>  <at>  -685,19 +685,12  <at>  <at>  static void batadv_iv_ogm_aggregate_new(const unsigned char *packet_buff,
 	struct batadv_forw_packet *forw_packet_aggr;
 	unsigned char *skb_buff;
 	unsigned int skb_size;
(Continue reading)

Simon Wunderlich | 23 May 18:01 2016
Picon

[PATCH v8 0/2] batctl netns and netlink

This patchset adds netns/netlink support to batctl. It complements the batman-adv
netns/netlink support v8 as sent on May 23rd (today). Note that there are no 
previous batctl versions, I'm just using the same version number as the batman-adv
patches.

Andrews patch has been changed by Sven and me:
 * rebase on current master
 * fix printing of VID
 * add missing newline for claim table entries
 * fix claim table entry format
 * adjust names of mandatory attributes struct to avoid conflicts with
   backbone table
 * add local TTVN to global translation table header
 * add local group id to claim table

I've also added a patch to add support for BLA backbone tables.

Cheers,
     Simon

Andrew Lunn (1):
  batctl: Use netlink to replace some of debugfs

Simon Wunderlich (1):
  batctl: add netlink dump function for backbone tables

 batman_adv.h |   94 +++++
 debug.c      |   23 +-
 debug.h      |    4 +-
 functions.c  |   11 +
(Continue reading)

Simon Wunderlich | 23 May 17:59 2016
Picon

[PATCH v8 00/14] netns and netlink support

This patchset completes netns support, by disabling debugfs entries
when not in the default name space, and correctly handling interface
stack loops when the parent is in a different name space.

It additionally adds netlink support for most of the information found
in debugfs, and is netns aware.

This patchset is based on Andrews v7 series as of May 7th, with the
following changes of Sven and myself:

 * rebase on current master
 * fix VID output in TT+claim table
 * fix kerneldoc for batadv_bla_claim_dump* functions
 * fix -ENODEV return in batadv_bla_claim_dump
 * added support for bla backbone table
 * add own TTVN to mesh_info (required for global translation table)
 * add own group id to mesh_info (required for bla claim/backbone table)
 * fix soft_iface reference leak when dumping the claim table
 * fix function parameter alignments
 * fix includes

it applies on master plus the following two patches applied:

 * batman-adv: fix returned error in batadv_netlink_tp_meter_cancel
 * batman-adv: remove unused vid local variable in tt seq print

We have tested the setup in our VMs and verified functionality of the
provided tables, including big TT tables and bridge loop avoidance.

Corresponding batctl patches will be sent separately.
(Continue reading)

Sven Eckelmann | 21 May 16:30 2016

Re: [PATCH v4] batman-adv: B.A.T.M.A.N. V - implement hard-iface init function

On Saturday 21 May 2016 21:35:55 Antonio Quartulli wrote:
> Some fields in the hard-interface data structure are specific to the
> B.A.T.M.A.N. V protocol and have to be initialized only when such
> protocol is compiled in.
> Instead of having a #ifdef block in the middle of the hard-interface.c
> code it is better to have an algorithm private function that hides the
> precompiler logic in its own header file (like other functions).
> 
> Fixes: ffd2f27908e5 ("batman-adv: Only init ELP tweaking options when
> BATMAN_V is enabled") Signed-off-by: Antonio Quartulli <a <at> unstable.cc>
> ---

Reviewed-by: Sven Eckelmann <sven@...>

Kind regards,
	Sven
Sven Eckelmann | 21 May 14:39 2016

Re: [PATCHv3] batman-adv: B.A.T.M.A.N. V - implement hard-iface init function

On Saturday 21 May 2016 20:16:14 Antonio Quartulli wrote:
> Some fields in the hard-interface data structure are specific to the
> B.A.T.M.A.N. V protocol and have to be initialized only when such
> protocol is compiled in.
> Instead of having a #ifdef block in the middle of the hard-interface.c
> code it is better to have an algorithm private function that hides the
> precompiler logic in its own header file (like other functions).
> 
> Fixes: ffd2f27908e5 ("batman-adv: Only init ELP tweaking options when
> BATMAN_V is enabled") Signed-off-by: Antonio Quartulli <a <at> unstable.cc>
> ---
> 
> Changes from v1:
> - move bat_algo.h include line to the right location
> 
> Changes from v2:
> - rebased on top of newest master to fix compile error.
> 
> 
>  net/batman-adv/bat_v.c          | 14 ++++++++++++++
>  net/batman-adv/bat_v.h          |  5 +++++
>  net/batman-adv/hard-interface.c | 10 ++--------
>  3 files changed, 21 insertions(+), 8 deletions(-)
> 
> diff --git a/net/batman-adv/bat_v.c b/net/batman-adv/bat_v.c
> index e4a91cd..81157a3 100644
> --- a/net/batman-adv/bat_v.c
> +++ b/net/batman-adv/bat_v.c
>  <at>  <at>  -334,6 +334,20  <at>  <at>  static struct batadv_algo_ops batadv_batman_v
> __read_mostly = { };
(Continue reading)

Sven Eckelmann | 21 May 14:32 2016

Re: [PATCH 2/2] batman-adv: move include line at the same place as other files

On Saturday 21 May 2016 20:17:56 Antonio Quartulli wrote:
> main.h is always included after the #ifdef guard except for
> bat_v_elp.h. Move it at the right place.
> 
> Cc: Sven Eckelmann <sven@...>
> Signed-off-by: Antonio Quartulli <a <at> unstable.cc>
> ---

Good find :)

Reviewed-by: Sven Eckelmann <sven@...>

Kind regards,
	Sven

>  net/batman-adv/bat_v_elp.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/net/batman-adv/bat_v_elp.h b/net/batman-adv/bat_v_elp.h
> index cc130b2..be17c0b 100644
> --- a/net/batman-adv/bat_v_elp.h
> +++ b/net/batman-adv/bat_v_elp.h
>  <at>  <at>  -15,11 +15,11  <at>  <at> 
>   * along with this program; if not, see <http://www.gnu.org/licenses/>.
>   */
> 
> -#include "main.h"
> -
>  #ifndef _NET_BATMAN_ADV_BAT_V_ELP_H_
>  #define _NET_BATMAN_ADV_BAT_V_ELP_H_
(Continue reading)

Sven Eckelmann | 21 May 14:30 2016

Re: [PATCH 1/2] batman-adv: remove useless forward declarations

On Saturday 21 May 2016 20:17:55 Antonio Quartulli wrote:
> If main.h is included, the batman-adv private forward declarations are
> not needed anymore. Remove them.

No, these are defined in packet.h and not main.h/types.h

Kind regards,
	Sven

>  net/batman-adv/gateway_client.h | 1 -
>  net/batman-adv/icmp_socket.h    | 2 --
>  2 files changed, 3 deletions(-)
> 
> diff --git a/net/batman-adv/gateway_client.h
> b/net/batman-adv/gateway_client.h index 582dd8c..c74aca5 100644
> --- a/net/batman-adv/gateway_client.h
> +++ b/net/batman-adv/gateway_client.h
>  <at>  <at>  -22,7 +22,6  <at>  <at> 
> 
>  #include <linux/types.h>
> 
> -struct batadv_tvlv_gateway_data;
>  struct seq_file;
>  struct sk_buff;
> 
> diff --git a/net/batman-adv/icmp_socket.h b/net/batman-adv/icmp_socket.h
> index 618d5de..ce3ed25 100644
> --- a/net/batman-adv/icmp_socket.h
> +++ b/net/batman-adv/icmp_socket.h
>  <at>  <at>  -22,8 +22,6  <at>  <at> 
(Continue reading)

Sven Eckelmann | 20 May 20:49 2016

[PATCH] batman-adv: fix returned error in batadv_netlink_tp_meter_cancel

From: Simon Wunderlich <sw@...>

The BATADV_CMD_TP_METER_CANCEL netlink cmd can for example fail when no
valid soft_iface can be found. This error should not only detected but
also be reported back to the caller.

Fixes: 98d7a766b645 ("batman-adv: throughput meter implementation")
Signed-off-by: Simon Wunderlich <sw@...>
Signed-off-by: Sven Eckelmann <sven@...>
---
 net/batman-adv/netlink.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/batman-adv/netlink.c b/net/batman-adv/netlink.c
index 56e63ce..c25bbb8 100644
--- a/net/batman-adv/netlink.c
+++ b/net/batman-adv/netlink.c
 <at>  <at>  -350,7 +350,7  <at>  <at>  batadv_netlink_tp_meter_cancel(struct sk_buff *skb, struct genl_info *info)
 	struct batadv_priv *bat_priv;
 	int ifindex;
 	u8 *dst;
-	int ret;
+	int ret = 0;

 	if (!info->attrs[BATADV_ATTR_MESH_IFINDEX])
 		return -EINVAL;
 <at>  <at>  -377,7 +377,7  <at>  <at>  out:
 	if (soft_iface)
 		dev_put(soft_iface);

(Continue reading)


Gmane