From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7753C282C0 for ; Sun, 27 Jan 2019 08:54:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5F7FE20989 for ; Sun, 27 Jan 2019 08:54:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=resnulli-us.20150623.gappssmtp.com header.i=@resnulli-us.20150623.gappssmtp.com header.b="m+E61Bb1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726516AbfA0IyO (ORCPT ); Sun, 27 Jan 2019 03:54:14 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:39430 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726327AbfA0IyN (ORCPT ); Sun, 27 Jan 2019 03:54:13 -0500 Received: by mail-wr1-f65.google.com with SMTP id t27so14568006wra.6 for ; Sun, 27 Jan 2019 00:54:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=tnmqk5e2GF1HVOEIcqhy9wBvLZhZ21lLdso3qkq3X4o=; b=m+E61Bb1rz+URvxLqxpFVdAkprJkVx2bULeZmEyWc+Dn+P7O9MmDpd0Dud4gdOrvHJ P+gTb9cHq9Q5BMplsxFDkAOT0js2bkBuNKVTuWnNlWXZBL5E514yHmr8s8U6OsdTcVCe Vt1herso65FGjLg8zIWharJeSMlpXmBGfgjJXwFX0ab3JJEQLTPPAU2S0xvQq2twbDYd D5Gi0DzGzIkZsI9ya1QWcyOj73VC2bO8eX4fsivdbhtOFrRefoYDMkkcokIoNxXVckah uc7Z+tIKekrPJ5DOXQ+YIPFOEAnFVgQL1aLFPgro4uCfdsXpYZCTWBCytmx4blx7AvYV 7jug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=tnmqk5e2GF1HVOEIcqhy9wBvLZhZ21lLdso3qkq3X4o=; b=tQL1fECeJ4UzSnXmBRDoxUOh/5mDbX/ehbHUdub6ldb1nGsbi1P8kl9Ot9ayXJxz07 Lb4zH9PvVSrKVLWRHRCvN5GVhDvCFJbj5xwGT/NpjS39pmsImSAO28+Nwy2c/zvlpWJj NZxuPlsECruXvtS6P25Ea/lKM7dV5Ef41sIeJOBL8tdybRGPOMPwWj5XCsCRjC+iFpTz xAJIv6tPTxyQa9sBp022c8ZOIg84+K9pX57vz0wsZmbD+mgfXYCL9oK8wBO34PwlK2Nf iEJFjHOyRHMe7I6DBxjoBOZlIiH3HHzPk7IPiyHtcRMRTnTRb5aapxl9PaQleU/ncNj5 eMgQ== X-Gm-Message-State: AJcUukde6Fq/rdrSB1ntlfmKG1yJDuedcUNkLfqlHtF+AGTjYdkU5vRV ixc5YIQcGssjQEtc2ynZ05iLrQ== X-Google-Smtp-Source: ALg8bN7n76joTvk6rINFZ4k+850JnsMoPwwhOhHo2QDrQEnS6VUWFHEKGSnb3nN+bAPZ0tukvELPQQ== X-Received: by 2002:adf:f9cb:: with SMTP id w11mr17198942wrr.201.1548579251120; Sun, 27 Jan 2019 00:54:11 -0800 (PST) Received: from localhost (jirka.pirko.cz. [84.16.102.26]) by smtp.gmail.com with ESMTPSA id k128sm96103375wmd.37.2019.01.27.00.54.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 27 Jan 2019 00:54:10 -0800 (PST) Date: Sun, 27 Jan 2019 09:45:16 +0100 From: Jiri Pirko To: Sven Eckelmann Cc: b.a.t.m.a.n@lists.open-mesh.org, Jiri Pirko , netdev@vger.kernel.org, linus.luessing@c0d3.blue Subject: Re: [RFC v4 00/19] batman-adv: netlink restructuring, part 2 Message-ID: <20190127084516.GA2151@nanopsycho> References: <20190119155626.6414-1-sven@narfation.org> <1895931.G10psR3j26@sven-edge> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1895931.G10psR3j26@sven-edge> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Sat, Jan 26, 2019 at 11:47:20AM CET, sven@narfation.org wrote: >On Saturday, 19 January 2019 16.56.07 CET Sven Eckelmann wrote: >[...] >> There were also two topics which were not yet really discussed and thus >> these requests (from Linus) were not yet implemented: > >@Jiri, @Linus maybe you can discuss these topics further and select the >correct solution. > >> * convert BATADV_ATTR_MULTICAST_MODE_ENABLED to an u32 and let don't handle >> it like a boolean. Instead use it to select how multicast traffic has to >> be handled: >> >> - 0: ignore multicast optimization and just flood it like broadcast >> traffic >> - 1: enabled multicast optimization >> - 2: undefined but also some kind of multicast optimization >> - 3: undefined but also some kind of multicast of optimization >> - ... > >Multicast mode is currently defined. > >* according to batctl manpage: > > multicast_mode|mm [0|1] > If no parameter is given the current multicast mode set‐ > ting is displayed. Otherwise the parameter is used to en‐ > able or disable multicast optimizations (i.e. disabling > means always sending own multicast frames via classic > flooding). > >* according to sysfs ABI: > > What: /sys/class/net//mesh/multicast_mode > Date: Feb 2014 > Contact: Linus Lüssing > Description: > Indicates whether multicast optimizations are enabled > or disabled. If set to zero then all nodes in the > mesh are going to use classic flooding for any > multicast packet with no optimizations. > >Both define it as boolean value and therefore it was converted to a boolean >value (via u8) in netlink. > >But Linus now suggested that it is actually an u32. Most likely 0 == to >something like BATADV_MULTICAST_MODE_FLOODING. But I have no idea what 1 is or >what 2, 3, 4, .. would be. So I need some input here. > >And Jiri said that it should be renamed to BATADV_ATTR_MULTICAST_ENABLED - >which seems to suggest that he doesn't like the idea of a u32 for some reason >and prefers to use a boolean value. > >And now Linus even said that it should be a bit field - which makes it even >more vague to me and I have now absolutely no idea what should be implemented. If it is bool, it should be bool. If it is a bitfield (future more bits than one needed), it should be a bitfield. > >* BIT 0 for flooding vs ? >* BIT 1 for ? >* ... > >> * convert BATADV_ATTR_AGGREGATION_OGM_ENABLED to u32 and use it >> to mark which type of traffic should be aggregated: >> >> - bit 0: enable aggregation of OGM(2)s >> - bit 1: yet undefined packet type which allows some kind of aggregation >> - bit 2: yet undefined packet type which allows some kind of aggregation >> - ... > >Aggregated OGM is currently defined as: > > >* according to batctl manpage: > > aggregation|ag [0|1] > If no parameter is given the current aggregation setting > is displayed. Otherwise the parameter is used to enable or > disable OGM packet aggregation. > >* according to sysfs ABI: > > What: /sys/class/net//mesh/aggregated_ogms > Date: May 2010 > Contact: Marek Lindner > Description: > Indicates whether the batman protocol messages of the > mesh shall be aggregated or not. > >So sysfs is only one possible backend for the batctl command. There is >currently nothing which I would assume to be aggregatable beside OGMs but let >us assume for now that there is now something and some way to aggregate things >beside OGMs in a save and backward compatible way. Let's call this FOO - so we >have BATADV_ATTR_AGGREGATION_OGM_ENABLED and >BATADV_ATTR_AGGREGATION_FOO_ENABLED. Or we have BATADV_ATTR_AGGREGATION as an >u32 and just use the second bit as marker for FOO (and of course the first bit >as marker for OGM). > >Would it now be more preferable to use BATADV_ATTR_AGGREGATION_OGM_ENABLED as >u8 (boolean) or to to switch to BATADV_ATTR_AGGREGATION (u32) & assign single >bits to packet types. > >Kind regards, > Sven From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sun, 27 Jan 2019 09:45:16 +0100 From: Jiri Pirko Message-ID: <20190127084516.GA2151@nanopsycho> References: <20190119155626.6414-1-sven@narfation.org> <1895931.G10psR3j26@sven-edge> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1895931.G10psR3j26@sven-edge> Subject: Re: [B.A.T.M.A.N.] [RFC v4 00/19] batman-adv: netlink restructuring, part 2 List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sven Eckelmann Cc: b.a.t.m.a.n@lists.open-mesh.org, Jiri Pirko , netdev@vger.kernel.org, linus.luessing@c0d3.blue Sat, Jan 26, 2019 at 11:47:20AM CET, sven@narfation.org wrote: >On Saturday, 19 January 2019 16.56.07 CET Sven Eckelmann wrote: >[...] >> There were also two topics which were not yet really discussed and thus >> these requests (from Linus) were not yet implemented: > >@Jiri, @Linus maybe you can discuss these topics further and select the >correct solution. > >> * convert BATADV_ATTR_MULTICAST_MODE_ENABLED to an u32 and let don't handle >> it like a boolean. Instead use it to select how multicast traffic has to >> be handled: >> >> - 0: ignore multicast optimization and just flood it like broadcast >> traffic >> - 1: enabled multicast optimization >> - 2: undefined but also some kind of multicast optimization >> - 3: undefined but also some kind of multicast of optimization >> - ... > >Multicast mode is currently defined. > >* according to batctl manpage: > > multicast_mode|mm [0|1] > If no parameter is given the current multicast mode set‐ > ting is displayed. Otherwise the parameter is used to en‐ > able or disable multicast optimizations (i.e. disabling > means always sending own multicast frames via classic > flooding). > >* according to sysfs ABI: > > What: /sys/class/net//mesh/multicast_mode > Date: Feb 2014 > Contact: Linus Lüssing > Description: > Indicates whether multicast optimizations are enabled > or disabled. If set to zero then all nodes in the > mesh are going to use classic flooding for any > multicast packet with no optimizations. > >Both define it as boolean value and therefore it was converted to a boolean >value (via u8) in netlink. > >But Linus now suggested that it is actually an u32. Most likely 0 == to >something like BATADV_MULTICAST_MODE_FLOODING. But I have no idea what 1 is or >what 2, 3, 4, .. would be. So I need some input here. > >And Jiri said that it should be renamed to BATADV_ATTR_MULTICAST_ENABLED - >which seems to suggest that he doesn't like the idea of a u32 for some reason >and prefers to use a boolean value. > >And now Linus even said that it should be a bit field - which makes it even >more vague to me and I have now absolutely no idea what should be implemented. If it is bool, it should be bool. If it is a bitfield (future more bits than one needed), it should be a bitfield. > >* BIT 0 for flooding vs ? >* BIT 1 for ? >* ... > >> * convert BATADV_ATTR_AGGREGATION_OGM_ENABLED to u32 and use it >> to mark which type of traffic should be aggregated: >> >> - bit 0: enable aggregation of OGM(2)s >> - bit 1: yet undefined packet type which allows some kind of aggregation >> - bit 2: yet undefined packet type which allows some kind of aggregation >> - ... > >Aggregated OGM is currently defined as: > > >* according to batctl manpage: > > aggregation|ag [0|1] > If no parameter is given the current aggregation setting > is displayed. Otherwise the parameter is used to enable or > disable OGM packet aggregation. > >* according to sysfs ABI: > > What: /sys/class/net//mesh/aggregated_ogms > Date: May 2010 > Contact: Marek Lindner > Description: > Indicates whether the batman protocol messages of the > mesh shall be aggregated or not. > >So sysfs is only one possible backend for the batctl command. There is >currently nothing which I would assume to be aggregatable beside OGMs but let >us assume for now that there is now something and some way to aggregate things >beside OGMs in a save and backward compatible way. Let's call this FOO - so we >have BATADV_ATTR_AGGREGATION_OGM_ENABLED and >BATADV_ATTR_AGGREGATION_FOO_ENABLED. Or we have BATADV_ATTR_AGGREGATION as an >u32 and just use the second bit as marker for FOO (and of course the first bit >as marker for OGM). > >Would it now be more preferable to use BATADV_ATTR_AGGREGATION_OGM_ENABLED as >u8 (boolean) or to to switch to BATADV_ATTR_AGGREGATION (u32) & assign single >bits to packet types. > >Kind regards, > Sven