mirror of
https://git.zx2c4.com/wireguard-go
synced 2025-10-05 08:36:57 +08:00
conn: inch BatchSize toward being non-dynamic
There's not really a use at the moment for making this configurable, and once bind_windows.go behaves like bind_std.go, we'll be able to use constants everywhere. So begin that simplification now. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
@@ -72,11 +72,11 @@ type tcpGROTable struct {
|
||||
|
||||
func newTCPGROTable() *tcpGROTable {
|
||||
t := &tcpGROTable{
|
||||
itemsByFlow: make(map[flowKey][]tcpGROItem, conn.DefaultBatchSize),
|
||||
itemsPool: make([][]tcpGROItem, conn.DefaultBatchSize),
|
||||
itemsByFlow: make(map[flowKey][]tcpGROItem, conn.IdealBatchSize),
|
||||
itemsPool: make([][]tcpGROItem, conn.IdealBatchSize),
|
||||
}
|
||||
for i := range t.itemsPool {
|
||||
t.itemsPool[i] = make([]tcpGROItem, 0, conn.DefaultBatchSize)
|
||||
t.itemsPool[i] = make([]tcpGROItem, 0, conn.IdealBatchSize)
|
||||
}
|
||||
return t
|
||||
}
|
||||
|
Reference in New Issue
Block a user