All of lore.kernel.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] sysfs abi documentation
@ 2010-05-09  3:17 Marek Lindner
  2010-05-09  7:08 ` Andrew Lunn
  2010-05-09 14:58 ` Sven Eckelmann
  0 siblings, 2 replies; 5+ messages in thread
From: Marek Lindner @ 2010-05-09  3:17 UTC (permalink / raw)
  To: b.a.t.m.a.n

[-- Attachment #1: Type: text/plain, Size: 284 bytes --]


Hi,

Greg asked us to provide an ABI documentation for the files creates in the 
sysfs tree. Since I am respsonsible for the sysfs stuff, I felt it was my turn 
to draft something. Please check the attachments and let me know whether you 
think we can send it or not.

Cheers,
Marek

[-- Attachment #2: sysfs-class-net-mesh --]
[-- Type: text/plain, Size: 3671 bytes --]


What:           /sys/class/net/<mesh_iface>/mesh/aggregate_ogm
Date:           May 2010
Contact:        Marek Lindner <lindner_marek@yahoo.de>
Description:
                Indicates whether the batman protocol messages of the
                mesh <mesh_iface> shall be aggregated or not.

What:           /sys/class/net/<mesh_iface>/mesh/orig_interval
Date:           May 2010
Contact:        Marek Lindner <lindner_marek@yahoo.de>
Description:
                Defines the interval in milliseconds in which batman
                sends its protocol messages.

What:           /sys/class/net/<mesh_iface>/mesh/originators
Date:           May 2010
Contact:        Marek Lindner <lindner_marek@yahoo.de>
Description:
                Displays the table of all batman nodes (in range) and
                the link quality towards them. Each line contains the
                following values:
                  1 - originator
                  2 - TQ (transmit quality) value of originator
                  3 - best next hop towards originator
                  4 - outgoing iface to reach best next hop
                  5 - list of alternative best next hops

What:           /sys/class/net/<mesh_iface>/mesh/transtable_global
Date:           May 2010
Contact:        Marek Lindner <lindner_marek@yahoo.de>
Description:
                Displays the table of mesh-wide announced mac
                addresses. Each line contains the following values:
                  1 - announced mac address
                  2 - originator announcing the mac address

What:           /sys/class/net/<mesh_iface>/mesh/transtable_local
Date:           May 2010
Contact:        Marek Lindner <lindner_marek@yahoo.de>
Description:
                Displays the table of mac addresses announced to the
                mesh network by this node. Each line contains the
                following values:
                  1 - announced mac address

What:           /sys/class/net/<mesh_iface>/mesh/vis_mode
Date:           May 2010
Contact:        Marek Lindner <lindner_marek@yahoo.de>
Description:
                Each batman node only maintains information about its
                own local neighborhood, therefore generating graphs
                showing the topology of the entire mesh is not easily
                feasible without having a central instance to collect
                the local topologies from all nodes. This file allows
                to activate the collecting (server) mode. Once
                activated the topology can be retrieved by reading
                the vis_data file.

What:           /sys/class/net/<mesh_iface>/mesh/vis_data
Date:           May 2010
Contact:        Marek Lindner <lindner_marek@yahoo.de>
Description:
                This file outputs the collected entire mesh topology
                information (if available) in a neutral (raw) format.
                Each line contains a set of identifiers. Values may
                or may not follow depending on their respective
                meanings:
                 * "mac" - mac address of an originator's source
                           interface (each line begins with it)
                 * "TQ mac  value" - src mac's link quality towards
                                     mac address of a neighbor
                                     originator's interface which is
                                     being used for routing
                 * "HNA mac" - HNA announced by source mac
                 * "PRIMARY" - this  is a primary interface
                 * "SEC mac" - secondary mac address of source
                               (requires preceding PRIMARY)

[-- Attachment #3: sysfs-class-net-batman-adv --]
[-- Type: text/plain, Size: 565 bytes --]


What:           /sys/class/net/<iface>/batman-adv/mesh_iface
Date:           May 2010
Contact:        Marek Lindner <lindner_marek@yahoo.de>
Description:
                The /sys/class/net/<iface>/batman-adv/mesh_iface file
                displays the batman mesh interface this <iface>
                currently is associated with.

What:           /sys/class/net/<iface>/batman-adv/iface_status
Date:           May 2010
Contact:        Marek Lindner <lindner_marek@yahoo.de>
Description:
                Indicates the status of <iface> as it is seen by batman.

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

* Re: [B.A.T.M.A.N.] sysfs abi documentation
  2010-05-09  3:17 [B.A.T.M.A.N.] sysfs abi documentation Marek Lindner
@ 2010-05-09  7:08 ` Andrew Lunn
  2010-05-09  7:20   ` Marek Lindner
  2010-05-09 14:58 ` Sven Eckelmann
  1 sibling, 1 reply; 5+ messages in thread
From: Andrew Lunn @ 2010-05-09  7:08 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

On Sun, May 09, 2010 at 11:17:04AM +0800, Marek Lindner wrote:
> 
> Hi,
> 
> Greg asked us to provide an ABI documentation for the files creates
> in the sysfs tree. Since I am respsonsible for the sysfs stuff, I
> felt it was my turn to draft something. Please check the attachments
> and let me know whether you think we can send it or not.

> What:           /sys/class/net/<mesh_iface>/mesh/originators
> Date:           May 2010
> Contact:        Marek Lindner <lindner_marek@yahoo.de>
> Description:
>                 Displays the table of all batman nodes (in range) and
>                 the link quality towards them. Each line contains the
>                 following values:
>                   1 - originator
>                   2 - TQ (transmit quality) value of originator
>                   3 - best next hop towards originator
>                   4 - outgoing iface to reach best next hop
>                   5 - list of alternative best next hops

Hi Marek

This is something i already said in private, but i think it is going
to be a problem.

From Documentation/filesystems/sysfs.txt

  Attributes
  ~~~~~~~~~~

  Attributes can be exported for kobjects in the form of regular files in
  the filesystem. Sysfs forwards file I/O operations to methods defined
  for the attributes, providing a means to read and write kernel
  attributes.

  Attributes should be ASCII text files, preferably with only one value
  per file. It is noted that it may not be efficient to contain only one
  value per file, so it is socially acceptable to express an array of
  values of the same type. 

  Mixing types, expressing multiple lines of data, and doing fancy
  formatting of data is heavily frowned upon. Doing these things may get
  you publically humiliated and your code rewritten without notice. 

I expect that we have a problem here. My guess is some of these files
are going to have to move back into proc. Use sysfs for configuration,
where only single values are needed, and put all the tables of
originators, HNA etc back in proc where fancy formatting of data is
not frowned upon.

	Andrew


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

* Re: [B.A.T.M.A.N.] sysfs abi documentation
  2010-05-09  7:08 ` Andrew Lunn
@ 2010-05-09  7:20   ` Marek Lindner
  0 siblings, 0 replies; 5+ messages in thread
From: Marek Lindner @ 2010-05-09  7:20 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

On Sunday 09 May 2010 15:08:35 Andrew Lunn wrote:
> I expect that we have a problem here. My guess is some of these files
> are going to have to move back into proc. Use sysfs for configuration,
> where only single values are needed, and put all the tables of
> originators, HNA etc back in proc where fancy formatting of data is
> not frowned upon.

Yes, you are probably right. Unfortunately, I'm not sure what is supposed to 
go where. AFAIK procfs is deprecated, sysfs does not seem suitable. Greg 
mentioned configfs, etc .. 
The idea was to document what we have & need and let them (Greg et al.) figure 
out what the best location might be to avoid investing more time & energy in 
the "wrong" virtual filesystem.  :-)

Cheers,
Marek

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

* Re: [B.A.T.M.A.N.] sysfs abi documentation
  2010-05-09  3:17 [B.A.T.M.A.N.] sysfs abi documentation Marek Lindner
  2010-05-09  7:08 ` Andrew Lunn
@ 2010-05-09 14:58 ` Sven Eckelmann
  2010-05-09 17:44   ` Marek Lindner
  1 sibling, 1 reply; 5+ messages in thread
From: Sven Eckelmann @ 2010-05-09 14:58 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Marek Lindner

[-- Attachment #1: Type: Text/Plain, Size: 874 bytes --]

Marek Lindner wrote:
> Hi,
> 
> Greg asked us to provide an ABI documentation for the files creates in the
> sysfs tree. Since I am respsonsible for the sysfs stuff, I felt it was my
> turn to draft something. Please check the attachments and let me know
> whether you think we can send it or not.

I've read a little bit through the different descriptions and it sound good... 
for the reading situation. The problem is that it is nearly never clear that 
you control the behavior of batman-adv through that specific file. For example 
/sys/class/net/<iface>/batman-adv/mesh_iface - I think it is especially 
important for GregKH to see that it needed is now associated to the iface and 
we attach it to the mesh_iface through that file when he should give us some 
advice what virtual fs should be used for what kind of information.

Best regards,
	Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [B.A.T.M.A.N.] sysfs abi documentation
  2010-05-09 14:58 ` Sven Eckelmann
@ 2010-05-09 17:44   ` Marek Lindner
  0 siblings, 0 replies; 5+ messages in thread
From: Marek Lindner @ 2010-05-09 17:44 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

On Sunday 09 May 2010 22:58:39 Sven Eckelmann wrote:
> I've read a little bit through the different descriptions and it sound
> good... for the reading situation. The problem is that it is nearly never
> clear that you control the behavior of batman-adv through that specific
> file. For example /sys/class/net/<iface>/batman-adv/mesh_iface - I think
> it is especially important for GregKH to see that it needed is now
> associated to the iface and we attach it to the mesh_iface through that
> file when he should give us some advice what virtual fs should be used for
> what kind of information.

Thanks for the review. 
Before writing these descriptions I looked up various examples that are 
available in the kernel tree. I had the feeling that our ABI docs are not too 
far off. But I know that this will not be enough to understand the meaning 
behind those settings which is why I created a wikipage explaining the 
connections between the various sysfs files. I intended to send this along with 
the sysfs ABI files:
http://www.open-mesh.org/wiki/tweaking-batman-adv


Regards,
Marek

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

end of thread, other threads:[~2010-05-09 17:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-09  3:17 [B.A.T.M.A.N.] sysfs abi documentation Marek Lindner
2010-05-09  7:08 ` Andrew Lunn
2010-05-09  7:20   ` Marek Lindner
2010-05-09 14:58 ` Sven Eckelmann
2010-05-09 17:44   ` Marek Lindner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.