aboutsummaryrefslogtreecommitdiffstats
path: root/examples/l4fwd
diff options
context:
space:
mode:
authorKonstantin Ananyev <konstantin.ananyev@intel.com>2021-09-30 10:05:39 +0000
committerKonstantin Ananyev <konstantin.ananyev@intel.com>2021-11-10 11:55:12 +0000
commitb792c1f27d58040f3a815da18183d329bd6bd84b (patch)
treedef302a01c2136211651fb90994806ae1ff0a32a /examples/l4fwd
parentf71107b4dd6a4b8b1cd28d7339c924f1b013cfa4 (diff)
tldk: swtich to use DPDK 20.11 LTS
As in DPDK 20.11 'make' is not supported any more, switch to use pkg-conf approach. Note that RTE_SDK now should point to your DPDK package installation path. Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Change-Id: I4a3c394758e183a3ddcdb45a0562a81583daaab6 Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Diffstat (limited to 'examples/l4fwd')
-rw-r--r--examples/l4fwd/Makefile33
-rw-r--r--examples/l4fwd/lcore.h2
-rw-r--r--examples/l4fwd/main.c4
3 files changed, 11 insertions, 28 deletions
diff --git a/examples/l4fwd/Makefile b/examples/l4fwd/Makefile
index a6e0de3..be85eac 100644
--- a/examples/l4fwd/Makefile
+++ b/examples/l4fwd/Makefile
@@ -11,38 +11,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-ifeq ($(RTE_SDK),)
-$(error "Please define RTE_SDK environment variable")
-endif
-
-ifeq ($(RTE_TARGET),)
-$(error "Please define RTE_TARGET environment variable")
-endif
-
-ifeq ($(TLDK_ROOT),)
-$(error "Please define TLDK_ROOT environment variable")
-endif
-
-include $(RTE_SDK)/mk/rte.vars.mk
-
# binary name
-APP = l4fwd
+APP_NAME = l4fwd
+
+include $(TLDK_ROOT)/mk/tle.var.mk
# all source are stored in SRCS-y
SRCS-y += parse.c
SRCS-y += pkt.c
SRCS-y += main.c
-CFLAGS += $(WERROR_FLAGS)
-CFLAGS += -I$(RTE_OUTPUT)/include
-
-LDLIBS += -L$(RTE_OUTPUT)/lib
-LDLIBS += -ltle_l4p
-LDLIBS += -ltle_memtank
-LDLIBS += -ltle_timer
+LIB_DEPS += tle_l4p
+LIB_DEPS += tle_memtank
+LIB_DEPS += tle_timer
-EXTRA_CFLAGS += -O3
-CFLAGS_parse.o += -D_GNU_SOURCE
-CFLAGS_main.o += -D_GNU_SOURCE
+CFLAGS_parse.c += -D_GNU_SOURCE
+CFLAGS_main.c += -D_GNU_SOURCE
include $(TLDK_ROOT)/mk/tle.app.mk
diff --git a/examples/l4fwd/lcore.h b/examples/l4fwd/lcore.h
index 8d69c4f..7ae1943 100644
--- a/examples/l4fwd/lcore.h
+++ b/examples/l4fwd/lcore.h
@@ -478,7 +478,7 @@ netfe_lcore_fill(struct lcore_prm prm[RTE_MAX_LCORE],
return -EINVAL;
}
- if (rte_get_master_lcore() != lc &&
+ if (rte_get_main_lcore() != lc &&
rte_eal_get_lcore_state(lc) == RUNNING) {
RTE_LOG(ERR, USER1,
"%s(line=%u): lcore %u already in use\n",
diff --git a/examples/l4fwd/main.c b/examples/l4fwd/main.c
index 57e9cfd..266228d 100644
--- a/examples/l4fwd/main.c
+++ b/examples/l4fwd/main.c
@@ -271,13 +271,13 @@ main(int argc, char *argv[])
sig_handle(SIGQUIT);
/* launch all slave lcores. */
- RTE_LCORE_FOREACH_SLAVE(i) {
+ RTE_LCORE_FOREACH_WORKER(i) {
if (prm[i].be.lc != NULL || prm[i].fe.max_streams != 0)
rte_eal_remote_launch(lcore_main, prm + i, i);
}
/* launch master lcore. */
- i = rte_get_master_lcore();
+ i = rte_get_main_lcore();
if (prm[i].be.lc != NULL || prm[i].fe.max_streams != 0)
lcore_main(prm + i);