add missing backoffs

This commit is contained in:
Patricio Whittingslow
2026-06-09 14:33:50 -03:00
parent 6ba06acdcb
commit 82f9461548
3 changed files with 5 additions and 0 deletions
@@ -347,6 +347,7 @@ func mockClient(stack *xnet.StackAsync, port uint16, subnet netip.Prefix) {
TxBuf: make([]byte, 2048),
TxPacketQueueSize: 4,
Logger: slog.Default(),
RWBackoff: tcpBackoff,
})
if err != nil {
panic(err.Error())
+2
View File
@@ -99,6 +99,7 @@ func (s StackGo) SocketNetip(ctx context.Context, network string, family, sotype
RxBuf: make([]byte, s.plcfg.RxBufSize),
TxQueueSize: s.plcfg.QueueSize,
RxQueueSize: s.plcfg.QueueSize,
RWBackoff: s.plcfg.NewBackoff(),
})
if err != nil {
return nil, err
@@ -120,6 +121,7 @@ func (s StackGo) SocketNetip(ctx context.Context, network string, family, sotype
RxBuf: make([]byte, s.plcfg.RxBufSize),
TxQueueSize: s.plcfg.QueueSize,
RxQueueSize: s.plcfg.QueueSize,
RWBackoff: s.plcfg.NewBackoff(),
})
if err != nil {
return nil, err
+2
View File
@@ -112,6 +112,7 @@ func BenchmarkTCPHandshake(b *testing.B) {
RxBuf: buf[:MTU],
TxBuf: buf[MTU : MTU*2],
TxPacketQueueSize: 4,
RWBackoff: backoffYield,
})
if err != nil {
b.Fatal(err)
@@ -120,6 +121,7 @@ func BenchmarkTCPHandshake(b *testing.B) {
RxBuf: buf[2*MTU : 3*MTU],
TxBuf: buf[3*MTU : 4*MTU],
TxPacketQueueSize: 4,
RWBackoff: backoffYield,
})
if err != nil {
b.Fatal(err)