f88e7c175a
Added high/regular performance core pinning configuration options that can be used in place of the existing 'config' option. '--high-perf-cores CORELIST' option allow the user to specify a high performance cores list; if this option is not used and the 'perf-config' option is used, the application will query the system using the rte_power library in order to get a list of available high performance cores. The cores that are considered high performance are the cores that have turbo enabled. '--perf-config (port,queue,hi_perf,lcore_index)' option is similar to the existing config option, the cores are specified as indices for bins containing high or regular performance cores. Example: l3fwd-power -l 6,7 -- -p 0xff \ --high-perf-cores 6 --perf-config="(0,0,0,0),(1,0,1,0)" cores 6 and 7 are used, core 6 is specified as a high performance core. port 0 queue 0 will use a regular performance core, index 0 (core 7) port 1 queue 0 will use a high performance core, index 0 (core 6) Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> Acked-by: David Hunt <david.hunt@intel.com>
69 lines
1.7 KiB
Makefile
69 lines
1.7 KiB
Makefile
# SPDX-License-Identifier: BSD-3-Clause
|
|
# Copyright(c) 2010-2018 Intel Corporation
|
|
|
|
# binary name
|
|
APP = l3fwd-power
|
|
|
|
# all source are stored in SRCS-y
|
|
SRCS-y := main.c perf_core.c
|
|
|
|
# Build using pkg-config variables if possible
|
|
$(shell pkg-config --exists libdpdk)
|
|
ifeq ($(.SHELLSTATUS),0)
|
|
|
|
all: shared
|
|
.PHONY: shared static
|
|
shared: build/$(APP)-shared
|
|
ln -sf $(APP)-shared build/$(APP)
|
|
static: build/$(APP)-static
|
|
ln -sf $(APP)-static build/$(APP)
|
|
|
|
PC_FILE := $(shell pkg-config --path libdpdk)
|
|
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
|
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
|
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
|
|
|
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
|
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
|
|
|
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
|
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
|
|
|
build:
|
|
@mkdir -p $@
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
|
rmdir --ignore-fail-on-non-empty build
|
|
|
|
else # Build using legacy build system
|
|
|
|
ifeq ($(RTE_SDK),)
|
|
$(error "Please define RTE_SDK environment variable")
|
|
endif
|
|
|
|
# Default target, can be overridden by command line or environment
|
|
RTE_TARGET ?= x86_64-native-linuxapp-gcc
|
|
|
|
include $(RTE_SDK)/mk/rte.vars.mk
|
|
|
|
ifneq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y)
|
|
$(info This application can only operate in a linuxapp environment, \
|
|
please change the definition of the RTE_TARGET environment variable)
|
|
all:
|
|
else
|
|
|
|
CFLAGS += -O3
|
|
CFLAGS += $(WERROR_FLAGS)
|
|
|
|
# workaround for a gcc bug with noreturn attribute
|
|
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
|
|
ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
|
|
CFLAGS_main.o += -Wno-return-type
|
|
endif
|
|
|
|
include $(RTE_SDK)/mk/rte.extapp.mk
|
|
endif
|
|
endif
|