Просмотр исходного кода

disable offloads by default for first release (#1858)

Jack Doan 1 месяц назад
Родитель
Сommit
19e04db115
3 измененных файлов с 4 добавлено и 4 удалено
  1. 2 2
      examples/config.yml
  2. 1 1
      main.go
  3. 1 1
      overlay/tun_linux.go

+ 2 - 2
examples/config.yml

@@ -173,7 +173,7 @@ listen:
   # This setting is reloadable.
   # This setting is reloadable.
   #so_mark: 0
   #so_mark: 0
   # the udp_offloads setting controls if Nebula will attempt to enable GSO and GRO for its UDP socket(s). Linux only, not reloadable.
   # the udp_offloads setting controls if Nebula will attempt to enable GSO and GRO for its UDP socket(s). Linux only, not reloadable.
-  # udp_offloads: true
+  # udp_offloads: false
 
 
 # Routines is the number of thread pairs to run that consume from the tun and UDP queues.
 # Routines is the number of thread pairs to run that consume from the tun and UDP queues.
 # Currently, this defaults to 1 which means we have 1 tun queue reader and 1
 # Currently, this defaults to 1 which means we have 1 tun queue reader and 1
@@ -268,7 +268,7 @@ tun:
   mtu: 1300
   mtu: 1300
 
 
   # the use_offloads setting controls if Nebula will attempt to enable GSO and GRO for the tun device. Linux only, not reloadable.
   # the use_offloads setting controls if Nebula will attempt to enable GSO and GRO for the tun device. Linux only, not reloadable.
-  #use_offloads: true
+  #use_offloads: false
 
 
   # Linux only. pin_threads pins each tun reader/encrypt OS thread to a single CPU. This keeps every goroutine's
   # Linux only. pin_threads pins each tun reader/encrypt OS thread to a single CPU. This keeps every goroutine's
   # batched sends flowing through one XPS-selected NIC TX ring, so packets within a flow stay ordered on the wire
   # batched sends flowing through one XPS-selected NIC TX ring, so packets within a flow stay ordered on the wire

+ 1 - 1
main.go

@@ -188,7 +188,7 @@ func Main(c *config.C, configTest bool, buildVersion string, l *slog.Logger, dev
 				Listen:   listen,
 				Listen:   listen,
 				Multi:    routines > 1,
 				Multi:    routines > 1,
 				Batch:    batchSize,
 				Batch:    batchSize,
-				Offloads: c.GetBool("listen.udp_offloads", true),
+				Offloads: c.GetBool("listen.udp_offloads", false),
 			}
 			}
 			udpServer, err := udp.NewListener(l, udpSettings)
 			udpServer, err := udp.NewListener(l, udpSettings)
 			if err != nil {
 			if err != nil {

+ 1 - 1
overlay/tun_linux.go

@@ -133,7 +133,7 @@ func newTun(c *config.C, l *slog.Logger, vpnNetworks []netip.Prefix, multiqueue
 		baseFlags |= unix.IFF_MULTI_QUEUE
 		baseFlags |= unix.IFF_MULTI_QUEUE
 	}
 	}
 	nameStr := c.GetString("tun.dev", "")
 	nameStr := c.GetString("tun.dev", "")
-	useOffloads := c.GetBool("tun.use_offloads", true)
+	useOffloads := c.GetBool("tun.use_offloads", false)
 
 
 	var fd int
 	var fd int
 	var name string
 	var name string