[lng-odp] [PATCH v1] validation: timer: save expected expiration tick only on success
otherwise tt[i].tick in handle_tmo will be a wrong value in case timer set failed due to ODP_TIMER_NOEVENT(failed to cancel the outstanding timer). some hardware timer implementations needs at least two ticks gap between current tick and future tick to cancel the outstanding active timer. Signed-off-by: Jerin Jacob jerin.ja...@caviumnetworks.com Reviewed-by: Ola Liljedahl ola.liljed...@linaro.org --- v1: enclosed braces around the new if check as other if/else-branches use braces test/validation/odp_timer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/validation/odp_timer.c b/test/validation/odp_timer.c index 554b353..88f5208 100644 --- a/test/validation/odp_timer.c +++ b/test/validation/odp_timer.c @@ -365,9 +365,10 @@ static void *worker_entrypoint(void *arg TEST_UNUSED) } else if (rc != ODP_TIMER_SUCCESS) { /* Set/reset failed, timer already expired */ ntoolate++; + } else if (rc == ODP_TIMER_SUCCESS) { + /* Save expected expiration tick on success */ + tt[i].tick = cur_tick + tck; } - /* Save expected expiration tick */ - tt[i].tick = cur_tick + tck; } struct timespec ts; ts.tv_sec = 0; -- 2.1.0 ___ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp
[lng-odp] [Bug 1383] validation: pktio check for poll queue type
https://bugs.linaro.org/show_bug.cgi?id=1383 Maxim Uvarov maxim.uva...@linaro.org changed: What|Removed |Added Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED --- Comment #2 from Maxim Uvarov maxim.uva...@linaro.org --- commit a6d1ce8e83eb599e1ac67b7995d8738c6debe702 Author: Maxim Uvarov maxim.uva...@linaro.org Date: Tue Jun 2 17:46:06 2015 +0300 validation: pktio: do not dequeue from scheduled queue packet i/o test can create 2 types of queues: scheduled and polled. Do not do dequeue from scheduled queue. https://bugs.linaro.org/show_bug.cgi?id=1383 Signed-off-by: Maxim Uvarov maxim.uva...@linaro.org Reviewed-by: Balasubramanian Manoharan bala.manoha...@linaro.org -- You are receiving this mail because: You are the assignee for the bug.___ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp
Re: [lng-odp] [PATCH] validation: pktio: do not dequeue from scheduled queue
Merged, Maxim. On 06/09/15 07:53, Bala Manoharan wrote: Reviewed-by: Balasubramanian Manoharan bala.manoha...@linaro.org mailto:bala.manoha...@linaro.org On 2 June 2015 at 20:16, Maxim Uvarov maxim.uva...@linaro.org mailto:maxim.uva...@linaro.org wrote: packet i/o test can create 2 types of queues: scheduled and polled. Do not do dequeue from scheduled queue. https://bugs.linaro.org/show_bug.cgi?id=1383 Signed-off-by: Maxim Uvarov maxim.uva...@linaro.org mailto:maxim.uva...@linaro.org --- test/validation/odp_pktio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/validation/odp_pktio.c b/test/validation/odp_pktio.c index 7c1a666..e1025d6 100644 --- a/test/validation/odp_pktio.c +++ b/test/validation/odp_pktio.c @@ -319,7 +319,8 @@ static odp_packet_t wait_for_packet(odp_queue_t queue, start = odp_time_cycles(); do { - if (queue != ODP_QUEUE_INVALID) + if (queue != ODP_QUEUE_INVALID + odp_queue_type(queue) == ODP_QUEUE_TYPE_POLL) ev = queue_deq_wait_time(queue, ns); else ev = odp_schedule(NULL, ns); -- 1.9.1 ___ lng-odp mailing list lng-odp@lists.linaro.org mailto:lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp ___ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp
[lng-odp] Re: [PATCH] validation: pktio: do not dequeue from scheduled queue
Ping. Please review. Maxim. On 06/02/15 17:46, Maxim Uvarov wrote: packet i/o test can create 2 types of queues: scheduled and polled. Do not do dequeue from scheduled queue. https://bugs.linaro.org/show_bug.cgi?id=1383 Signed-off-by: Maxim Uvarov maxim.uva...@linaro.org --- test/validation/odp_pktio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/validation/odp_pktio.c b/test/validation/odp_pktio.c index 7c1a666..e1025d6 100644 --- a/test/validation/odp_pktio.c +++ b/test/validation/odp_pktio.c @@ -319,7 +319,8 @@ static odp_packet_t wait_for_packet(odp_queue_t queue, start = odp_time_cycles(); do { - if (queue != ODP_QUEUE_INVALID) + if (queue != ODP_QUEUE_INVALID + odp_queue_type(queue) == ODP_QUEUE_TYPE_POLL) ev = queue_deq_wait_time(queue, ns); else ev = odp_schedule(NULL, ns); -- You received this message because you are subscribed to the Google Groups [Frozen] LNG ODP Sub-team - lng-...@linaro.org group. Visit this group at http://groups.google.com/a/linaro.org/group/lng-odp/. To unsubscribe from this group and stop receiving emails from it, send an email to lng-odp+unsubscr...@linaro.org. ___ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp
Re: [lng-odp] [PATCH] validation: pktio: do not dequeue from scheduled queue
Reviewed-by: Balasubramanian Manoharan bala.manoha...@linaro.org On 2 June 2015 at 20:16, Maxim Uvarov maxim.uva...@linaro.org wrote: packet i/o test can create 2 types of queues: scheduled and polled. Do not do dequeue from scheduled queue. https://bugs.linaro.org/show_bug.cgi?id=1383 Signed-off-by: Maxim Uvarov maxim.uva...@linaro.org --- test/validation/odp_pktio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/validation/odp_pktio.c b/test/validation/odp_pktio.c index 7c1a666..e1025d6 100644 --- a/test/validation/odp_pktio.c +++ b/test/validation/odp_pktio.c @@ -319,7 +319,8 @@ static odp_packet_t wait_for_packet(odp_queue_t queue, start = odp_time_cycles(); do { - if (queue != ODP_QUEUE_INVALID) + if (queue != ODP_QUEUE_INVALID + odp_queue_type(queue) == ODP_QUEUE_TYPE_POLL) ev = queue_deq_wait_time(queue, ns); else ev = odp_schedule(NULL, ns); -- 1.9.1 ___ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp ___ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp
Re: [lng-odp] [PATCH] doc: use only WITH_PLATFORM and not always linux-generic
What we did to avoid pointing into the linux-generic folder in the Makefiles is use symlinks to linux-generic sources. This way we keep the linux-generic files up-to-date when pulling but avoid build dependencies between platform folders. On 06/06/2015 12:22 AM, Bill Fischofer wrote: The linux-generic platform is indeed used as a base class however given this it would seem that the include order should be reversed so that $(WITH_PLATFORM) is first. This would have the effect of allowing it to override any linux-generic include files of the same name. On Fri, Jun 5, 2015 at 3:14 PM, Mike Holmes mike.hol...@linaro.org mailto:mike.hol...@linaro.org wrote: This works for linux-generic, but derived platforms such as odp-dpdk depend on this link back to linux-generic becasue they inherit from it. Having this in linux-generic makes it simpler for the derived works, but I could also see the argument that it should be removed in linux-generic and added back into to odp-dpdk, odp-KS2 and odp-netmap. I think I agree with this patch, but welcome others thoughts on how much the reference code should include support it does not itsself need so that it helps other platforms. On 5 June 2015 at 08:22, Nicolas Morey-Chaisemartin nmo...@kalray.eu mailto:nmo...@kalray.eu wrote: Signed-off-by: Nicolas Morey-Chaisemartin nmo...@kalray.eu mailto:nmo...@kalray.eu --- doc/doxygen.cfg | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/doxygen.cfg b/doc/doxygen.cfg index 6283387..213a903 100644 --- a/doc/doxygen.cfg +++ b/doc/doxygen.cfg @@ -13,7 +13,6 @@ WARN_NO_PARAMDOC = YES INPUT = $(SRCDIR)/doc \ $(SRCDIR)/doc/users-guide \ $(SRCDIR)/include \ - $(SRCDIR)/platform/linux-generic/include/odp \ $(SRCDIR)/platform/$(WITH_PLATFORM)/include/odp \ $(SRCDIR)/helper/include FILE_PATTERNS = *.h odp*.c *.dox ___ lng-odp mailing list lng-odp@lists.linaro.org mailto:lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp -- Mike Holmes Technical Manager - Linaro Networking Group Linaro.org http://www.linaro.org/* **│ *Open source software for ARM SoCs ___ lng-odp mailing list lng-odp@lists.linaro.org mailto:lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp ___ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp
[lng-odp] [ODP/RFC 2/2] example: egress classifier example
From: Balasubramanian Manoharan bala.manoha...@linaro.org This is a vlan priority based L2 loopback application which creates multiple packet output queues for each vlan priority value and attaches them to the given pktio interface. The packets are enqueued into different packet output queues based on their vlan priority values and the user can configure the CIR, PIR, CBS and PBS values for each of the packet output queues. The user can also set a port level rate limitting value. Signed-off-by: Balasubramanian Manoharan bala.manoha...@linaro.org --- Makefile.am | 2 +- configure.ac| 1 + example/Makefile.am | 2 +- example/egress/Makefile.am | 10 + example/egress/odp_egress.c | 702 5 files changed, 715 insertions(+), 2 deletions(-) create mode 100644 example/egress/Makefile.am create mode 100644 example/egress/odp_egress.c diff --git a/Makefile.am b/Makefile.am index b9b2517..72be426 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -ACLOCAL_AMFLAGS=-I m4 +ACLOCAL_AMFLAGS=-I m4 -g AUTOMAKE_OPTIONS = foreign SUBDIRS = doc platform example test helper scripts diff --git a/configure.ac b/configure.ac index 89b0846..ce70ca0 100644 --- a/configure.ac +++ b/configure.ac @@ -287,6 +287,7 @@ AC_CONFIG_FILES([Makefile doc/Makefile example/Makefile example/classifier/Makefile +example/egress/Makefile example/generator/Makefile example/ipsec/Makefile example/packet/Makefile diff --git a/example/Makefile.am b/example/Makefile.am index 353f397..6ea51ab 100644 --- a/example/Makefile.am +++ b/example/Makefile.am @@ -1 +1 @@ -SUBDIRS = classifier generator ipsec packet timer +SUBDIRS = classifier egress generator ipsec packet timer diff --git a/example/egress/Makefile.am b/example/egress/Makefile.am new file mode 100644 index 000..1d62daa --- /dev/null +++ b/example/egress/Makefile.am @@ -0,0 +1,10 @@ +include $(top_srcdir)/example/Makefile.inc + +bin_PROGRAMS = odp_egress +odp_egress_LDFLAGS = $(AM_LDFLAGS) -static +odp_egress_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/example + +noinst_HEADERS = \ + $(top_srcdir)/example/example_debug.h + +dist_odp_egress_SOURCES = odp_egress.c diff --git a/example/egress/odp_egress.c b/example/egress/odp_egress.c new file mode 100644 index 000..969b1e3 --- /dev/null +++ b/example/egress/odp_egress.c @@ -0,0 +1,702 @@ +/* Copyright (c) 2015, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#define _POSIX_C_SOURCE 200112L +#include time.h +#include stdio.h +#include stdlib.h +#include string.h +#include getopt.h +#include unistd.h +#include example_debug.h + +#include odp.h +#include odp/helper/linux.h +#include odp/helper/eth.h +#include odp/helper/ip.h +#include strings.h +#include errno.h + +/** @def MAX_WORKERS + * @brief Maximum number of worker threads + */ +#define MAX_WORKERS32 + +/** @def SHM_PKT_POOL_SIZE + * @brief Size of the shared memory block + */ +#define SHM_PKT_POOL_SIZE (1024 * 2048) + +/** @def SHM_PKT_POOL_BUF_SIZE + * @brief Buffer size of the packet pool buffer + */ +#define SHM_PKT_POOL_BUF_SIZE 1856 + +/** @def MAX_VLAN_PRIO + * @brief Maximum vlan priority value + */ +#define MAX_VLAN_PRIO 8 + +/** Get rid of path in filename - only for unix-type paths using '/' */ +#define NO_PATH(file_name) (strrchr((file_name), '/') ? \ + strrchr((file_name), '/') + 1 : (file_name)) + +typedef struct { + int appl_mode; /** application mode */ + int cpu_count; /** Number of CPUs to use */ + uint32_t time; /** Number of seconds to run */ + char *if_name; /** pointer to interface names */ + odp_atomic_u64_t total_packets; /** total received packets */ + odp_atomic_u64_t drop_packets; /** packets dropped */ + odp_pktout_queue_t outq[MAX_VLAN_PRIO]; + uint32_t cir_kbps[MAX_VLAN_PRIO]; + uint32_t pir_kbps[MAX_VLAN_PRIO]; + uint32_t cbs_bytes[MAX_VLAN_PRIO]; + uint32_t pbs_bytes[MAX_VLAN_PRIO]; + uint32_t rate_kbps; + uint32_t burst_byte; +} appl_args_t; + +/* helper funcs */ +static int drop_err_pkts(odp_packet_t pkt_tbl[], unsigned len); +static void swap_pkt_addrs(odp_packet_t pkt_tbl[], unsigned len); +static void parse_args(int argc, char *argv[], appl_args_t *appl_args); +static void print_info(char *progname, appl_args_t *appl_args); +static void usage(char *progname); +static int parse_vlan_conf(appl_args_t *appl_args, char *argv[], char *optarg); + +static inline +void statistics(appl_args_t *args) +{ + int i; + uint32_t timeout; + int infinite = 0; + struct timespec t; + + t.tv_sec = 0; + t.tv_nsec = 10 * 1000 * 1000; /* 10 milli second */ + + printf(\n); + for (i = 0; i 80; i++) +
Re: [lng-odp] [API-NEXT PATCH v3 0/9] Handle unsent packets
On 06/05/15 22:19, Bill Fischofer wrote: This series applies and builds fine, however with check-odp I'm seeing consistent failures on the odp_pktio tests. I double checked and am seeing the same with the base odp.git code so not sure what changed (don't think these patches really changed anything in that regard). it might happen if you did some dev work and have virtual interfaces up. It's better to run tests after clean reboot. Maxim. On Fri, Jun 5, 2015 at 12:51 PM, Zoltan Kiss zoltan.k...@linaro.org mailto:zoltan.k...@linaro.org wrote: This series clarifies what happens when not all packets were sent, whether in odp_pktio_send() or odp_queue_enq*(). It also introduces odp_event_free() to make it easier the release of an event with not obvious type. It also fixes the many places in the examples and tests where this issue were not handled properly. Signed-off-by: Zoltan Kiss zoltan.k...@linaro.org mailto:zoltan.k...@linaro.org ___ lng-odp mailing list lng-odp@lists.linaro.org mailto:lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp ___ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp ___ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp
Re: [lng-odp] [API-NEXT PATCH v3 0/9] Handle unsent packets
On 06/05/15 22:19, Bill Fischofer wrote: This series applies and builds fine, however with check-odp I'm seeing consistent failures on the odp_pktio tests. I double checked and am seeing the same with the base odp.git code so not sure what changed (don't think these patches really changed anything in that regard). hm, I can also reproduce fail with this patch applied: Core was generated by `./odp_queue'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00402823 in _odp_buffer_type (buf=0x7ffc1b40d890) at odp_buffer.c:47 47return hdr-type; (gdb) l 42 43int _odp_buffer_type(odp_buffer_t buf) 44{ 45odp_buffer_hdr_t *hdr = odp_buf_to_hdr(buf); 46 47return hdr-type; 48} 49 50void _odp_buffer_type_set(odp_buffer_t buf, int type) 51{ (gdb) p hdr $1 = (odp_buffer_hdr_t *) 0x2b938bdb5480 (gdb) p hdr-type Cannot access memory at address 0x2b938bdb549c (gdb) (gdb) bt #0 0x00402823 in _odp_buffer_type (buf=0x7ffc1b40d890) at odp_buffer.c:47 #1 0x00402b1e in odp_event_type (event=0x7ffc1b40d890) at odp_event.c:22 #2 0x00402b39 in odp_event_free (event=0x7ffc1b40d890) at odp_event.c:27 #3 0x00402296 in test_odp_queue_sunnyday () at odp_queue.c:96 #4 0x2b933249f482 in run_single_test () from /usr/local/lib/libcunit.so.1 #5 0x2b933249f0b2 in run_single_suite () from /usr/local/lib/libcunit.so.1 #6 0x2b933249cd55 in CU_run_all_tests () from /usr/local/lib/libcunit.so.1 #7 0x2b93324a1245 in basic_run_all_tests () from /usr/local/lib/libcunit.so.1 #8 0x2b93324a0fe7 in CU_basic_run_tests () from /usr/local/lib/libcunit.so.1 #9 0x004025c3 in main () at common/odp_cunit_common.c:86 On Fri, Jun 5, 2015 at 12:51 PM, Zoltan Kiss zoltan.k...@linaro.org mailto:zoltan.k...@linaro.org wrote: This series clarifies what happens when not all packets were sent, whether in odp_pktio_send() or odp_queue_enq*(). It also introduces odp_event_free() to make it easier the release of an event with not obvious type. It also fixes the many places in the examples and tests where this issue were not handled properly. Signed-off-by: Zoltan Kiss zoltan.k...@linaro.org mailto:zoltan.k...@linaro.org ___ lng-odp mailing list lng-odp@lists.linaro.org mailto:lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp ___ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp ___ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp
Re: [lng-odp] [PATCHv3 0/8] pktio test move to platform side
We need that test case run also: mkidr /tmp/t11 cd /tmp/t11 ../../../...odp.git/configure --enable-test-vald --enable-test-perf --enable-test-cpp --enable-debug CFLAGS=-O0 -g --enable-debug --enable-debug-print make cd /tmp/t11/test/validation/pktio ../../../../../odp.git/platform/linux-generic/test/pktio/pktio_run pktio_run: pktio_main: not found Thanks, Maxim. On 06/04/15 21:06, Christophe Milard wrote: since v2: -history rewritten regarding PRE_LDADD -missing .gitignore added -correction for finding pktio_main in different cases -patch 8 added, removing obsolete test environment variables in validation -- This series of patches comes following the request from Stuart to see the effect of the new test structure on module pktio rather than on a simpler module, such as 'random'. Please, review carefully, keeping in mind that many of you have a better and larger view on the whole environment... I can miss things :-) ... Be also aware that after applying these patches, you end up with a mixed environment: pktio will be ran from the platform side, while all other tests will still be ran from the validation side: as a consequence, you will notice that: - the make check grand total (19 PASS) is now split 18 + 1: this split will remain untill all tests are moved to the platform side. - despite the creation of pktio own Makefile.am, a lot of complexity remains in the validation Makefile.am: the complexity of the validation/Makefile.am will reduce as tests gets moved, resulting in a simple list of modules. - the tests results will spread between the validation and the platform sides. I expect this to remain (depending on whether the test was platform dependent, or not). This approach also requires to build the things in the following order: 1) ODP (i.e: platform/platform/ things) 2) the platform agnostic tests (i.e: validation/test/ things), using ODP. 3) the platform dependent tests (platform/platform/test) This changed is introduced by patch 0005-validation-changing-build-order.patch which is a hack to workaround what seems to be an autotools limitation: SUBDIRS = @MACRO@ works, while SUBDIRS = xxx/@MACRO@/yyy does not work. This is hopefully a temporary fix as I assume that this directory structure will change: Having the ODP code in platform/platform/* and the tests in platform/platform/tests seems to imply that tests are a subpart of ODP, which is not true. When this patch is accepted, other modeles conversion will follows. thanks for your time. Christophe Milard (8): validation: preparing for main in tests validation: own main in odp_pktio.c validation: renaming in odp_pktio.c validation: cosmetic fixes in odp_pktio.c validation: creating own dir and lib for pktio validation: changing build order validation: moving pktio plt specific to platform validation: removing obsolete environment variable Makefile.am| 9 ++- configure.ac | 6 +- platform/Makefile.am | 1 - platform/linux-generic/Makefile.am | 2 - platform/linux-generic/test/.gitignore | 2 + platform/linux-generic/test/Makefile.am| 9 ++- platform/linux-generic/test/pktio/.gitignore | 2 + platform/linux-generic/test/pktio/Makefile.am | 2 + platform/linux-generic/test/{ = pktio}/pktio_env | 0 .../linux-generic/test/pktio/pktio_run | 49 ++-- test/Makefile.inc | 7 +- test/performance/odp_l2fwd_run | 4 +- test/validation/.gitignore | 1 - test/validation/Makefile.am| 51 ++--- test/validation/Makefile.inc | 7 ++ test/validation/common/.gitignore | 2 + test/validation/common/Makefile.am | 10 +++ test/validation/common/odp_cunit_common.c | 18 +++-- test/validation/common/odp_cunit_common.h | 3 + test/validation/pktio/.gitignore | 2 + test/validation/pktio/Makefile.am | 8 ++ test/validation/{odp_pktio.c = pktio/pktio.c} | 89 +++--- test/validation/pktio/pktio.h | 7 ++ test/validation/pktio/pktio_main.c | 12 +++ 24 files changed, 186 insertions(+), 117 deletions(-) delete mode 100644 platform/Makefile.am create mode 100644 platform/linux-generic/test/.gitignore create mode 100644 platform/linux-generic/test/pktio/.gitignore create mode 100644 platform/linux-generic/test/pktio/Makefile.am rename platform/linux-generic/test/{ = pktio}/pktio_env (100%) rename test/validation/odp_pktio_run = platform/linux-generic/test/pktio/pktio_run (52%) create mode 100644 test/validation/Makefile.inc create mode 100644 test/validation/common/.gitignore
Re: [lng-odp] [API-NEXT PATCH v3 0/9] Handle unsent packets
I'm running in a standard Ubuntu VM: bill@ubuntu:~/linaro$ ifconfig eth1 Link encap:Ethernet HWaddr 00:1c:42:77:a3:f0 inet addr:10.211.55.3 Bcast:10.211.55.255 Mask:255.255.255.0 inet6 addr: fdb2:2c26:f4e4:0:d9b0:4a97:17f8:b876/64 Scope:Global inet6 addr: fdb2:2c26:f4e4:0:21c:42ff:fe77:a3f0/64 Scope:Global inet6 addr: fe80::21c:42ff:fe77:a3f0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:4685 errors:0 dropped:0 overruns:0 frame:0 TX packets:631 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:646608 (646.6 KB) TX bytes:105066 (105.0 KB) loLink encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:565 errors:0 dropped:0 overruns:0 frame:0 TX packets:565 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:39018 (39.0 KB) TX bytes:39018 (39.0 KB) bill@ubuntu:~/linaro$ On Mon, Jun 8, 2015 at 5:29 AM, Maxim Uvarov maxim.uva...@linaro.org wrote: On 06/05/15 22:19, Bill Fischofer wrote: This series applies and builds fine, however with check-odp I'm seeing consistent failures on the odp_pktio tests. I double checked and am seeing the same with the base odp.git code so not sure what changed (don't think these patches really changed anything in that regard). it might happen if you did some dev work and have virtual interfaces up. It's better to run tests after clean reboot. Maxim. On Fri, Jun 5, 2015 at 12:51 PM, Zoltan Kiss zoltan.k...@linaro.org mailto:zoltan.k...@linaro.org wrote: This series clarifies what happens when not all packets were sent, whether in odp_pktio_send() or odp_queue_enq*(). It also introduces odp_event_free() to make it easier the release of an event with not obvious type. It also fixes the many places in the examples and tests where this issue were not handled properly. Signed-off-by: Zoltan Kiss zoltan.k...@linaro.org mailto:zoltan.k...@linaro.org ___ lng-odp mailing list lng-odp@lists.linaro.org mailto:lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp ___ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp ___ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp ___ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp
[lng-odp] [ODP/RFC 1/2] linux-generic: egress classification implementation
From: Balasubramanian Manoharan bala.manoha...@linaro.org This is linux-generic implementation of egress classification. This is a lock-less implementation for output packet scheduling, shaping and rate limitting. Multiple packet output queues with different priority values can be created and attached with pktio interface and the packet enqueued into the output queues will be scheduled based on the priority value. Committed Information Rate, Committed Burst Size, Peak Information Rate and Peak Burst Size can be set individually on each packet output queues. Rate limitting can also be set on a pktio interface. The implementation supports multiple hierarchy level of packet scheduling but since the current APIs are defined only for a single level, this version of the implementation supports only one hierarchy level. Once the APIs are finalized for multiple hierarchy level the same will be incorporated. Signed-off-by: Balasubramanian Manoharan bala.manoha...@linaro.org --- include/odp.h | 1 + include/odp/api/pktout.h | 276 + platform/linux-generic/Makefile.am | 4 + platform/linux-generic/include/odp/pktout.h| 30 ++ .../linux-generic/include/odp/plat/pktout_types.h | 44 ++ platform/linux-generic/include/odp_internal.h | 3 + .../linux-generic/include/odp_packet_io_internal.h | 12 +- .../include/odp_packet_out_internal.h | 164 platform/linux-generic/odp_init.c | 5 + platform/linux-generic/odp_packet_io.c | 49 ++- platform/linux-generic/odp_packet_out.c| 454 + 11 files changed, 1027 insertions(+), 15 deletions(-) create mode 100644 include/odp/api/pktout.h create mode 100644 platform/linux-generic/include/odp/pktout.h create mode 100644 platform/linux-generic/include/odp/plat/pktout_types.h create mode 100644 platform/linux-generic/include/odp_packet_out_internal.h create mode 100644 platform/linux-generic/odp_packet_out.c diff --git a/include/odp.h b/include/odp.h index 2bac510..b8df7d3 100644 --- a/include/odp.h +++ b/include/odp.h @@ -38,6 +38,7 @@ extern C { #include odp/shared_memory.h #include odp/buffer.h #include odp/pool.h +#include odp/pktout.h #include odp/queue.h #include odp/ticketlock.h #include odp/time.h diff --git a/include/odp/api/pktout.h b/include/odp/api/pktout.h new file mode 100644 index 000..0d64a61 --- /dev/null +++ b/include/odp/api/pktout.h @@ -0,0 +1,276 @@ +/* Copyright (c) 2015, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @file + * + * ODP packet descriptor + */ + +#ifndef ODP_API_PACKET_OUT_H_ +#define ODP_API_PACKET_OUT_H_ + +#ifdef __cplusplus +extern C { +#endif + +#include odp/std_types.h +#include odp/buffer.h +#include odp/packet_io.h +#include odp/schedule.h + +/** + * Number of packet output scheduling priorities per pktio interface + * This function returns the number of pktout scheduling priority + * supported in the platform per pktio interface. + * + * @param[in] pktio pktio handle + * + * @retval Number of packet output scheduling priorities + * @retval 1 if the pktio does not support pktout priority + */ +int odp_pktout_num_prio(odp_pktio_t pktio); + +/** +* Gets the total number of hierarchy level supported by the platform +* for output packet shaping and scheduling +* +* @return Total number of hierarchy supported +*/ +uint8_t odp_pktout_num_heirarchy(void); + +/* Get Maximum nuber of packet output queues that can be attached with +* the given pktio interface. This will be the total number of packet output +* queues supported by the pktio interface. This number is different from the +* pktout node which are points in the hierarchial tree. +* +* @param[in] pktio pktio handle +* +* @retval Number of output queues that can be attached to the +* given pktio handle +* @retval 1 if the pktout scheduling is not supported +*/ +uint32_t odp_pktout_max_queues(odp_pktio_t pktio); + +/* Assign outq to pktio interface +* Sets the outq into the pktio interface, Any queues that maybe previously +* associated with this pktio will be superseded by this queue array. +* The number of queues associate in the pktio interface must not exceed the +* maximum supported output queue given by odp_pktout_max_queues() function +* for the same pktio interface. +* Calling this function with num_queues set to zero will disassociate all +* the queues that are linked to this pktio interface +* +* @param[in] pktio pktio handle +* @param[in] queue_hdl[] Array of queue handles +* @param[in] num_queues Number of queue handles in the array +* +* @return Number of queues associated +* 0 in case of failure +*/ +int odp_pktout_set_queues(odp_pktio_t pktio, +
[lng-odp] Build issue
I'm seeing this this morning: bill@ubuntu:~/linaro$ git clone http://git.linaro.org/lng/odp.git odpbase Cloning into 'odpbase'... remote: Counting objects: 9284, done. remote: Compressing objects: 100% (6884/6884), done. remote: Total 9284 (delta 6942), reused 2675 (delta 2081) Receiving objects: 100% (9284/9284), 2.07 MiB | 1.52 MiB/s, done. Resolving deltas: 100% (6942/6942), done. Checking connectivity... done. bill@ubuntu:~/linaro$ cd odpbase bill@ubuntu:~/linaro/odpbase$ ./bootstrap + aclocal -I config -I m4 + libtoolize --copy libtoolize: putting auxiliary files in `.'. libtoolize: copying file `./ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'. libtoolize: copying file `m4/libtool.m4' libtoolize: copying file `m4/ltoptions.m4' libtoolize: copying file `m4/ltsugar.m4' libtoolize: copying file `m4/ltversion.m4' libtoolize: copying file `m4/lt~obsolete.m4' + autoheader + automake --add-missing --copy configure.ac:7: installing './compile' configure.ac:22: installing './config.guess' configure.ac:22: installing './config.sub' configure.ac:3: installing './install-sh' configure.ac:3: installing './missing' example/classifier/Makefile.am: installing './depcomp' parallel-tests: installing './test-driver' + autoconf bill@ubuntu:~/linaro/odpbase$ ./configure --with-platform=linux-generic --enable-cunit-support checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking for style of include used by make... GNU checking for gcc... gcc checking whether the C compiler works... no configure: error: in `/home/bill/linaro/odpbase': configure: error: C compiler cannot create executables See `config.log' for more details bill@ubuntu:~/linaro/odpbase$ Not sure what changed. Anyone else seeing this? ___ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp
Re: [lng-odp] Build issue
I'm working with Maxim on this. It seems like the latest Ubuntu 14.10 service may have broken gcc. Investigating. On Mon, Jun 8, 2015 at 7:00 AM, Mike Holmes mike.hol...@linaro.org wrote: CI appears to be failing only for the usual suspects https://ci.linaro.org/view/odp-ci/job/odp-publish/ On 8 June 2015 at 07:14, Bill Fischofer bill.fischo...@linaro.org wrote: I'm seeing this this morning: bill@ubuntu:~/linaro$ git clone http://git.linaro.org/lng/odp.git odpbase Cloning into 'odpbase'... remote: Counting objects: 9284, done. remote: Compressing objects: 100% (6884/6884), done. remote: Total 9284 (delta 6942), reused 2675 (delta 2081) Receiving objects: 100% (9284/9284), 2.07 MiB | 1.52 MiB/s, done. Resolving deltas: 100% (6942/6942), done. Checking connectivity... done. bill@ubuntu:~/linaro$ cd odpbase bill@ubuntu:~/linaro/odpbase$ ./bootstrap + aclocal -I config -I m4 + libtoolize --copy libtoolize: putting auxiliary files in `.'. libtoolize: copying file `./ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'. libtoolize: copying file `m4/libtool.m4' libtoolize: copying file `m4/ltoptions.m4' libtoolize: copying file `m4/ltsugar.m4' libtoolize: copying file `m4/ltversion.m4' libtoolize: copying file `m4/lt~obsolete.m4' + autoheader + automake --add-missing --copy configure.ac:7: installing './compile' configure.ac:22: installing './config.guess' configure.ac:22: installing './config.sub' configure.ac:3: installing './install-sh' configure.ac:3: installing './missing' example/classifier/Makefile.am: installing './depcomp' parallel-tests: installing './test-driver' + autoconf bill@ubuntu:~/linaro/odpbase$ ./configure --with-platform=linux-generic --enable-cunit-support checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking for style of include used by make... GNU checking for gcc... gcc checking whether the C compiler works... no configure: error: in `/home/bill/linaro/odpbase': configure: error: C compiler cannot create executables See `config.log' for more details bill@ubuntu:~/linaro/odpbase$ Not sure what changed. Anyone else seeing this? ___ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp -- Mike Holmes Technical Manager - Linaro Networking Group Linaro.org http://www.linaro.org/ *│ *Open source software for ARM SoCs ___ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp
Re: [lng-odp] [API-NEXT PATCH v3 0/9] Handle unsent packets
I've found where the problem is, I'll send a new version of this series, but first I would like some more reviews about the rest of the series. See my reply to the last patch. Zoli On 08/06/15 11:55, Maxim Uvarov wrote: On 06/05/15 22:19, Bill Fischofer wrote: This series applies and builds fine, however with check-odp I'm seeing consistent failures on the odp_pktio tests. I double checked and am seeing the same with the base odp.git code so not sure what changed (don't think these patches really changed anything in that regard). hm, I can also reproduce fail with this patch applied: Core was generated by `./odp_queue'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00402823 in _odp_buffer_type (buf=0x7ffc1b40d890) at odp_buffer.c:47 47return hdr-type; (gdb) l 42 43int _odp_buffer_type(odp_buffer_t buf) 44{ 45odp_buffer_hdr_t *hdr = odp_buf_to_hdr(buf); 46 47return hdr-type; 48} 49 50void _odp_buffer_type_set(odp_buffer_t buf, int type) 51{ (gdb) p hdr $1 = (odp_buffer_hdr_t *) 0x2b938bdb5480 (gdb) p hdr-type Cannot access memory at address 0x2b938bdb549c (gdb) (gdb) bt #0 0x00402823 in _odp_buffer_type (buf=0x7ffc1b40d890) at odp_buffer.c:47 #1 0x00402b1e in odp_event_type (event=0x7ffc1b40d890) at odp_event.c:22 #2 0x00402b39 in odp_event_free (event=0x7ffc1b40d890) at odp_event.c:27 #3 0x00402296 in test_odp_queue_sunnyday () at odp_queue.c:96 #4 0x2b933249f482 in run_single_test () from /usr/local/lib/libcunit.so.1 #5 0x2b933249f0b2 in run_single_suite () from /usr/local/lib/libcunit.so.1 #6 0x2b933249cd55 in CU_run_all_tests () from /usr/local/lib/libcunit.so.1 #7 0x2b93324a1245 in basic_run_all_tests () from /usr/local/lib/libcunit.so.1 #8 0x2b93324a0fe7 in CU_basic_run_tests () from /usr/local/lib/libcunit.so.1 #9 0x004025c3 in main () at common/odp_cunit_common.c:86 On Fri, Jun 5, 2015 at 12:51 PM, Zoltan Kiss zoltan.k...@linaro.org mailto:zoltan.k...@linaro.org wrote: This series clarifies what happens when not all packets were sent, whether in odp_pktio_send() or odp_queue_enq*(). It also introduces odp_event_free() to make it easier the release of an event with not obvious type. It also fixes the many places in the examples and tests where this issue were not handled properly. Signed-off-by: Zoltan Kiss zoltan.k...@linaro.org mailto:zoltan.k...@linaro.org ___ lng-odp mailing list lng-odp@lists.linaro.org mailto:lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp ___ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp ___ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp ___ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp
Re: [lng-odp] [API-NEXT PATCH 2/2] packet_io: release unsent packets after odp_pktio_send()
On 4 June 2015 at 11:22, Stuart Haslam stuart.has...@linaro.org wrote: On Wed, Jun 03, 2015 at 09:37:54PM +0200, Ola Liljedahl wrote: On 3 June 2015 at 20:42, Zoltan Kiss zoltan.k...@linaro.org wrote: On that note it turned out this will be a lot bigger than I thought ... And I already have two questions: - what should we do if an assert over odp_queue_enq fails? E.g. CU_ASSERT(odp_queue_enq(queue, ev) == 0) Should we free the events, or just leave it? If we want the validation program to terminate cleanly, I assume the caller has to free any buffers that weren't enqueued or they will be leaked and then things will go bad when the program is terminating. - there are numerous places where you don't know what kind of event you are actually queue, so should we make an odp_event_free() call?, e.g. I have also encountered this situation. I even started to write a post to the list about it. But in the end I hacked around it, probably by switching on the event type and calling different free functions. Having an odp_event_free() would be simpler and clearer so I second your suggestion here. -- Ola Me too. Actually it looks like I did; odp_buffer_free(odp_buffer_from_event(ev)); But this require the code snippet here to be aware of *all* different (current and *future*) event types. -- Ola Is this not sufficient?.. anyway I agree odp_event_free() would be clearer. -- Stuart. ___ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp
Re: [lng-odp] [PATCH] doc: use only WITH_PLATFORM and not always linux-generic
The linux-generic platform is indeed used as a base class however given this it would seem that the include order should be reversed so that $(WITH_PLATFORM) is first. This would have the effect of allowing it to override any linux-generic include files of the same name. I dont think it will work in that way, doxygen will just concatenate any definitions it finds for the same thing rather than replace them I think. Yes it does exactly that. If we keep the linux-generic in the doxygen conf, we end up having both (linux-generic and our platform) for most API, and it is quite confusing. Maybe we should move the doxygen conf to each platform and use '@INCLUDE =' in the main doxygen conf? ben ___ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp
Re: [lng-odp] [API-NEXT PATCH v3 9/9] queue: handle return value of odp_queue_enq_multi()
On 05/06/15 18:51, Zoltan Kiss wrote: diff --git a/test/validation/odp_queue.c b/test/validation/odp_queue.c index f8c64f7..341b702 100644 --- a/test/validation/odp_queue.c +++ b/test/validation/odp_queue.c @@ -90,6 +90,12 @@ static void test_odp_queue_sunnyday(void) */ ret = odp_queue_enq_multi(queue_id, enev, MAX_BUFFER_QUEUE); CU_ASSERT(MAX_BUFFER_QUEUE == ret); + if (ret 0) + ret = 0; + do + odp_event_free(enev[ret]); + while (++ret MAX_BUFFER_QUEUE); + pev_tmp = deev; do { deq_ret = odp_queue_deq_multi(queue_id, pev_tmp, This has to be encapsulated in an if (ret MAX_BUFFER_QUEUE), otherwise it tries to free enev[MAX_BUFFER_QUEUE]. I'll send a new version of this series, but first I would like some more reviews about the rest of the series. Zoltan ___ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp
Re: [lng-odp] Build issue
CI appears to be failing only for the usual suspects https://ci.linaro.org/view/odp-ci/job/odp-publish/ On 8 June 2015 at 07:14, Bill Fischofer bill.fischo...@linaro.org wrote: I'm seeing this this morning: bill@ubuntu:~/linaro$ git clone http://git.linaro.org/lng/odp.git odpbase Cloning into 'odpbase'... remote: Counting objects: 9284, done. remote: Compressing objects: 100% (6884/6884), done. remote: Total 9284 (delta 6942), reused 2675 (delta 2081) Receiving objects: 100% (9284/9284), 2.07 MiB | 1.52 MiB/s, done. Resolving deltas: 100% (6942/6942), done. Checking connectivity... done. bill@ubuntu:~/linaro$ cd odpbase bill@ubuntu:~/linaro/odpbase$ ./bootstrap + aclocal -I config -I m4 + libtoolize --copy libtoolize: putting auxiliary files in `.'. libtoolize: copying file `./ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'. libtoolize: copying file `m4/libtool.m4' libtoolize: copying file `m4/ltoptions.m4' libtoolize: copying file `m4/ltsugar.m4' libtoolize: copying file `m4/ltversion.m4' libtoolize: copying file `m4/lt~obsolete.m4' + autoheader + automake --add-missing --copy configure.ac:7: installing './compile' configure.ac:22: installing './config.guess' configure.ac:22: installing './config.sub' configure.ac:3: installing './install-sh' configure.ac:3: installing './missing' example/classifier/Makefile.am: installing './depcomp' parallel-tests: installing './test-driver' + autoconf bill@ubuntu:~/linaro/odpbase$ ./configure --with-platform=linux-generic --enable-cunit-support checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking for style of include used by make... GNU checking for gcc... gcc checking whether the C compiler works... no configure: error: in `/home/bill/linaro/odpbase': configure: error: C compiler cannot create executables See `config.log' for more details bill@ubuntu:~/linaro/odpbase$ Not sure what changed. Anyone else seeing this? ___ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp -- Mike Holmes Technical Manager - Linaro Networking Group Linaro.org http://www.linaro.org/ *│ *Open source software for ARM SoCs ___ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp
[lng-odp] [Bug 1615] odp_timer fails in CI with Segmentation fault
https://bugs.linaro.org/show_bug.cgi?id=1615 --- Comment #1 from Mike Holmes mike.hol...@linaro.org --- Also happens on ARM Targets https://ci.linaro.org/job/odp-api-check/ARCH=arm64,GIT_BRANCH=api-next,label=docker-utopic-arm64/309/ -- You are receiving this mail because: You are on the CC list for the bug.___ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp
Re: [lng-odp] [PATCH] doc: use only WITH_PLATFORM and not always linux-generic
On 5 June 2015 at 08:22, Nicolas Morey-Chaisemartin nmo...@kalray.eu wrote: Signed-off-by: Nicolas Morey-Chaisemartin nmo...@kalray.eu Reviewed-by: Mike Holmes mike.holmes@l;inaro.org I think we should not impose something that is affecting others, derived platforms can of course add this back in if they need to for their documentation or make sim links which feels cleaner. --- doc/doxygen.cfg | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/doxygen.cfg b/doc/doxygen.cfg index 6283387..213a903 100644 --- a/doc/doxygen.cfg +++ b/doc/doxygen.cfg @@ -13,7 +13,6 @@ WARN_NO_PARAMDOC = YES INPUT = $(SRCDIR)/doc \ $(SRCDIR)/doc/users-guide \ $(SRCDIR)/include \ - $(SRCDIR)/platform/linux-generic/include/odp \ $(SRCDIR)/platform/$(WITH_PLATFORM)/include/odp \ $(SRCDIR)/helper/include FILE_PATTERNS = *.h odp*.c *.dox ___ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp -- Mike Holmes Technical Manager - Linaro Networking Group Linaro.org http://www.linaro.org/ *│ *Open source software for ARM SoCs ___ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp