David Miller | 4 May 22:30 2016
Picon

Re: pull request: batman-adv 20160504

From: Antonio Quartulli <a <at> unstable.cc>
Date: Wed,  4 May 2016 06:23:35 +0800

> this is a pull request intended for net-next.
> 
> In this batch you don't have any patch that depends on our fixes,
> therefore you can safely merge it even if the net tree has not been
> merged yet.
> 
> In this patchset you basically have some cleanup work, code refactoring,
> style fixes and two updates for the MAINTAINERS file.
> 
> Please pull or let me know of any problem!

Pulled, thanks Antonio.

Sven Eckelmann | 4 May 21:02 2016

[RFC v4] throughput meter on steroids^W netlink

Hi,

I was asked by the batman-adv maintainers to port the tp_meter to netlink. And
I shouldn't do it with the patches from Andrew/Matthias applied but with only
a small part of patch 4. 

I know, this isn't the nicest move but it allowed me to restructure the first
commit a little bit. I've extracted the part which introduced the netlink
family + a restructured batman_adv.h. I've also added the part which
introduces the generic mesh information as extra patch (+kerneldoc). This
added some attributes which I need in tp_meter. But I can also remove the
patch and only merge the necessary parts.

 <at> Andrew, I hope you don't take it the wrong way. I really like your work and
even borrowed parts of the code for the tp_meter interface. So you are now
allowed to criticize the hell out of the changes and request some free beer
from Antonio, Marek and Simon :). But I hope that you like the adjustments to
the initial parts (at least a little bit). You would have to rebase your
changes (which I still want to get integrated) on top when these things here
are merged. I would also be willing to do the rebase myself and send you the
result (so you can add the kerneldoc and maybe make further adjustments).

The only "big" conflicts I see are related to the order of attributes. But
this was a long day for me and I may have forgotten something.

 <at> the_rest: Do you find the bugs introduced by moving it to netlink?

The one which I know about is the inability to receive signals while the
kernel is doing the wait_event (So the BATADV_CMD_TP_METER_CANCEL doesn't work 
at all). I am waiting for recommendations. The one which
(Continue reading)

Andrew Lunn | 4 May 16:30 2016
Picon

[PATCHv4] batctl: Use netlink to replace some of debugfs

The kernel has gained support for exporting some information via
netlink.  Use this when available, rather than debugfs.

If netlink is not available, or the information is not yet available
via netlink, batctl will fall back to debugfs.

Signed-off-by: Andrew Lunn <andrew@...>
---
v2: Verify mandatory attributes are returned by the kernel, and that
    they have the expected size.

v3: Use libnl to perform more verification
    Add originator header
    checkpatch cleanup

v4: Add the missing netlink.h to the patch
---
 Makefile     |   13 +-
 batman_adv.h |  111 +++++++
 debug.c      |   20 +-
 debug.h      |    4 +-
 functions.c  |   11 +
 functions.h  |    2 +
 main.h       |    1 +
 netlink.c    | 1024 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 netlink.h    |   40 +++
 9 files changed, 1222 insertions(+), 4 deletions(-)
 create mode 100644 batman_adv.h
 create mode 100644 netlink.c
 create mode 100644 netlink.h
(Continue reading)

Andrew Lunn | 3 May 22:30 2016
Picon

Re: [PATCHv2] batctl: Use netlink to replace some of debugfs

> > Once the code is mostly complete and stable, i think a local copy
> > would be good. It does seems to be the common way.
> 
> A local copy sounds like a sensible choice and common practice.

Hi Marek

v3 has a local copy.

   Andrew

Andrew Lunn | 3 May 18:30 2016
Picon

[PATCHv3] batctl: Use netlink to replace some of debugfs

The kernel has gained support for exporting some information via
netlink.  Use this when available, rather than debugfs.

If netlink is not available, or the information is not yet available
via netlink, batctl will fall back to debugfs.

Signed-off-by: Andrew Lunn <andrew@...>
---
v2: Verify mandatory attributes are returned by the kernel, and that
    they have the expected size.

v3: Use libnl to perform more verification
    Add originator header
    checkpatch cleanup
---
 Makefile     |   13 +-
 batman_adv.h |  111 +++++++
 debug.c      |   19 +-
 debug.h      |    4 +-
 functions.c  |   11 +
 functions.h  |    2 +
 main.h       |    1 +
 netlink.c    | 1024 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 8 files changed, 1181 insertions(+), 4 deletions(-)
 create mode 100644 batman_adv.h
 create mode 100644 netlink.c

diff --git a/Makefile b/Makefile
index b82c0c6..60795f7 100755
--- a/Makefile
(Continue reading)

Sven Eckelmann | 3 May 10:59 2016

[PATCH v3 1/3] batman-adv: return netdev status in the TX path

From: Antonio Quartulli <antonio.quartulli@...>

Return the proper netdev TX status along the TX path so that the tp_meter
can understand when the queue is full and should stop sending packets.

Signed-off-by: Antonio Quartulli <antonio.quartulli@...>
Signed-off-by: Sven Eckelmann <sven.eckelmann@...>
---
v3:
 - Rebase on current master version
 - inform batctl about problems finding the remote originator
v2:
 - Rebase on current master version
---
 net/batman-adv/fragmentation.c | 41 +++++++++++++++++++++++++----------------
 net/batman-adv/fragmentation.h |  6 +++---
 net/batman-adv/main.c          |  4 +++-
 net/batman-adv/routing.c       | 24 ++++++++++++++----------
 net/batman-adv/send.c          | 25 +++++++++++++------------
 5 files changed, 58 insertions(+), 42 deletions(-)

diff --git a/net/batman-adv/fragmentation.c b/net/batman-adv/fragmentation.c
index 65536db..4cb7da2 100644
--- a/net/batman-adv/fragmentation.c
+++ b/net/batman-adv/fragmentation.c
 <at>  <at>  -434,11 +434,12  <at>  <at>  err:
  *  <at> orig_node: final destination of the created fragments
  *  <at> neigh_node: next-hop of the created fragments
  *
- * Return: true on success, false otherwise.
(Continue reading)

Sven Eckelmann | 3 May 10:59 2016

[v3] Add throughput meter support

Hi,

here is the third version of the throughput meter support. It is just a
rebased version of the patchset with two little bugfixes. Both problems were
detected and reported by Antonio:

 * batctl didn't check if the test_time is > 0 before doing a division
 * batman-adv wasn't returning an error to batctl when dst was not reachable

I am currently unsure how we should proceed regarding the ICMP packet type
used to communicate to the userspace ([PATCH 2/3]). Andrew+Matthias already
prepared a netlink patchset which looks quite good and which should be
tested+applied. The consequence for this patchset would be that patch 2 should
be completely dropped and instead the tp_meter should become its own command
in the netlink interface of batman-adv. Any opinions about that (order in
which patches should be applied/netlink interface should be handled) by the
Simon, Antonio, Marek, Matthias or Andrew?

Antonio Quartulli (4):
      batman-adv: return netdev status in the TX path
      batman-adv: use another ICMP packet when sending command from userspace
      batman-adv: throughput meter implementation
      batctl: introduce throughput meter support

 net/batman-adv/Makefile         |    1 +
 net/batman-adv/fragmentation.c  |   41 +-
 net/batman-adv/fragmentation.h  |    6 +-
 net/batman-adv/icmp_socket.c    |  225 +++---
 net/batman-adv/icmp_socket.h    |    5 +-
 net/batman-adv/main.c           |    6 +-
(Continue reading)

Sven Eckelmann | 3 May 10:18 2016

Re: [PATCH v2 3/3] batman-adv: throughput meter implementation

On Tuesday 03 May 2016 01:28:28 Antonio Quartulli wrote:
[...]
> shouldn't we propagate the value saved in err to tp_vars->reason ?
> 
> We found this error while using the tp_meter, because we tried to run it
> against a non-existing originator and batctl crashed.

Yes, looks like I've missed this while reviewing your tp_meter code. Was
the crash something like:

    root <at> node02:~# /host/batctl/batctl  tp 02:ba:de:af:ff:01
    Throughput meter called towards 02:ba:de:af:ff:01
    tp_meter.c:198:36: runtime error: division by zero
    traps: batctl[246] trap divide error ip:410f31 sp:7ffea78512c0 error:0 in batctl[400000+18000]
    Floating point exception

I will most likely add code catching it in both batctl and batman-adv.

Kind regards,
	Sven
David Miller | 3 May 06:18 2016
Picon

Re: pull request [net]: batman-adv 20160430

From: Antonio Quartulli <a <at> unstable.cc>
Date: Sun,  1 May 2016 01:05:59 +0800

> this is another pull request intended for net.
> 
> I know that I sent another batch a few days ago, but after having gone
> through my queue I thought that merging these last 4 patches would still
> be worth it (there won't be any other pull request for linux-4.6 :)).
> 
> The description of the changes follows below.

Pulled, thanks Antonio.

Andrew Lunn | 2 May 22:56 2016
Picon

[PATCHv2] batctl: Use netlink to replace some of debugfs

The kernel has gained support for exporting some information via
netlink.  Use this when available, rather than debugfs.

If netlink is not available, or the information is not yet available
via netlink, batctl will fall back to debugfs.

Signed-off-by: Andrew Lunn <andrew@...>
---

v2: Verify mandatory attributes are returned by the kernel, and that
    they have the expected size.
---
 Makefile    |   20 +-
 debug.c     |   19 +-
 debug.h     |    4 +-
 functions.c |   11 +
 functions.h |    1 +
 main.h      |    1 +
 netlink.c   | 1038 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 7 files changed, 1090 insertions(+), 4 deletions(-)
 create mode 100644 netlink.c

diff --git a/Makefile b/Makefile
index b82c0c6..debca29 100755
--- a/Makefile
+++ b/Makefile
 <at>  <at>  -24,7 +24,7  <at>  <at>  export CONFIG_BATCTL_BISECT=n

 # batctl build
 BINARY_NAME = batctl
(Continue reading)

Andrew Lunn | 2 May 17:52 2016
Picon

[PATCH v3 00/12] 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 awaire.

Note: BLA is untested, so best assume it is broken...

v3:

* Fix the compat with older kernels. It now at least compiles with
  3.18.32. I've not booted it though.
* Add missing kerneldoc

v2:

All changes requested by Sven:

* Added lots of missing includes and structure forward declarations
* Add two kernel doc comments
* Fixed an obvious bug in BLA, but it is probably still broken...
* Merged in the compat code Sven suggested. Only compile tested with 4.5.0

*** BLURB HERE ***

Andrew Lunn (7):
  batman-adv: Handle parent interfaces in a different netns
  batman-adv: compat.h: Add workaround for get_link_net()
  batman-adv: Suppress debugfs entries for netns's
(Continue reading)


Gmane