Explorar el Código

Add Linux HW offload notes

Håvard O. Nordstrand hace 4 años
padre
commit
fa189e31f8
Se han modificado 2 ficheros con 16 adiciones y 0 borrados
  1. 7 0
      config/network/linux.md
  2. 9 0
      config/network/vyos.md

+ 7 - 0
config/network/linux.md

@@ -50,6 +50,13 @@ Issues may also be related to stupid things like which ports you're using on the
 - Disable protocol hardware offloading as it typically causes more problems than it solves.
 - Make sure network interrupts from a given NIC are distributed across all cores.
     - See `/proc/interrupts`.
+- Enable or disable hardware offloading (needs testing):
+    - Enable/disable large receive offload (LRO) or generic receive offload (LRO): `ethtool -K <if> <lro|gro> on` (temporary)
+    - Enable/disable TX/RX checksum offload: `ethtool -K <if> tx on rx on`
+    - (And some others.)
+- Change NIC RX/TX buffer sizes:
+    - Show supported and current sizes: `ethtool -g <if>`
+    - Set new sizes: `ethtool -G <if> tx 4096 rx 4096`
 
 ## Notes
 

+ 9 - 0
config/network/vyos.md

@@ -6,6 +6,10 @@ breadcrumbs:
 ---
 {% include header.md %}
 
+## Foreword
+
+As VyOS is Debian-based, the Linux router notes are also highly related.
+
 ## Resources
 
 - [VyOS User Guide](https://docs.vyos.io/)
@@ -73,6 +77,11 @@ An example of a full configuration. Except intuitive stuff I forgot to mention.
         - `set firewall state-policy invalid action drop`
     1. Create IPv4 and IPv6 rule sets. Note that IPv4 and IPv6 rule sets can't share names, so you can suffix the names with `-4` and `-6` to avoid conflict.
     1. Attach rule sets to interfaces (typically "local" and "out").
+1. Tuning:
+    - See the Linux router notes.
+    - Enable GRO (example): `ethtool -K <if> gro on`
+    - Increase RX/TX buffer sizes (example): `ethtool -K <if> gro on`
+    - Make any ethtool (e.g.) commands permanent by adding them to `/config/scripts/vyos-postconfig-bootup.script`.
 1. Commit and save: `commit` and `save`.
 
 ## General Configuration