aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@gmail.com>2018-08-29 18:59:44 +0100
committerLuca Boccassi <luca.boccassi@gmail.com>2018-08-29 19:00:12 +0100
commit8e6d9d118f6105a3627b64a7949e1fb0b145879e (patch)
tree6494692bc19c7dd9cae2b16cf6e0ed7e90aa1da8 /examples
parent43192222b329b3c984687235b0081c7fbfe484ba (diff)
New upstream version 16.11.8upstream/16.11.8
Change-Id: I3d0a7da377a86fe41f3516c5a3c458746abc33fb Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/exception_path/main.c3
-rw-r--r--examples/ipsec-secgw/ipsec-secgw.c7
-rw-r--r--examples/l3fwd/l3fwd_em.c1
-rw-r--r--examples/l3fwd/l3fwd_lpm.c1
-rw-r--r--examples/multi_process/Makefile1
5 files changed, 9 insertions, 4 deletions
diff --git a/examples/exception_path/main.c b/examples/exception_path/main.c
index e70549be..9ab5054e 100644
--- a/examples/exception_path/main.c
+++ b/examples/exception_path/main.c
@@ -165,6 +165,9 @@ print_stats(void)
" Lcore Port RX TX Dropped on TX\n"
"------- ------ ------------ ------------ ---------------\n");
RTE_LCORE_FOREACH(i) {
+ /* limit ourselves to application supported cores only */
+ if (i >= APP_MAX_LCORE)
+ break;
printf("%6u %7u %13"PRIu64" %13"PRIu64" %16"PRIu64"\n",
i, (unsigned)port_ids[i],
lcore_stats[i].rx, lcore_stats[i].tx,
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 3c1ea16d..05c76459 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -304,6 +304,7 @@ prepare_tx_pkt(struct rte_mbuf *pkt, uint8_t port)
pkt->l3_len = sizeof(struct ip);
pkt->l2_len = ETHER_HDR_LEN;
+ ip->ip_sum = 0;
ethhdr->ether_type = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
} else {
pkt->ol_flags |= PKT_TX_IPV6;
@@ -477,11 +478,13 @@ outbound_sp(struct sp_ctx *sp, struct traffic_type *ip,
sa_idx = ip->res[i] & PROTECT_MASK;
if (ip->res[i] & DISCARD)
rte_pktmbuf_free(m);
+ else if (ip->res[i] & BYPASS)
+ ip->pkts[j++] = m;
else if (sa_idx < IPSEC_SA_MAX_ENTRIES) {
ipsec->res[ipsec->num] = sa_idx;
ipsec->pkts[ipsec->num++] = m;
- } else /* BYPASS */
- ip->pkts[j++] = m;
+ } else /* invalid SA idx */
+ rte_pktmbuf_free(m);
}
ip->num = j;
}
diff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c
index 46b327e1..6410e3cd 100644
--- a/examples/l3fwd/l3fwd_em.c
+++ b/examples/l3fwd/l3fwd_em.c
@@ -47,7 +47,6 @@
#include <rte_debug.h>
#include <rte_ether.h>
#include <rte_ethdev.h>
-#include <rte_mempool.h>
#include <rte_cycles.h>
#include <rte_mbuf.h>
#include <rte_ip.h>
diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c
index f6212697..ef65f9c3 100644
--- a/examples/l3fwd/l3fwd_lpm.c
+++ b/examples/l3fwd/l3fwd_lpm.c
@@ -46,7 +46,6 @@
#include <rte_debug.h>
#include <rte_ether.h>
#include <rte_ethdev.h>
-#include <rte_mempool.h>
#include <rte_cycles.h>
#include <rte_mbuf.h>
#include <rte_ip.h>
diff --git a/examples/multi_process/Makefile b/examples/multi_process/Makefile
index 6b315cc0..39306f30 100644
--- a/examples/multi_process/Makefile
+++ b/examples/multi_process/Makefile
@@ -41,5 +41,6 @@ include $(RTE_SDK)/mk/rte.vars.mk
DIRS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += client_server_mp
DIRS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += simple_mp
DIRS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += symmetric_mp
+DIRS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += l2fwd_fork
include $(RTE_SDK)/mk/rte.extsubdir.mk