Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"pfring NewRing error: no such device" when trying to open pfring ZC interface from zbalance_ipc #147

Open
LrsK opened this issue Oct 19, 2015 · 2 comments · May be fixed by #1087
Open

Comments

@LrsK
Copy link
Contributor

LrsK commented Oct 19, 2015

PF_RING in ZC-mode comes with a program zbalance_ipc that can send the output of one or more ZC-queues to different virtual PF_RING interfaces that end up with names like "zc:99@0" and "zc:99@1" etc.

When using gopacket (which otherwise works fine with normal ZC-interfaces like e.g. "zc:eth3") a "no such device" error is returned. As far as I can tell there is nothing special happening inside NewRing() besides calling C.pfring_open(). Using these virtual interfaces work fine with the example programs that come with PF_RING.

Is this somehow a bug with gopacket? It seems to be doing basically the same thing as the C-examples I've seen that work fine, but returns the error.

Code that fails:

log.Printf("Opening pf_ring on interface %q", *iface)
ring, err = pfring.NewRing(*iface, uint32(*snaplen), pfring.FlagPromisc) // <- fails
if err != nil {
    log.Printf("Error: %s, Ring: %v\n", err, ring)
    return
}

err = ring.Enable()
if err != nil {
    log.Printf("Error: %s\n", err)
    return
}

packetSources = append(packetSources, gopacket.NewPacketSource(ring, layers.LinkTypeEthernet))

log.Printf("New pf_ring.")
defer ring.Close()
@rbenedet
Copy link

I encounter the same issue when opening a device like like "zc:99@0" after using zbalance_ipc in this way:

zbalance_ipc -i eth3 -c 99 -n 2

Has there been any progress on this issue?

Thanks in advance.

@LrsK
Copy link
Contributor Author

LrsK commented Dec 1, 2016

Since opening this issue, I have moved away from using PF_RING, as I was able to handle the traffic load using AF_PACKET with clustering, and so I have not worked on this any further. Make sure you actually need PF_RING for your load. I have also heard from others working with PF_RING that the zbalance_ipc tool is not production ready, although this was some time ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants