b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH v5 00/19] batman-adv: netlink restructuring, part 2
@ 2019-02-09 13:40 Sven Eckelmann
  2019-02-09 13:40 ` [B.A.T.M.A.N.] [PATCH v5 01/19] batman-adv: Move common genl doit code pre/post hooks Sven Eckelmann
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: Sven Eckelmann @ 2019-02-09 13:40 UTC (permalink / raw)
  To: b.a.t.m.a.n

Hi,

Jiri Pirko called the batman-adv configuration interface a while back "a
huge mistake" [1] and suggested genl as alternative. The first
reimplementation [2] (based on the team/devlink design) was rejected. This
second implementation is now using a nl80211-like design. The objects which
can now be modified/queried are:

* mesh/soft-interface (BATADV_CMD_GET_MESH/BATADV_CMD_SET_MESH)
* slave/hard-interface (BATADV_CMD_GET_HARDIF/BATADV_CMD_SET_HARDIF)
* vlan (BATADV_CMD_GET_VLAN/BATADV_CMD_SET_VLAN)

Such a set messages automatically triggers a *_SET_* "reply" via the config
multicast group. The same behavior was also added to the sysfs interface.

Thanks to Linus and Simon for their feedback. The discussed changes were now
integrated.


v5:
===

* renamed main functions to add attributes

  - batadv_netlink_mesh_put_ap_isolation ->
    batadv_netlink_mesh_fill_ap_isolation
  - batadv_netlink_mesh_put -> batadv_netlink_mesh_fill
  - batadv_netlink_hardif_put -> batadv_netlink_hardif_fill
  - batadv_netlink_vlan_put -> batadv_netlink_vlan_fill

* dropped attribute BATADV_ATTR_MULTICAST_MODE_ENABLED and replaced it with
  (basically inversed) BATADV_ATTR_MULTICAST_FORCEFLOOD_ENABLED

v4:
===

Incorporate various feedback from

* Linus Luessing:

  - Fix typos/spelling/grammar problems:

    + "already allow" -> "already allows"
    + "mesh mesh" -> "mesh"
    + "safed" -> "saved"

  - Let batadv_get_softif_from_info actually return net_device instead of
    net_device private data (batadv_priv)
  - store genl_info_net(info) in temporary variable to avoid line breaks
    in function parameters
  - document that batadv_get_*_from_info functions increase the reference
    counter of the returned object
  - directly drop reference counter to hard_dev net_device in
    batadv_get_hardif_from_info instead of doing that in batadv_post_doit
  - fix NULL pointer deref of primary_if when batadv device doesn't have
    any slave device
  - rewrite user_ptr[1] flags precheck in batadv_pre_doit to count the
    number of set bits (to only allow one of the flags which use
    user_ptr[1])

* Jiri Pirko:

  - Add _ENABLED Postfix for boolean attributes:
  
    + BATADV_ATTR_AGGREGATED_OGMS_ENABLED
    + BATADV_ATTR_AP_ISOLATION_ENABLED
    + BATADV_ATTR_BONDING_ENABLED
    + BATADV_ATTR_BRIDGE_LOOP_AVOIDANCE_ENABLED
    + BATADV_ATTR_DISTRIBUTED_ARP_TABLE_ENABLED
    + BATADV_ATTR_FRAGMENTATION_ENABLED
    + BATADV_ATTR_MULTICAST_MODE_ENABLED
    + BATADV_ATTR_NETWORK_CODING_ENABLED

v3:
===

* correctly assign kernel-doc for BATADV_GW_MODE_CLIENT
* fix validation check for gw.sel_class
* fix setting of BATADV_ATTR_ORIG_INTERVAL
* Cc the (most likely) responsible developers for each setting to more
  directly ask them for feedback

v2:
===

* rewrite everything in a more nl80211-like message/attribute format.

Kind regards,
        Sven

[1] https://www.open-mesh.org/issues/300
[2] https://patchwork.open-mesh.org/cover/17610/

Sven Eckelmann (19):
  batman-adv: Move common genl doit code pre/post hooks
  batman-adv: Prepare framework for mesh genl config
  batman-adv: Prepare framework for hardif genl config
  batman-adv: Prepare framework for vlan genl config
  batman-adv: Add aggregated_ogms mesh genl configuration
  batman-adv: Add ap_isolation mesh/vlan genl configuration
  batman-adv: Add bonding mesh genl configuration
  batman-adv: Add bridge_loop_avoidance mesh genl configuration
  batman-adv: Add distributed_arp_table mesh genl configuration
  batman-adv: Add fragmentation mesh genl configuration
  batman-adv: Add gateway mesh genl configuration
  batman-adv: Add hop_penalty mesh genl configuration
  batman-adv: Add log_level mesh genl configuration
  batman-adv: Add multicast forceflood mesh genl configuration
  batman-adv: Add network_coding mesh genl configuration
  batman-adv: Add orig_interval mesh genl configuration
  batman-adv: Add elp_interval hardif genl configuration
  batman-adv: Add throughput_override hardif genl configuration
  batman-adv: Trigger genl notification on sysfs config change

 include/uapi/linux/batman_adv.h |  190 +++++-
 net/batman-adv/gateway_client.c |    1 -
 net/batman-adv/gateway_common.c |    1 +
 net/batman-adv/gateway_common.h |    6 -
 net/batman-adv/netlink.c        | 1080 +++++++++++++++++++++++++++----
 net/batman-adv/netlink.h        |    6 +
 net/batman-adv/soft-interface.c |    2 +-
 net/batman-adv/sysfs.c          |   64 +-
 8 files changed, 1203 insertions(+), 147 deletions(-)

-- 
2.20.1


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

end of thread, other threads:[~2019-02-09 13:41 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-09 13:40 [B.A.T.M.A.N.] [PATCH v5 00/19] batman-adv: netlink restructuring, part 2 Sven Eckelmann
2019-02-09 13:40 ` [B.A.T.M.A.N.] [PATCH v5 01/19] batman-adv: Move common genl doit code pre/post hooks Sven Eckelmann
2019-02-09 13:40 ` [B.A.T.M.A.N.] [PATCH v5 02/19] batman-adv: Prepare framework for mesh genl config Sven Eckelmann
2019-02-09 13:40 ` [B.A.T.M.A.N.] [PATCH v5 03/19] batman-adv: Prepare framework for hardif " Sven Eckelmann
2019-02-09 13:40 ` [B.A.T.M.A.N.] [PATCH v5 04/19] batman-adv: Prepare framework for vlan " Sven Eckelmann
2019-02-09 13:40 ` [B.A.T.M.A.N.] [PATCH v5 05/19] batman-adv: Add aggregated_ogms mesh genl configuration Sven Eckelmann
2019-02-09 13:40 ` [B.A.T.M.A.N.] [PATCH v5 06/19] batman-adv: Add ap_isolation mesh/vlan " Sven Eckelmann
2019-02-09 13:40 ` [B.A.T.M.A.N.] [PATCH v5 07/19] batman-adv: Add bonding mesh " Sven Eckelmann
2019-02-09 13:40 ` [B.A.T.M.A.N.] [PATCH v5 08/19] batman-adv: Add bridge_loop_avoidance " Sven Eckelmann
2019-02-09 13:40 ` [B.A.T.M.A.N.] [PATCH v5 09/19] batman-adv: Add distributed_arp_table " Sven Eckelmann
2019-02-09 13:41 ` [B.A.T.M.A.N.] [PATCH v5 10/19] batman-adv: Add fragmentation " Sven Eckelmann
2019-02-09 13:41 ` [B.A.T.M.A.N.] [PATCH v5 11/19] batman-adv: Add gateway " Sven Eckelmann
2019-02-09 13:41 ` [B.A.T.M.A.N.] [PATCH v5 12/19] batman-adv: Add hop_penalty " Sven Eckelmann
2019-02-09 13:41 ` [B.A.T.M.A.N.] [PATCH v5 13/19] batman-adv: Add log_level " Sven Eckelmann
2019-02-09 13:41 ` [B.A.T.M.A.N.] [PATCH v5 14/19] batman-adv: Add multicast forceflood " Sven Eckelmann
2019-02-09 13:41 ` [B.A.T.M.A.N.] [PATCH v5 15/19] batman-adv: Add network_coding " Sven Eckelmann
2019-02-09 13:41 ` [B.A.T.M.A.N.] [PATCH v5 16/19] batman-adv: Add orig_interval " Sven Eckelmann
2019-02-09 13:41 ` [B.A.T.M.A.N.] [PATCH v5 17/19] batman-adv: Add elp_interval hardif " Sven Eckelmann
2019-02-09 13:41 ` [B.A.T.M.A.N.] [PATCH v5 18/19] batman-adv: Add throughput_override " Sven Eckelmann
2019-02-09 13:41 ` [B.A.T.M.A.N.] [PATCH v5 19/19] batman-adv: Trigger genl notification on sysfs config change Sven Eckelmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).