public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH v3 00/42] batctl: pre-netlink restructuring, part 1
@ 2018-10-25 16:22 Sven Eckelmann
  2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 01/42] batctl: Drop unused define SOCKET_PATH_FMT Sven Eckelmann
                   ` (42 more replies)
  0 siblings, 43 replies; 44+ messages in thread
From: Sven Eckelmann @ 2018-10-25 16:22 UTC (permalink / raw)
  To: b.a.t.m.a.n

Hi,

the batctl command already has support to get (previously debugfs) tables
via netlink. It does this while still being able to fall back to the old
debugfs tables on kernels which don't support the new generic netlink
family.

Something similar should be done in the future for the settings which
are currently part of sysfs. But we can already see that the current
integration of netlink in batctl only done in a single file - netlink.c
But this file is already starting to be so big that working with it
is rather cumbersome.

So as first steps:

* restructure command registration
* move commands in separate files (which should store their actual implementation)
* add a new helper command to receive multicast group messages from the kernel

More things will follow in the future.

Changes:

v3:

* correctly split ap_isolation and bonding patch
* fix copyright headers for new files
* move more routing_algo specific code to its command specific file
* fix build problems with musl in OpenWrt 18.06
* switch Makefile's OBJ + OBJ_BISECT to obj-y and obj-n
* add way to "freely" disable some commands for size optimization reasons

  - it is for example now possible to reduce the size of the batctl on
    mips_24kc_musl from 64604 bytes to 14252 bytes when only the interface
    commands are required (I know, stupid example)
  - the binary to generate the debug tables output for the same architectur
    used 26988 bytes
    
v2:

* Add missing orig_interval.c


Kind regards,
	Sven

Sven Eckelmann (42):
  batctl: Drop unused define SOCKET_PATH_FMT
  batctl: Use common code organization for statistics
  batctl: Drop legacy vis_* related warning messages
  batctl: Move loglevel command to separate file
  batctl: Move log command to separate file
  batctl: Move gw_mode command to separate file
  batctl: Move routing_algo command to separate file
  batctl: Rename tp_meter to throughputmeter
  batctl: Introduce datastructure for subcommands
  batctl: Add per command flags
  batctl: Use command structure for remaining subcommands
  batctl: Use getopt to parse main options
  batctl: Store usage line next to command
  batctl: Prepare command infrastructure for shared functions
  batctl: Add type to command to structure usage output
  batctl: Convert debug table to command infrastructure
  batctl: Convert sysfs settings to command infrastructure
  batctl: Move backbonetable debug table to own file
  batctl: Move claimtable debug table to own file
  batctl: Move dat_cache debug table to own file
  batctl: Move gateways debug table to own file
  batctl: Move mcast_flags debug table to own file
  batctl: Move nc_nodes debug table to own file
  batctl: Move neighbors debug table to own file
  batctl: Move originators debug table to own file
  batctl: Move transglobal debug table to own file
  batctl: Move translocal debug table to own file
  batctl: Move aggregation setting to own file
  batctl: Move ap_isolation setting to own file
  batctl: Move bonding setting to own file
  batctl: Move bridge_loop_avoidance setting to own file
  batctl: Move distributed_arp_table setting to own file
  batctl: Move fragmentation setting to own file
  batctl: Move isolation_mark setting to own file
  batctl: Move multicast_mode setting to own file
  batctl: Move network_coding setting to own file
  batctl: Move orig_interval setting to own file
  batctl: Use external netlink socket for debug tables
  batctl: Move routing_algo specific code it command source file
  batctl: Add command to monitor for netlink events
  batctl: Simplify enabling for bisect_iv subcommand
  batctl: Allow to enable/disable subcommands

 Makefile                        |   91 ++-
 translate.h => aggregation.c    |   15 +-
 ap_isolation.c                  |   33 +
 backbonetable.c                 |  126 ++++
 bisect_iv.c                     |    6 +-
 bisect_iv.h                     |    4 -
 traceroute.h => bonding.c       |   15 +-
 bridge_loop_avoidance.c         |   33 +
 claimtable.c                    |  131 ++++
 dat_cache.c                     |  147 +++++
 debug.c                         |  218 +------
 debug.h                         |   38 +-
 distributed_arp_table.c         |   33 +
 event.c                         |  246 ++++++++
 ping.h => fragmentation.c       |   15 +-
 functions.c                     |   28 +-
 functions.h                     |    1 -
 gateways.c                      |  175 +++++
 gw_mode.c                       |  171 +++++
 interface.c                     |   23 +-
 ioctl.h                         |   28 -
 isolation_mark.c                |   35 +
 log.c                           |   73 +++
 loglevel.c                      |  147 +++++
 main.c                          |  274 ++++----
 main.h                          |   65 +-
 man/batctl.8                    |    4 +
 mcast_flags.c                   |  180 ++++++
 multicast_mode.c                |   33 +
 interface.h => nc_nodes.c       |   14 +-
 neighbors.c                     |  142 +++++
 netlink.c                       | 1332 ++++-----------------------------------
 netlink.h                       |   55 +-
 network_coding.c                |   33 +
 orig_interval.c                 |   35 +
 originators.c                   |  228 +++++++
 ping.c                          |   10 +-
 routing_algo.c                  |  263 ++++++++
 ioctl.c => statistics.c         |   10 +-
 sys.c                           |  432 +------------
 sys.h                           |   39 +-
 tcpdump.c                       |    5 +-
 tcpdump.h                       |    2 -
 tp_meter.c => throughputmeter.c |   10 +-
 tp_meter.h                      |   28 -
 traceroute.c                    |   10 +-
 transglobal.c                   |  162 +++++
 translate.c                     |    8 +-
 translocal.c                    |  158 +++++
 49 files changed, 3156 insertions(+), 2208 deletions(-)
 rename translate.h => aggregation.c (67%)
 create mode 100644 ap_isolation.c
 create mode 100644 backbonetable.c
 rename traceroute.h => bonding.c (68%)
 create mode 100644 bridge_loop_avoidance.c
 create mode 100644 claimtable.c
 create mode 100644 dat_cache.c
 create mode 100644 distributed_arp_table.c
 create mode 100644 event.c
 rename ping.h => fragmentation.c (67%)
 create mode 100644 gateways.c
 create mode 100644 gw_mode.c
 delete mode 100644 ioctl.h
 create mode 100644 isolation_mark.c
 create mode 100644 log.c
 create mode 100644 loglevel.c
 create mode 100644 mcast_flags.c
 create mode 100644 multicast_mode.c
 rename interface.h => nc_nodes.c (73%)
 create mode 100644 neighbors.c
 create mode 100644 network_coding.c
 create mode 100644 orig_interval.c
 create mode 100644 originators.c
 create mode 100644 routing_algo.c
 rename ioctl.c => statistics.c (90%)
 rename tp_meter.c => throughputmeter.c (97%)
 delete mode 100644 tp_meter.h
 create mode 100644 transglobal.c
 create mode 100644 translocal.c

-- 
2.11.0


^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2018-11-03 12:51 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-25 16:22 [B.A.T.M.A.N.] [PATCH v3 00/42] batctl: pre-netlink restructuring, part 1 Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 01/42] batctl: Drop unused define SOCKET_PATH_FMT Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 02/42] batctl: Use common code organization for statistics Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 03/42] batctl: Drop legacy vis_* related warning messages Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 04/42] batctl: Move loglevel command to separate file Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 05/42] batctl: Move log " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 06/42] batctl: Move gw_mode " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 07/42] batctl: Move routing_algo " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 08/42] batctl: Rename tp_meter to throughputmeter Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 09/42] batctl: Introduce datastructure for subcommands Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 10/42] batctl: Add per command flags Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 11/42] batctl: Use command structure for remaining subcommands Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 12/42] batctl: Use getopt to parse main options Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 13/42] batctl: Store usage line next to command Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 14/42] batctl: Prepare command infrastructure for shared functions Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 15/42] batctl: Add type to command to structure usage output Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 16/42] batctl: Convert debug table to command infrastructure Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 17/42] batctl: Convert sysfs settings " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 18/42] batctl: Move backbonetable debug table to own file Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 19/42] batctl: Move claimtable " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 20/42] batctl: Move dat_cache " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 21/42] batctl: Move gateways " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 22/42] batctl: Move mcast_flags " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 23/42] batctl: Move nc_nodes " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 24/42] batctl: Move neighbors " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 25/42] batctl: Move originators " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 26/42] batctl: Move transglobal " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 27/42] batctl: Move translocal " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 28/42] batctl: Move aggregation setting " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 29/42] batctl: Move ap_isolation " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 30/42] batctl: Move bonding " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 31/42] batctl: Move bridge_loop_avoidance " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 32/42] batctl: Move distributed_arp_table " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 33/42] batctl: Move fragmentation " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 34/42] batctl: Move isolation_mark " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 35/42] batctl: Move multicast_mode " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 36/42] batctl: Move network_coding " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 37/42] batctl: Move orig_interval " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 38/42] batctl: Use external netlink socket for debug tables Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 39/42] batctl: Move routing_algo specific code it command source file Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 40/42] batctl: Add command to monitor for netlink events Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 41/42] batctl: Simplify enabling for bisect_iv subcommand Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 42/42] batctl: Allow to enable/disable subcommands Sven Eckelmann
2018-11-03 12:51 ` [B.A.T.M.A.N.] [PATCH v3 00/42] batctl: pre-netlink restructuring, part 1 Sven Eckelmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox