205-doc-nft-document-flowtable.patch 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. From: Pablo Neira Ayuso <[email protected]>
  2. Date: Tue, 23 Jan 2018 12:58:30 +0100
  3. Subject: [PATCH] doc: nft: document flowtable
  4. Document the new flowtable objects available since Linux kernel 4.16-rc.
  5. Signed-off-by: Pablo Neira Ayuso <[email protected]>
  6. ---
  7. --- a/doc/nft.xml
  8. +++ b/doc/nft.xml
  9. @@ -1166,6 +1166,91 @@ filter input iif $int_ifs accept
  10. </refsect1>
  11. <refsect1>
  12. + <title>Flowtables</title>
  13. + <para>
  14. + <cmdsynopsis>
  15. + <group choice="req">
  16. + <arg>add</arg>
  17. + <arg>create</arg>
  18. + </group>
  19. + <command>flowtable</command>
  20. + <arg choice="opt"><replaceable>family</replaceable></arg>
  21. + <arg choice="plain"><replaceable>table</replaceable></arg>
  22. + <arg choice="plain"><replaceable>flowtable</replaceable></arg>
  23. + <arg choice="req">
  24. + hook <replaceable>hook</replaceable>
  25. + priority <replaceable>priority</replaceable> ;
  26. + devices = { <replaceable>device</replaceable>[,...] } ;
  27. + </arg>
  28. + </cmdsynopsis>
  29. + <cmdsynopsis>
  30. + <group choice="req">
  31. + <arg>delete</arg>
  32. + <arg>list</arg>
  33. + </group>
  34. + <command>flowtable</command>
  35. + <arg choice="opt"><replaceable>family</replaceable></arg>
  36. + <replaceable>table</replaceable>
  37. + <replaceable>flowtable</replaceable>
  38. + </cmdsynopsis>
  39. + </para>
  40. +
  41. + <para>
  42. + Flowtables allow you to accelerate packet forwarding in software.
  43. + Flowtables entries are represented through a tuple that is composed of the
  44. + input interface, source and destination address, source and destination
  45. + port; and layer 3/4 protocols. Each entry also caches the destination
  46. + interface and the gateway address - to update the destination link-layer
  47. + address - to forward packets. The ttl and hoplimit fields are also
  48. + decremented. Hence, flowtables provides an alternative path that allow
  49. + packets to bypass the classic forwarding path. Flowtables reside in the
  50. + ingress hook, that is located before the prerouting hook. You can select
  51. + what flows you want to offload through the <literal>flow offload</literal>
  52. + expression from the <literal>forward</literal> chain. Flowtables are
  53. + identified by their address family and their name. The address family
  54. + must be one of
  55. +
  56. + <simplelist type="inline">
  57. + <member><literal>ip</literal></member>
  58. + <member><literal>ip6</literal></member>
  59. + <member><literal>inet</literal></member>
  60. + </simplelist>.
  61. +
  62. + The <literal>inet</literal> address family is a dummy family which is used to create
  63. + hybrid IPv4/IPv6 tables.
  64. +
  65. + When no address family is specified, <literal>ip</literal> is used by default.
  66. + </para>
  67. +
  68. + <variablelist>
  69. + <varlistentry>
  70. + <term><option>add</option></term>
  71. + <listitem>
  72. + <para>
  73. + Add a new flowtable for the given family with the given name.
  74. + </para>
  75. + </listitem>
  76. + </varlistentry>
  77. + <varlistentry>
  78. + <term><option>delete</option></term>
  79. + <listitem>
  80. + <para>
  81. + Delete the specified flowtable.
  82. + </para>
  83. + </listitem>
  84. + </varlistentry>
  85. + <varlistentry>
  86. + <term><option>list</option></term>
  87. + <listitem>
  88. + <para>
  89. + List all flowtables.
  90. + </para>
  91. + </listitem>
  92. + </varlistentry>
  93. + </variablelist>
  94. + </refsect1>
  95. +
  96. + <refsect1>
  97. <title>Stateful objects</title>
  98. <para>
  99. <cmdsynopsis>
  100. @@ -4923,6 +5008,24 @@ add rule nat prerouting tcp dport 22 red
  101. </example>
  102. </para>
  103. </refsect2>
  104. +
  105. + <refsect2>
  106. + <title>Flow offload statement</title>
  107. + <para>
  108. + A flow offload statement allows us to select what flows
  109. + you want to accelerate forwarding through layer 3 network
  110. + stack bypass. You have to specify the flowtable name where
  111. + you want to offload this flow.
  112. + </para>
  113. + <para>
  114. + <cmdsynopsis>
  115. + <command>flow offload</command>
  116. + <literal>@flowtable</literal>
  117. + </cmdsynopsis>
  118. + </para>
  119. +
  120. + </refsect2>
  121. +
  122. <refsect2>
  123. <title>Queue statement</title>
  124. <para>