more effort into understanding why TAP interface is so slow on my linux machine to no avail

This commit is contained in:
soypat
2025-06-05 00:47:07 -03:00
parent bc14ed395d
commit 6ba727a0ef
12 changed files with 256 additions and 26 deletions
+10
View File
@@ -102,6 +102,16 @@ func TestCap(t *testing.T) {
if gotTCPFlags != wantTCPflags {
t.Errorf("want %s TCP flags, got %s", wantTCPflags.String(), gotTCPFlags.String())
}
wanDstPort := gen.DstTCP
wantSrcPort := gen.SrcTCP
gotSrcPort := uint16(getClass(ptfrm, FieldClassSrc))
gotDstPort := uint16(getClass(ptfrm, FieldClassDst))
if wantSrcPort != gotSrcPort {
t.Errorf("want %d TCP src port, got %d", wantSrcPort, gotSrcPort)
}
if wanDstPort != gotDstPort {
t.Errorf("want %d TCP dst port, got %d", wanDstPort, gotDstPort)
}
gotHeaderLen := getClass(ptfrm, FieldClassSize)
if gotHeaderLen != uint64(wantHeaderLen) {
t.Errorf("want %d TCP header length, got %d", wantHeaderLen, gotHeaderLen)