https://www.open-mesh.org/https://www.open-mesh.org/favicon.ico?16699090422016-12-04T10:14:38ZOpen Meshbatman-adv - Feature #300: Convert sysfs config attributes to genlhttps://www.open-mesh.org/issues/300?journal_id=10182016-12-04T10:14:38ZSven Eckelmann
<ul><li><strong>Estimated time</strong> set to <i>40.00 h</i></li></ul> batman-adv - Feature #300: Convert sysfs config attributes to genlhttps://www.open-mesh.org/issues/300?journal_id=11252017-02-11T16:56:33ZSven Eckelmann
<ul><li><strong>Assignee</strong> set to <i>batman-adv developers</i></li></ul> batman-adv - Feature #300: Convert sysfs config attributes to genlhttps://www.open-mesh.org/issues/300?journal_id=14802018-11-05T06:14:46ZSven Eckelmann
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li></ul><p>Some RFC patches for batctl and batman-adv are available:</p>
<ul>
<li><a class="external" href="https://patchwork.open-mesh.org/project/b.a.t.m.a.n./list/?series=175">https://patchwork.open-mesh.org/project/b.a.t.m.a.n./list/?series=175</a></li>
<li><a class="external" href="https://patchwork.open-mesh.org/project/b.a.t.m.a.n./list/?series=174">https://patchwork.open-mesh.org/project/b.a.t.m.a.n./list/?series=174</a></li>
</ul> batman-adv - Feature #300: Convert sysfs config attributes to genlhttps://www.open-mesh.org/issues/300?journal_id=14812018-11-05T14:21:28ZSven Eckelmann
<ul><li><strong>Estimated time</strong> changed from <i>40.00 h</i> to <i>80.00 h</i></li></ul><p>Jiri informed us that this approach is now frowned upon. Instead following implementation is preferred:</p>
<blockquote>
<p>On Montag, 5. November 2018 11:54:12 CET Jiri Pirko wrote:<br />[...]</p>
<blockquote><blockquote>
<p>But let assume for now that you don't want to use this approach, we can also <br />have for example something like:</p>
<p>BATADV_CMD_SET_BRIDGE_LOOP_AVOIDANCE which then receives either one or no flag <br />BATADV_ATTR_BRIDGE_LOOP_AVOIDANCE to enable/disable bridge loop avoidance. And <br />a command BATADV_CMD_GET_BRIDGE_LOOP_AVOIDANCE which tells the client using <br />BATADV_ATTR_BRIDGE_LOOP_AVOIDANCE whether it was enabled or not. A dump <br />functionality for all options for this batadv object/class would then not <br />exist.</p>
</blockquote>
<p>Got it. That is possible to do it this way. But if you would be able to<br />group the attrs somehow, that would be probably nice. 1:1 mapping<br />between cmds and attrs looks a bit weird.</p>
<p>Sidenote: I suggest not to use NLA_FLAG attribute type. Better to use<br />NLA_U8 of value 0/1. NLA_FLAG missing in message might mean 2 things:<br />1) user wants to set false<br />2) user is old and does not support this attribute</p>
</blockquote>
<p>Ok, let me suggest something more specific (just to make sure we talk about <br />the same thing). We could use the commands:<br /><pre>
> + /**
> + * @BATADV_CMD_GET_OPTION: Get option(s) from softif
> + */
> + BATADV_CMD_GET_OPTION,
> +
> + /**
> + * @BATADV_CMD_SET_OPTION: Set option for softif
> + */
> + BATADV_CMD_SET_OPTION,
> +
> + /**
> + * @BATADV_CMD_GET_OPTION_HARDIF: Get option(s) from a hardif of the
> + * current softif
> + */
> + BATADV_CMD_GET_OPTION_HARDIF,
> +
> + /**
> + * @BATADV_CMD_SET_OPTION_HARDIF: Set option for hardif of the
> + * current softif
> + */
> + BATADV_CMD_SET_OPTION_HARDIF,
> +
> + /**
> + * @BATADV_CMD_GET_OPTION_VLAN: Get option(s) from a VLAN of the
> + * current softif
> + */
> + BATADV_CMD_GET_OPTION_VLAN,
> +
> + /**
> + * @BATADV_CMD_SET_OPTION_VLAN: Set option for VLAN of the
> + * current softif
> + */
> + BATADV_CMD_SET_OPTION_VLAN,
> +
> </pre><br />But instead of using BATADV_ATTR_OPTION_NAME+BATADV_ATTR_OPTION_TYPE+<br />BATADV_ATTR_OPTION_VALUE to send the infos up, we have a number of specific <br />netlink attributes [e.g. BATADV_ATTR_BRIDGE_LOOP_AVOIDANCE (u8)] that are used <br />to exchange the value directly. Multiple attributes can be in the messages <br />and dumping is possible but maybe requires to split all option in multiple <br />messages. Informational dumping (user readable) is then only possible when the <br />userspace part also knows all attributes. And sending things to the kernel is <br />only possible when the userspace also has explicit support for the attribute.</p>
<p>This is at least similar to how I did it in two previous projects but dropped <br />this approach when I saw that it was implemented differently for devlink and <br />team.</p>
</blockquote>
<p>We can maybe modify the current way how options are registered to write/read directly to msg/attributes. But the main logic has to be modified anyway. And we cannot support something like the config command.</p>
<p>(A lot) more time has therefore to be spend on this topic before it is ready.</p>
<p>It should be checked whether NL80211_CMD_SET_WIPHY is a good reference.</p>
<p>And also NLA_FLAG should be dropped. Instead:</p>
<blockquote>
<p>Sidenote: I suggest not to use NLA_FLAG attribute type. Better to use<br />NLA_U8 of value 0/1. NLA_FLAG missing in message might mean 2 things:<br />1) user wants to set false<br />2) user is old and does not support this attribute</p>
</blockquote> batman-adv - Feature #300: Convert sysfs config attributes to genlhttps://www.open-mesh.org/issues/300?journal_id=14852018-11-23T16:22:18ZSven Eckelmann
<ul></ul><p>There is now a new patch series for batman-adv <a class="external" href="https://patchwork.open-mesh.org/project/b.a.t.m.a.n./list/?series=181">https://patchwork.open-mesh.org/project/b.a.t.m.a.n./list/?series=181</a></p>
<p>The batctl implementation can currently only receive the netlink messages of the "config" mcast group. But at least the <strong><em>GET</em></strong> replies will look the same: <a class="external" href="https://patchwork.open-mesh.org/project/b.a.t.m.a.n./patch/20181123161442.13461-2-sven@narfation.org/">https://patchwork.open-mesh.org/project/b.a.t.m.a.n./patch/20181123161442.13461-2-sven@narfation.org/</a></p> batman-adv - Feature #300: Convert sysfs config attributes to genlhttps://www.open-mesh.org/issues/300?journal_id=15012018-12-07T20:35:24ZSven Eckelmann
<ul></ul><p>There are now two new RFC series:</p>
<ul>
<li>batman-adv: <a class="external" href="https://patchwork.open-mesh.org/project/b.a.t.m.a.n./list/?series=188">https://patchwork.open-mesh.org/project/b.a.t.m.a.n./list/?series=188</a>
<ul>
<li>cover letter: <a class="external" href="https://patchwork.open-mesh.org/cover/17669/">https://patchwork.open-mesh.org/cover/17669/</a></li>
</ul>
</li>
<li>batctl: <a class="external" href="https://patchwork.open-mesh.org/project/b.a.t.m.a.n./list/?series=189">https://patchwork.open-mesh.org/project/b.a.t.m.a.n./list/?series=189</a>
<ul>
<li>cover letter: <a class="external" href="https://patchwork.open-mesh.org/cover/17689/">https://patchwork.open-mesh.org/cover/17689/</a></li>
</ul></li>
</ul> batman-adv - Feature #300: Convert sysfs config attributes to genlhttps://www.open-mesh.org/issues/300?journal_id=15202019-01-19T15:58:44ZSven Eckelmann
<ul></ul><p>The RFC patch series for batman-adv was updated:</p>
<ul>
<li>batman-adv: <a class="external" href="https://patchwork.open-mesh.org/project/b.a.t.m.a.n./list/?series=202">https://patchwork.open-mesh.org/project/b.a.t.m.a.n./list/?series=202</a>
<ul>
<li>cover letter: <a class="external" href="https://patchwork.open-mesh.org/cover/17730/">https://patchwork.open-mesh.org/cover/17730/</a></li>
</ul></li>
</ul>
<p>The batctl patch series from <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Convert sysfs config attributes to genl (Closed)" href="https://www.open-mesh.org/issues/300#note-6">#300#note-6</a> can still be used because the ABI didn't change.</p> batman-adv - Feature #300: Convert sysfs config attributes to genlhttps://www.open-mesh.org/issues/300?journal_id=15252019-02-09T13:46:38ZSven Eckelmann
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Resolved</i></li><li><strong>Target version</strong> set to <i>2019.1</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>The two patch series were now posted:</p>
<ul>
<li>batman-adv: <a class="external" href="https://patchwork.open-mesh.org/project/b.a.t.m.a.n./list/?series=210">https://patchwork.open-mesh.org/project/b.a.t.m.a.n./list/?series=210</a>
<ul>
<li>cover letter: <a class="external" href="https://patchwork.open-mesh.org/cover/17762/">https://patchwork.open-mesh.org/cover/17762/</a></li>
</ul>
</li>
<li>batctl: <a class="external" href="https://patchwork.open-mesh.org/project/b.a.t.m.a.n./list/?series=211">https://patchwork.open-mesh.org/project/b.a.t.m.a.n./list/?series=211</a>
<ul>
<li>cover letter: <a class="external" href="https://patchwork.open-mesh.org/cover/17782/">https://patchwork.open-mesh.org/cover/17782/</a></li>
</ul></li>
</ul> batman-adv - Feature #300: Convert sysfs config attributes to genlhttps://www.open-mesh.org/issues/300?journal_id=15262019-02-14T10:18:19ZSven Eckelmann
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li></ul><p>Added to net-next and batman-adv master branch.</p> batman-adv - Feature #300: Convert sysfs config attributes to genlhttps://www.open-mesh.org/issues/300?journal_id=16712020-05-27T21:12:58ZSven Eckelmann
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/1671/diff?detail_id=1138">diff</a>)</li></ul>