]> git.feebdaed.xyz Git - 0xmirror/f-stack.git/commitdiff
Update Makefile
authorliujinhui-job <liujinhui@kylinos.cn>
Sun, 8 Jun 2025 16:04:01 +0000 (00:04 +0800)
committerGitHub <noreply@github.com>
Sun, 8 Jun 2025 16:04:01 +0000 (00:04 +0800)
adapter/syscall/Makefile

index 95c03e4a643384f41bef3eee14921b4058cfc2c1..d34814b4ae1d8a6e856fd219553692e1d67cc92c 100644 (file)
@@ -29,6 +29,12 @@ endif
 # like linux kernel.
 #FF_USE_THREAD_STRUCT_HANDLE=1
 
+# If FF_PRELOAD_SUPPORT_SELECT is enabled, we can use select in LD_PRELOAD mode. 
+# However, we need to set the value of FF_KERNEL_MAX_FD_SELECT based on our requirements to ensure file descriptors 
+# (FDs) for the user-space protocol stack can be covered by the select interface.
+#FF_PRELOAD_SUPPORT_SELECT=1
+#FF_KERNEL_MAX_FD_SELECT=128
+
 PKGCONF ?= pkg-config
 
 ifndef DEBUG
@@ -57,6 +63,10 @@ ifdef FF_USE_THREAD_STRUCT_HANDLE
        CFLAGS+= -DFF_USE_THREAD_STRUCT_HANDLE
 endif
 
+ifdef FF_PRELOAD_SUPPORT_SELECT
+       CFLAGS+= -DFF_PRELOAD_SUPPORT_SELECT -DFF_KERNEL_MAX_FD_SELECT=$(FF_KERNEL_MAX_FD_SELECT) -DFF_USE_THREAD_STRUCT_HANDLE 
+endif
+
 CFLAGS += -fPIC -Wall -Werror $(shell $(PKGCONF) --cflags libdpdk)
 
 INCLUDES= -I. -I${FF_PATH}/lib