I tried several ways to multithread gonetmap but it doesn't work
for ringIndex := uint32(0); ringIndex < iface.Nif.RxRings+1; ringIndex++ {
ring := iface.GetRing(ringIndex, gonetmap.RX)
go pollingWorker(iface, ring, 1000) // polling specific ring with processRing(ring)
}
for i := uint32(0); i < 8; i++ {
ring := iface.GetRing(ringIndex, gonetmap.RX)
go pollingWorker(iface, 1000) // a loop create ring and use processRing(ring)
}
It's always fail with
ens192 RX0: fail 'cur < head || cur > kring->nr_hwtail' h 47 c 43 t 47 rh 47 rc 43 rt 47
hc 43 ht 47
Seems like different goroutines change cur/head.
I tried several ways to multithread gonetmap but it doesn't work
It's always fail with
Seems like different goroutines change cur/head.