-
Notifications
You must be signed in to change notification settings - Fork 548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TCP buffer size過大時, err msg (Message too long)而無法雙倍發包, 是否可以先分割? #48
Comments
找到暫時解決方法 |
packet len:[5800] actual write:[-1] |
尝试了一下,关闭网卡打包功能转交系统可解,但会提高cpu和ram占用。 |
我想到一个最简单的解决办法,这种情况你把mtu阈值改大点不就完了,具体改多大,看你报错的文件大小而定。 |
不起作用 |
分析過源碼, TCP的包在跑 net_speeder.c的 libnet_adv_write_raw_ipv4,
例如
packet len:[13180] actual write:[-1] err msg:[libnet_write_raw_ipv4(): -1 bytes written (Message too long)
但如果控制TCP buffer size, 讓packet len小於MTU, 那就沒問題可以雙倍發
問題是, MTU再多也只有9K, 13180這種大小應該還有不少機會
The text was updated successfully, but these errors were encountered: