Improve darwin tun performance
This commit is contained in:
parent
7812930a48
commit
aa1fd4d994
16 changed files with 192 additions and 115 deletions
|
|
@ -116,7 +116,7 @@ func newRecvMMsgDispatcher(fd int, e *endpoint, opts *Options) (linkDispatcher,
|
|||
return nil, err
|
||||
}
|
||||
var batchSize int
|
||||
if opts.MTU < 49152 {
|
||||
if opts.MultiPendingPackets {
|
||||
batchSize = int((512*1024)/(opts.MTU)) + 1
|
||||
} else {
|
||||
batchSize = 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue