ntop/PF_RING

Pfcount (build from Github) can not reopen zbalance_ipc instances but pfcount install via apt can

Closed this issue · 5 comments

Dear all
Pfcount (build from Github) can not reopen zbalance_ipc instances but pfcount installed via apt can

  1. Description :
  • Create instances by zbalance_ipc
    zbalance_ipc -i zc -n 2 -m 2
  • Running pfcount installed via apt with zbalance_ipc instance : OK
    When closing and reopening the application, there are no errors.
  • Running pfcount built from GitHub :
    When closing and reopening the application, an error occurs : pfring_open error [Resource temporarily unavailable]
/home/test/PF_RING-8.8.0-stable/userland/examples# ./pfcount -i zc:103@1
Using PF_RING v.8.8.0.240805 kernel module v.8.8.0
Dumping statistics on /proc/net/pf_ring/stats/93378-none.211
Capturing from zc:103@1 [mac: unknown][if_index: -1][speed: 0Mb/s]
# Device RX channels: 1
# Polling threads:    1
=========================
Absolute Stats: [618'188 pkts total][0 pkts dropped][0.0% dropped]
[618'188 pkts rcvd][603'939'230 bytes rcvd]
=========================

^CLeaving...

/home/test/PF_RING-8.8.0-stable/userland/examples# ./pfcount -i zc:103@1
pfring_open error [Resource temporarily unavailable] (pf_ring not loaded or interface zc:103@1 is down ?)
  1. System Information:
  • Ubuntu 22.04
  • Pfring version ( install via apt) : 8.8.0-9273
apt list --installed | grep pfring
pfring-dkms/now 8.8.0.9273 all [installed,upgradable to: 8.8.0.9275]
pfring/now 8.8.0-9273 amd64 [installed,upgradable to: 8.8.0-9275]
  • Pfring version from Github : 8.8.0-stable
  • No updated or nothing change from github code.
    Looking forward for your support
    Thank you

@jolysoul127 this is strange as the code and libraries are exactly the same, we will verify this

Thank you @cardigliano
Update : I have install fresh ubuntu 22.04 (iso downloaded from Ubuntu Official site) but not solve the problem

  • Install requirement
apt-get install build-essential bison flex linux-headers-$(uname -r) libnuma-dev libnl-genl-3-dev
apt install gcc-12

  • Make kernel ( but not make install )
  • Make driver
  • make lib and libpcap ( make only, not make install)
  • make example and example_zc

But reopen zbalance_ipc after close still error :

/home/test/PF_RING-8.8.0-stable/userland/examples# ./pfcount -i zc:103@1
pfring_open error [Resource temporarily unavailable] (pf_ring not loaded or interface zc:103@1 is down ?)

@jolysoul127 it seems be be working in our lab compiling from source code.. anyway I suggest not to mix binaries from packages with binaries compiled from source code as this may lead to unaligned code and create issues

@cardigliano
i have install fresh ubuntu 22.04 but everything is the same.
can you please let me know your OS, kernel, gcc version and PF_RING version which build from Git
Thank you

This has been tested on all the supported Ubuntu versions, including 22.04, and it works in our lab, always tested with the latest available kernel. pfcount is able to reattach to the queue as long as the process (and the socket) is shutted down gracefully.