UDP_Replay: changes for gateway packet forwarding 15/44315/1
authorAnand B Jyoti <anand.b.jyoti@intel.com>
Thu, 10 Aug 2017 20:58:13 +0000 (02:28 +0530)
committerDeepak S <deepak.s@linux.intel.com>
Wed, 4 Oct 2017 21:31:34 +0000 (14:31 -0700)
JIRA: SAMPLEVNF-70

Integrating gateway packet forwarding to UDP_Replay VNF.

Change-Id: I00f2bc498563b81260c2c98275f7a73dbc2cb445
Signed-off-by: Anand B Jyoti <anand.b.jyoti@intel.com>
VNFs/UDP_Replay/Makefile
VNFs/UDP_Replay/main.c

index e237577..08fcbba 100644 (file)
@@ -35,6 +35,7 @@ VPATH += $(VNF_CORE)/common/VIL/pipeline_passthrough
 VPATH += $(SRCDIR)/pipeline
 VPATH += $(VNF_CORE)/common/VIL/pipeline_txrx
 VPATH += $(VNF_CORE)/common/VIL/l2l3_stack
+VPATH += $(VNF_CORE)/common/VIL/gateway
 
 INC += $(wildcard *.h)
 INC += $(wildcard pipeline/*.h)
@@ -47,6 +48,7 @@ INC += $(wildcard $(VNF_CORE)/common/VIL/pipeline_master/*.h)
 INC += $(wildcard $(VNF_CORE)/common/VIL/pipeline_passthrough/*.h)
 INC += $(wildcard $(VNF_CORE)/common/VIL/pipeline_txrx/*.h)
 INC += $(wildcard $(VNF_CORE)/common/VIL/l2l3_stack/*.h)
+INC += $(wildcard $(VNF_CORE)/common/VIL/gateway/*.h)
 
 CFLAGS += -I$(SRCDIR) -mrtm -mhle -I$(SRCDIR)/pipeline -I$(VNF_CORE)/common/vnf_common
 CFLAGS += -I$(VNF_CORE)/common/VIL/conntrack -I$(VNF_CORE)/common/VIL/l2l3_stack
@@ -54,6 +56,7 @@ CFLAGS += -I$(VNF_CORE)/common/VIL/pipeline_common -I$(VNF_CORE)/common/VIL/pipe
 CFLAGS += -I$(VNF_CORE)/common/VIL/pipeline_master -I$(VNF_CORE)/common/VIL/pipeline_passthrough
 CFLAGS += -I$(VNF_CORE)/common/VIL/pipeline_txrx
 CFLAGS += -I$(VNF_CORE)/common/VIL/pipeline_arpicmp
+CFLAGS += -I$(VNF_CORE)/common/VIL/gateway
 
 # all source are stored in SRCS-y
 SRCS-y := main.c
@@ -84,6 +87,7 @@ SRCS-y += pipeline_loadb.c
 SRCS-y += pipeline_loadb_be.c
 SRCS-y += vnf_common.c
 SRCS-y += pipeline_arpicmp_be.c
+SRCS-y += gateway.c
 
 CFLAGS += -O3 $(USER_FLAGS)
 CFLAGS += $(WERROR_FLAGS)
index 1b37c18..56513c1 100644 (file)
@@ -94,6 +94,7 @@ performance of the solution should be sufficient for testing the UDP NAT perform
 #include "lib_icmpv6.h"
 #include "app.h"
 #include "vnf_common.h"
+#include "gateway.h"
 #define IN6ADDRSZ 16
 #define INADDRSZ 4
 #define APP_LOOKUP_EXACT_MATCH          0
@@ -2921,6 +2922,7 @@ main(int argc, char **argv)
        ifm_init();
        nb_ports = rte_eth_dev_count();
        num_ports = nb_ports;
+       gw_init(num_ports);
        if (nb_ports > RTE_MAX_ETHPORTS)
                nb_ports = RTE_MAX_ETHPORTS;