Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions libs/libpfring/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk

PKG_NAME:=libpfring
PKG_VERSION:=8.6.1
PKG_RELEASE:=2
PKG_VERSION:=9.2.0
PKG_RELEASE:=1

PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=$(PKG_VERSION)
PKG_SOURCE_URL:=https://github.com/ntop/PF_RING
PKG_MIRROR_HASH:=2c4623e4a3cd601a94cfdaf748e0cd7aa93e8ec850d3cd4c2ec5d33419e45fbb

PKG_MAINTAINER:=Banglang Huang <banglang.huang@foxmail.com>
PKG_SOURCE:=$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/ntop/PF_RING/tar.gz/$(PKG_VERSION)?
PKG_HASH:=4352ec1f0913999a8dc75e064a294bc84c2ea24deca02cf7acc7a3a0fc0189f0
PKG_BUILD_DIR:=$(BUILD_DIR)/PF_RING-$(PKG_VERSION)

PKG_FIXUP:=patch-libtool
PKG_INSTALL:=1
Expand Down
47 changes: 29 additions & 18 deletions libs/libpfring/patches/0001-fix-cross-compiling.patch
Original file line number Diff line number Diff line change
@@ -1,32 +1,43 @@
--- a/userland/configure
+++ b/userland/configure
@@ -3873,12 +3873,6 @@ $as_echo "no" >&6; }
@@ -3942,13 +3942,6 @@ printf "%s\n" "no" >&6; }
if test "$IS_FREEBSD" != "1" && test "$cross_compiling" != "yes" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if r/w locks are supported" >&5
$as_echo_n "checking if r/w locks are supported... " >&6; }
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if r/w locks are supported" >&5
printf %s "checking if r/w locks are supported... " >&6; }
- if test "$cross_compiling" = yes
-then :
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
-else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

@@ -3891,7 +3885,7 @@ else
@@ -3961,8 +3954,6 @@ else $as_nop


_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
cat >>confdefs.h <<_ACEOF
@@ -3905,7 +3899,6 @@ $as_echo "no" >&6; }
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-if ac_fn_c_try_run "$LINENO"
-then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
printf "%s\n" "#define HAVE_RW_LOCK 1" >>confdefs.h
@@ -3978,8 +3969,6 @@ fi

fi

- fi
-
MOD_FIBERBLAZE_LIB="libs/libpfring_fiberblaze_$MACHINE$LIBARCH.a"
if test -f "lib/$MOD_FIBERBLAZE_LIB"; then
FIBERBLAZE_LIB="-lm -ldl"
@@ -4009,8 +3998,6 @@ printf "%s\n" "no" >&6; }
fi
fi

-fi
-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Mellanox support (x64 and aarch64)" >&5
printf %s "checking Mellanox support (x64 and aarch64)... " >&6; }
MOD_MLX_LIB="libs/libpfring_mlx_${MACHINE}${LIBARCH}.a"
77 changes: 0 additions & 77 deletions libs/libpfring/patches/002-Fix-missing-prototypes.patch

This file was deleted.

This file was deleted.

24 changes: 0 additions & 24 deletions libs/libpfring/patches/010-gcc14.patch

This file was deleted.

2 changes: 1 addition & 1 deletion libs/libpfring/patches/100-fix-compilation-warning.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/kernel/pf_ring.c
+++ b/kernel/pf_ring.c
@@ -3962,7 +3962,7 @@ static int hash_pkt_cluster(ring_cluster
@@ -4079,7 +4079,7 @@ static int hash_pkt_cluster(ring_cluster
break;
}
/* else, fall through, because it's like 2-tuple for non-TCP packets */
Expand Down

This file was deleted.

22 changes: 0 additions & 22 deletions libs/libpfring/patches/102-remove-sendpage.patch

This file was deleted.

50 changes: 50 additions & 0 deletions libs/libpfring/patches/900-Fix-Compilation-on-kernel-6.17.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
From f6e8cb42a891ab3cf1eb2ecb52ae38a2af1096eb Mon Sep 17 00:00:00 2001
From: Alfredo Cardigliano <cardigliano@ntop.org>
Date: Mon, 22 Dec 2025 11:31:07 +0100
Subject: [PATCH] Fix compilation on kernel 6.17 (fix #1009)

---
kernel/pf_ring.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)

--- a/kernel/pf_ring.c
+++ b/kernel/pf_ring.c
@@ -5468,7 +5468,12 @@ static int is_netdev_promisc(struct net_
debug_printk(1, "checking promisc for %s\n", netdev->name);

rtnl_lock();
+
+#if(LINUX_VERSION_CODE < KERNEL_VERSION(6,17,0))
if_flags = (short) dev_get_flags(netdev);
+#else
+ if_flags = (short) netif_get_flags(netdev);
+#endif
rtnl_unlock();

return !!(if_flags & IFF_PROMISC);
@@ -5483,7 +5488,12 @@ static void set_netdev_promisc(struct ne

rtnl_lock();

+#if(LINUX_VERSION_CODE < KERNEL_VERSION(6,17,0))
if_flags = (short) dev_get_flags(netdev);
+#else
+ if_flags = (short) netif_get_flags(netdev);
+#endif
+
if(!(if_flags & IFF_PROMISC)) {
if_flags |= IFF_PROMISC;
#if(LINUX_VERSION_CODE < KERNEL_VERSION(5,0,0) && \
@@ -5506,7 +5516,12 @@ static void unset_netdev_promisc(struct

rtnl_lock();

+#if(LINUX_VERSION_CODE < KERNEL_VERSION(6,17,0))
if_flags = (short) dev_get_flags(netdev);
+#else
+ if_flags = (short) netif_get_flags(netdev);
+#endif
+
if(if_flags & IFF_PROMISC) {
if_flags &= ~IFF_PROMISC;
#if(LINUX_VERSION_CODE < KERNEL_VERSION(5,0,0) && \
Loading