Closed lddlww closed 3 months ago
Hi @lddlww hhmm, that maybe more a question for the xdp library I'm using. I recognized the error from reading the issues there, then I realized you already opened an issue there :)
So not sure how to help with that. I assume you see the same issues when running the tool with multiple streams?
--streams 2
?
@atoonk thanks for reply
So not sure how to help with that. I assume you see the same issues when running the tool with multiple streams?
--streams 2
?
no,it works normal
i create xsk socket in per goroutine , it works normal also;but create many xsk socket in one goroutine ,it works abnormal
@lddlww
Ah ok, yah in go-pktgen, if you provide multiple streams, we also create a go routine per stream So a xsp per go routine.
it sounds like that works for you as well. Is there a problem with doing one xsk per go routine? you don't want go routines?
Not sure about your use-case, but to get max value, I imagine that's the best way, ie use go routine per xsk.
otherwise how would you write to the multiple descs
at the same time?
remember you'll like want a descs per xsk
descs := xsk.GetDescs(xsk.NumFreeTxSlots(), false)
for i := range descs {
descs[i].Len = uint32(frameLen)
}
xsk.Transmit(descs)
Also just to make sure, you can only create as many xsk's as you have TX queues. there's a check here: https://github.com/atoonk/go-pktgen/blob/main/main.go#L84-L92
you can check with ethtool -l
Cheers!
I imagine that's the best way, ie use go routine per xsk. otherwise how would you write to the multiple
descs
at the same time? remember you'll like want a descs per xsk
ops,you are right; thanks for remind
Will close for now then. have fun!
that's great work!!
i have eth0 nic, which have 8 queues, but follow code throws error:
error is:
how can i do to fix it?