This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, master has been updated via 0bd1a1cea75d3788c062933e635849c35a0c6099 (commit) via 94071c18d342614d16b0a14f16f85119563dd70d (commit) from 54593e175a71f5716aa50e5a03be8c30bc15c550 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 0bd1a1cea75d3788c062933e635849c35a0c6099 Author: Maxim Uvarov maxim.uvarov@linaro.org Date: Fri Dec 23 18:19:51 2016 +0300
test: linux-gen: vlan insertion: reduce memory pool
save some run time memory asking for smaller pool.
Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org Reviewed-and-tested-by: Bill Fischofer bill.fischofer@linaro.org
diff --git a/test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.c b/test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.c index 19094b5..e91a9d0 100644 --- a/test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.c +++ b/test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.c @@ -12,8 +12,8 @@ #include <odp_api.h> #include <odp/helper/odph_api.h>
-#define POOL_NUM_PKT 8192 -#define POOL_SEG_LEN 1856 +#define POOL_NUM_PKT 100 +#define POOL_SEG_LEN 1500 #define MAX_PKT_BURST 32 #define MAX_WORKERS 1
commit 94071c18d342614d16b0a14f16f85119563dd70d Author: Maxim Uvarov maxim.uvarov@linaro.org Date: Fri Dec 23 18:19:50 2016 +0300
test: linux-gen: vlan insertion: add time-out exit
signal can be ignored and app will not exit cleanly, add time-out on recv to exit after that time.
Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org Reviewed-and-tested-by: Bill Fischofer bill.fischofer@linaro.org
diff --git a/test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.c b/test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.c index bda810e..19094b5 100644 --- a/test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.c +++ b/test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.c @@ -17,7 +17,6 @@ #define MAX_PKT_BURST 32 #define MAX_WORKERS 1
-static volatile int exit_thr; static int g_ret;
struct { @@ -27,12 +26,6 @@ struct { odph_ethaddr_t src, dst; } global;
-static void sig_handler(int signo ODP_UNUSED) -{ - printf("sig_handler!\n"); - exit_thr = 1; -} - static odp_pktio_t create_pktio(const char *name, odp_pool_t pool, odp_pktin_queue_t *pktin, odp_pktout_queue_t *pktout) @@ -83,6 +76,7 @@ static int run_worker(void *arg ODP_UNUSED) odp_packet_t pkt_tbl[MAX_PKT_BURST]; int pkts, sent, tx_drops, i; int total_pkts = 0; + uint64_t wait_time = odp_pktin_wait_time(2 * ODP_TIME_SEC_IN_NS);
if (odp_pktio_start(global.if0)) { printf("unable to start input interface\n"); @@ -96,12 +90,14 @@ static int run_worker(void *arg ODP_UNUSED) printf("started output interface\n"); printf("started all\n");
- while (!exit_thr) { + while (1) { pkts = odp_pktin_recv_tmo(global.if0in, pkt_tbl, MAX_PKT_BURST, - ODP_PKTIN_NO_WAIT); + wait_time); + if (odp_unlikely(pkts <= 0)) { + printf("recv tmo!\n"); + break; + }
- if (odp_unlikely(pkts <= 0)) - continue; for (i = 0; i < pkts; i++) { odp_packet_t pkt = pkt_tbl[i]; odph_ethhdr_t *eth; @@ -123,6 +119,8 @@ static int run_worker(void *arg ODP_UNUSED) odp_packet_free_multi(&pkt_tbl[sent], tx_drops); }
+ printf("Total send packets: %d\n", total_pkts); + if (total_pkts < 10) g_ret = -1;
@@ -206,8 +204,6 @@ int main(int argc, char **argv) thr_params.thr_type = ODP_THREAD_WORKER; thr_params.instance = instance;
- signal(SIGINT, sig_handler); - odph_odpthreads_create(thd, &cpumask, &thr_params); odph_odpthreads_join(thd);
diff --git a/test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.sh b/test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.sh index 0aa5e3f..3c6df8e 100755 --- a/test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.sh +++ b/test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.sh @@ -11,6 +11,7 @@ # linux-generic packet mmap pktio. # # +export ODP_PKTIO_DISABLE_SOCKET_MMSG=1
# directory where platform test sources are, including scripts TEST_SRC_DIR=$(dirname $0) @@ -64,19 +65,11 @@ PCAP_OUT=vlan_out.pcap # Listen on veth pipe and write to pcap Send pcap plat_mmap_vlan_ins${EXEEXT} pktiop0p1 pcap:out=${PCAP_OUT} \ 00:02:03:04:05:06 00:08:09:0a:0b:0c & -P1=$! # Send pcap file to veth interface -plat_mmap_vlan_ins${EXEEXT} pcap:in=${PCAP_IN} pktiop0p1 \ - 01:02:03:04:05:06 01:08:09:0a:0b:0c & -P2=$! +plat_mmap_vlan_ins${EXEEXT} pcap:in=${PCAP_IN} pktiop1p0 \ + 01:02:03:04:05:06 01:08:09:0a:0b:0c
-sleep 1 -kill -s INT ${P1} -kill -s INT ${P2} - -ret=$? rm -f ${PCAP_OUT} - cleanup_pktio_env
-exit $ret +exit 0
-----------------------------------------------------------------------
Summary of changes: test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.c | 26 ++++++++++------------- test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.sh | 15 ++++--------- 2 files changed, 15 insertions(+), 26 deletions(-)
hooks/post-receive