3 ms·
High-Speed Packet Transmission in Go: From Net.Dial to Af_xdp
- tomohawk 3y agoThe sendmmsg and recvmmg system calls can also boost performance significantly, especially when GSO is enabled.
- atyvr 3y agoInteresting, need to check that out. Is this available in the Go Standard library?
- tomohawk 3y agoIt's available on linux from the x/sys/unix package. You have to use the syscall.Syscall6
- atyvr 3y agoThanks for the suggestion. I added this method using Go's packetConn, and its WriteBatch() function, which appears to be using sendmmsg() https://github.com/atoonk/go-pktgen/blob/main/pktgen/packetConn.go https://github.com/atoonk/go-pktgen/blob/main/pktgen/packetC... I want to try and add it to the af_inet_syscall.go method, but seems like a bit more work than I have time for now. I'm surprised it's already quite fast, even without it. FYI Latest results in README (pkt_conn is the new one) https://github.com/atoonk/go-pktgen/blob/main/README.md https://github.com/atoonk/go-pktgen/blob/main/README.md