Add GSO support

This commit is contained in:
世界 2023-12-10 00:00:14 +08:00
parent fa89d2c0a5
commit 5b50c61b72
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
22 changed files with 1376 additions and 449 deletions

View file

@ -50,6 +50,10 @@ func (p TCPPacket) SetChecksum(sum [2]byte) {
p[17] = sum[1]
}
func (p TCPPacket) OffloadChecksum() {
p.SetChecksum(zeroChecksum)
}
func (p TCPPacket) ResetChecksum(psum uint32) {
p.SetChecksum(zeroChecksum)
p.SetChecksum(Checksum(psum, p))