mirror of https://github.com/F-Stack/f-stack.git
commit
387425b16d
|
@ -64,6 +64,7 @@ get_curthread(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
#define curthread get_curthread()
|
#define curthread get_curthread()
|
||||||
|
#undef curthread
|
||||||
|
|
||||||
#define PCPU_GET(member) (get_pcpu()->pc_ ## member)
|
#define PCPU_GET(member) (get_pcpu()->pc_ ## member)
|
||||||
#define PCPU_ADD(member, value) (get_pcpu()->pc_ ## member += (value))
|
#define PCPU_ADD(member, value) (get_pcpu()->pc_ ## member += (value))
|
||||||
|
|
33
lib/Makefile
33
lib/Makefile
|
@ -23,13 +23,23 @@ FF_KNI=1
|
||||||
#FF_NETGRAPH=1
|
#FF_NETGRAPH=1
|
||||||
#FF_IPFW=1
|
#FF_IPFW=1
|
||||||
|
|
||||||
|
include ${TOPDIR}/mk/kern.pre.mk
|
||||||
|
|
||||||
ifeq ($(FF_DPDK),)
|
ifeq ($(FF_DPDK),)
|
||||||
|
ifeq (${MACHINE_CPUARCH},aarch64)
|
||||||
|
FF_DPDK=${TOPDIR}/dpdk/build
|
||||||
|
else
|
||||||
FF_DPDK=${TOPDIR}/dpdk/x86_64-native-linuxapp-gcc
|
FF_DPDK=${TOPDIR}/dpdk/x86_64-native-linuxapp-gcc
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef RTE_SDK
|
ifdef RTE_SDK
|
||||||
|
ifeq (${MACHINE_CPUARCH},aarch64)
|
||||||
|
FF_DPDK=${RTE_SDK}/build
|
||||||
|
else
|
||||||
FF_DPDK=${RTE_SDK}/x86_64-native-linuxapp-gcc
|
FF_DPDK=${RTE_SDK}/x86_64-native-linuxapp-gcc
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
DPDK_CFLAGS= -Wall -Werror -include ${FF_DPDK}/include/rte_config.h
|
DPDK_CFLAGS= -Wall -Werror -include ${FF_DPDK}/include/rte_config.h
|
||||||
DPDK_CFLAGS+= -march=native -DRTE_MACHINE_CPUFLAG_SSE -DRTE_MACHINE_CPUFLAG_SSE2 -DRTE_MACHINE_CPUFLAG_SSE3
|
DPDK_CFLAGS+= -march=native -DRTE_MACHINE_CPUFLAG_SSE -DRTE_MACHINE_CPUFLAG_SSE2 -DRTE_MACHINE_CPUFLAG_SSE3
|
||||||
|
@ -37,8 +47,6 @@ DPDK_CFLAGS+= -DRTE_MACHINE_CPUFLAG_SSSE3 -DRTE_MACHINE_CPUFLAG_SSE4_1 -DRTE_MAC
|
||||||
DPDK_CFLAGS+= -DRTE_COMPILE_TIME_CPUFLAGS=RTE_CPUFLAG_SSE,RTE_CPUFLAG_SSE2,RTE_CPUFLAG_SSE3,RTE_CPUFLAG_SSSE3,RTE_CPUFLAG_SSE4_1,RTE_CPUFLAG_SSE4_2
|
DPDK_CFLAGS+= -DRTE_COMPILE_TIME_CPUFLAGS=RTE_CPUFLAG_SSE,RTE_CPUFLAG_SSE2,RTE_CPUFLAG_SSE3,RTE_CPUFLAG_SSSE3,RTE_CPUFLAG_SSE4_1,RTE_CPUFLAG_SSE4_2
|
||||||
DPDK_CFLAGS+= -I${FF_DPDK}/include
|
DPDK_CFLAGS+= -I${FF_DPDK}/include
|
||||||
|
|
||||||
include ${TOPDIR}/mk/kern.pre.mk
|
|
||||||
|
|
||||||
KERNPREINCLUDES:= ${INCLUDES}
|
KERNPREINCLUDES:= ${INCLUDES}
|
||||||
INCLUDES= -I${OVERRIDE_INCLUDES_ROOT} ${KERNPREINCLUDES}
|
INCLUDES= -I${OVERRIDE_INCLUDES_ROOT} ${KERNPREINCLUDES}
|
||||||
INCLUDES+= -I./machine_include
|
INCLUDES+= -I./machine_include
|
||||||
|
@ -92,6 +100,13 @@ endif
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
#
|
||||||
|
# fix the MACHINE_CPUARCH to match the FreeBSD directory name
|
||||||
|
#
|
||||||
|
ifeq (${MACHINE_CPUARCH},aarch64)
|
||||||
|
MACHINE_CPUARCH=arm64
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Distilled from FreeBSD src/sys/conf/Makefile.i386
|
# Distilled from FreeBSD src/sys/conf/Makefile.i386
|
||||||
|
@ -262,7 +277,18 @@ KERN_MHEADERS+= \
|
||||||
KERN_MSRCS+= \
|
KERN_MSRCS+= \
|
||||||
linker_if.m
|
linker_if.m
|
||||||
|
|
||||||
|
ifeq (${MACHINE_CPUARCH},arm64)
|
||||||
|
LIBKERN_SRCS+= \
|
||||||
|
bcd.c \
|
||||||
|
crc32.c \
|
||||||
|
inet_ntoa.c \
|
||||||
|
jenkins_hash.c \
|
||||||
|
strlcpy.c \
|
||||||
|
strnlen.c \
|
||||||
|
zlib.c \
|
||||||
|
fls.c \
|
||||||
|
flsl.c
|
||||||
|
else
|
||||||
LIBKERN_SRCS+= \
|
LIBKERN_SRCS+= \
|
||||||
bcd.c \
|
bcd.c \
|
||||||
crc32.c \
|
crc32.c \
|
||||||
|
@ -271,6 +297,7 @@ LIBKERN_SRCS+= \
|
||||||
strlcpy.c \
|
strlcpy.c \
|
||||||
strnlen.c \
|
strnlen.c \
|
||||||
zlib.c
|
zlib.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
MACHINE_SRCS+= \
|
MACHINE_SRCS+= \
|
||||||
|
|
|
@ -101,6 +101,10 @@ CFLAGS+=
|
||||||
INLINE_LIMIT?= 8000
|
INLINE_LIMIT?= 8000
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq (${MACHINE_CPUARCH},arm64)
|
||||||
|
INLINE_LIMIT?= 15000
|
||||||
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# GCC SSP support
|
# GCC SSP support
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue