Commit aee11342 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by David S. Miller

docs: networking: convert fib_trie.txt to ReST

- add SPDX header;
- adjust title markup;
- adjust identation, whitespaces and blank lines;
- add to networking/index.rst.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 06df6572
LC-trie implementation notes. .. SPDX-License-Identifier: GPL-2.0
============================
LC-trie implementation notes
============================
Node types Node types
---------- ----------
leaf leaf
An end node with data. This has a copy of the relevant key, along An end node with data. This has a copy of the relevant key, along
with 'hlist' with routing table entries sorted by prefix length. with 'hlist' with routing table entries sorted by prefix length.
See struct leaf and struct leaf_info. See struct leaf and struct leaf_info.
...@@ -13,7 +17,7 @@ trie node or tnode ...@@ -13,7 +17,7 @@ trie node or tnode
A few concepts explained A few concepts explained
------------------------ ------------------------
Bits (tnode) Bits (tnode)
The number of bits in the key segment used for indexing into the The number of bits in the key segment used for indexing into the
child array - the "child index". See Level Compression. child array - the "child index". See Level Compression.
...@@ -23,7 +27,7 @@ Pos (tnode) ...@@ -23,7 +27,7 @@ Pos (tnode)
Path Compression / skipped bits Path Compression / skipped bits
Any given tnode is linked to from the child array of its parent, using Any given tnode is linked to from the child array of its parent, using
a segment of the key specified by the parent's "pos" and "bits" a segment of the key specified by the parent's "pos" and "bits"
In certain cases, this tnode's own "pos" will not be immediately In certain cases, this tnode's own "pos" will not be immediately
adjacent to the parent (pos+bits), but there will be some bits adjacent to the parent (pos+bits), but there will be some bits
in the key skipped over because they represent a single path with no in the key skipped over because they represent a single path with no
...@@ -56,8 +60,8 @@ full_children ...@@ -56,8 +60,8 @@ full_children
Comments Comments
--------- ---------
We have tried to keep the structure of the code as close to fib_hash as We have tried to keep the structure of the code as close to fib_hash as
possible to allow verification and help up reviewing. possible to allow verification and help up reviewing.
fib_find_node() fib_find_node()
A good start for understanding this code. This function implements a A good start for understanding this code. This function implements a
......
...@@ -55,6 +55,7 @@ Contents: ...@@ -55,6 +55,7 @@ Contents:
dns_resolver dns_resolver
driver driver
eql eql
fib_trie
.. only:: subproject and html .. only:: subproject and html
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment