Age | Commit message (Collapse) | Author |
|
currently rx_thread spawn first and at times leads to
tmo search failure for first ping request thats because
send thread not yet pushed tmo entry into ticklist. Making
send_tx thread spawn first avoid rx_ping tmo failure for
initial ping request.
also includes one misc fix, this returning from rx ping
thread even if current tmo search failed, allow other
ping request to process.
Signed-off-by: Santosh Shukla <santosh.shukla@linaro.org>
|
|
few of odp example and test application passing
incorrect thread_tbl index entry (thread_tbl base addr)
to odp_linux_pthread_create(thread_tbl^^, 1, ..) api.
This patch a common fix for those odp application.
Signed-off-by: Santosh Shukla <santosh.shukla@linaro.org>
|
|
Move static decisions to Makefiles instead in the configure scripts.
This makes it possible to build binaries with shared, static or
all-static without reconfiguring and libodp is built both static
and dynamic per default.
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
|
|
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
Reviewed-by: Anders Roxell <anders.roxell@linaro.org>
|
|
odp timer test app stucks for tx_ack time out case, for
example bad ping ipadress. this patch does graceful exit
for such case.
also done some cleaning
- removed unnecessary debug messages
- replaced return with err label
- Replaced no. of core ping thread to 2 threads(tx, rx)
- used poll mode for ping timeout then exit.
Signed-off-by: santosh shukla <santosh.shukla@linaro.org>
|
|
The expectations of example code vs testing code is significantly
different. This difference is more easily managed if tests and
examples have their own root directory especially as the number
of validation tests is increased for the ODP 1.0 release.
For example test cases may be significantly more complex than
a good example might be expected to be. In addition tests are
not expected to have Doxygen documentation and tests will
not be expected to be coherent, they will test isolated APIs
and to do so may perform illegal combinations of calls making them
poor examples.
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Reviewed-and-Tested-by: Ciprian Barbu <ciprian.barbu@linaro.org>
|
|
ODP follows the linux kernel with the use of sparse and BE data type
checking. This patch introduces the sum type which is used by Linux
but was not part of ODP see:
http://lxr.free-electrons.com/source/include/uapi/linux/icmp.h#L71
This patch allows SPARSE to pass cleanly and the odp_generator test
case also passes.
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
Reviewed-and-Tested-by: Anders Roxell <anders.roxell@linaro.org>
|
|
Fixes builds when the builddir != srcdir
Reported-by: Mike Holmes <mike.holmes@linaro.org>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Tested-by: Mike Holmes <mike.holmes@linaro.org>
|
|
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Reviewed-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>
Reviewed-by: Mike Holmes <mike.holmes@linaro.org>
Reviewed-and-Tested-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
|
|
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Reviewed-by: Steve McIntyre <steve.mcintyre@linaro.org>
|
|
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Reviewed-by: Steve McIntyre <steve.mcintyre@linaro.org>
|
|
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
|
|
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
|
|
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
|
|
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
|
|
Timer test modified to use the timeout buffer type.
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
|
|
Removes sparse -Wshadow warning by prefixing the global instace of args
with gbl_. This makes it more aparrent to the reader that the global
instance of args is being referenced rather than the local one in
burst_mode_init_params().
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
Reviewed-by: Anders Roxell <anders.roxell@linaro.org>
|
|
Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>
|
|
Use make VERBOSE=yes to enable the verbosity.
Reviewed-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
|
|
'==' has higher priority than '=', so 'buf' gets a result of comparison
instead of a buffer.
Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
|
|
The drop_err_pkts function is intended to discard packets that input
parsing has marked as containing errors (e.g. short frame). It correctly
identifies and frees bad packets but an error in the way pkt_tbl is
updated means bad packet handles aren't actually removed, later use of
the stale packet handle results in a SEGV. The pkt_cnt is decremented
though, so for each bad packet a good packet (within the same burst) is
dropped and leaked.
Signed-off-by: Stuart Haslam <stuart.haslam@arm.com>
|
|
All odp applications have odp_ prefix. Adding the same prefix to l2fwd.
Reviewed-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Reviewed-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Initial L2 forwarding application based on example pktio that
resembles DPDK's in functionality.
It is based on raw sockets and not tested on any network HW accelerator.
Create pktio and queue for all threads before starting pthread.
It has two modes supported,
1. burst mode(without ODP queues)
2. queue mode (with ODP queues and scheduler)
and three types,
1. raw sockets
2. multiple messages on sockets
3. mmap on sockets
Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>
|
|
Test applications should not differ from any other ODP application in a way
they use ODP library and headers. They shall use them from DESTDIR. The fact
that they are placed in ODP repo do not allow them to abuse it. By using
directly library and includes from platform directly we break modularity.
Tests' Makefile must have information about platform's include directory
structure. So tests' Makefile should be updated every time structure changes.
Things get even worse if platform include directory structure differs
between implementations (which is a valid case).
Removing direct access to platform directory also makes hard to build
and install library from tests' Makefile. Only unconditional install is
possible, but this adds unnecessary overhead on each test build.
So this patch removes this ability.
Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
|
|
odp_generator can send/receive udp packets, or works like ping.
Work mode:
1.send udp packets
odp_generator -I eth0 --srcmac fe:0f:97:c9:e0:44 --dstmac 32:cb:9b:27:2f:1a --srcip 192.168.0.1 --dstip 192.168.0.2 -m u
2.receive udp packets
odp_generator -I eth0 -m r
3.work likes ping
odp_generator -I eth0 --srcmac fe:0f:97:c9:e0:44 --dstmac 32:cb:9b:27:2f:1a --srcip 192.168.0.1 --dstip 192.168.0.2 -m p
Mandatory OPTIONS:
-I, --interface Eth interfaces (comma-separated, no spaces)
-a, --srcmac src mac address
-b, --dstmac dst mac address
-c, --srcip src ip address
-d, --dstip dst ip address
-s, --packetsize payload length of the packets
-m, --mode work mode: send udp(u), receive(r), send icmp(p)
-n, --count the number of packets to be send
-t, --timeout only for ping mode, wait ICMP reply timeout seconds
-i, --interval wait interval ms between sending each packet
default is 1000ms. 0 for flood mode
Signed-off-by: Weilong Chen <weilong.chen@linaro.org>
|
|
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
|
|
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Added timer test and modified scheduler API for cleaner wait and
pause functionality.
- Added test/timer, removed timer test code from test/example
- Added scheduler wait parameter: cleaner control of
wait/no wait/how long to wait
- Added scheduler pause/resume which provides application a clean way
to break out from the schedule loop (when scheduler has potentially
optimized throughput with thread local stash of buffer)
- odp_schedule_one which can be used to optimize application RT/QoS vs
throughput
- queue and time helpers used by scheduler and timer test
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
|
|
GCC option-fPIC decreases performance with static libraries and
should be enable only when really needed.
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
|
|
This reverts commit 1aa4620f789d572a08441ce85ad4e39420d76fff.
ODP libpcap support will be in separate git tree:
git://git.linaro.org/lng/odp-apps.git
as well as others 3-rh party applications.
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Conflicts:
.gitignore
|
|
This reverts commit 6007d8833a6880abedf98f792586c0cfb9f10de0.
ODP libpcap support will be in separate git tree:
git://git.linaro.org/lng/odp-apps.git
as well as others 3-rh party applications.
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
wasn't able to run testcase 7, said:
"Invalid test case [7]"
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
|
|
Reworked the netmap pktio example to support any number of threads of execution
and multiple interfaces to work on. The threads are no longer associated with
pktios because of using odp_schedule that gets packets from any pktio.
General cleanup changes were made, setting hardcoded values to defines, renaming
some variables, modifying some comments.
Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org>
|
|
This function will not some more work when the scatter/gather support is added,
for now the odp_buffer_copy_scatter is just a stub.
Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org>
|
|
Packet pool can be found with odp_buffer_pool_lookup(),
no need to provide it to threads. Emphasize that in example.
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
source/odp_timer.c: In function ‘odp_timer_cancel_tmo’:wq!
source/odp_timer.c:136:3: error: format ‘%lu’ expects argument of type ‘long unsigned int’,
but argument 8 has type ‘uint64_t’ [-Werror=format=]
ODP_ERR("cancel failed for tim id %d tmo id :%d tick idx %lu\n", id, tmo, tick_idx);
odp_timer_ping.c: In function ‘ping_init’:
odp_timer_ping.c:257:31: error: cast increases required alignment of target type [-Werror=cast-align]
dst_addr.sin_addr.s_addr = *(long *)hname->h_addr;
- Move ODP_ERR outside spinlock
- Replace ODP_ERR with ODP_DBG, as search_and_delete_tmo() func may
fail for valid case like entry in list already deleted by timeout handler
which is a valid case but then odp_err messaging is wrong..(pointed
out by Ola). The invalid case still fall into same loop and may confuse
for now, thus need to identify possible erronoing so to decode error message.
I am leaving this open for now (possible errorno in timer implementation)
..will evolve in phases (TODO)
Signed-off-by: santosh shukla <santosh.shukla@linaro.org>
|
|
Application open PF_INET socket, spawns two thread,
one is sender_ping_thr another one listen_thr.
Each send request arms timer for absolute timeout duration
Whenever listner thread recieves ack, it cancels the timer_out
and free the timeout buffer i.e. tmo_buf allocate while arming..
Otherwise timeout-event-notfier will enqueue time out even to
queue for that pckt_cnt.
Signed-off-by: santosh shukla <santosh.shukla@linaro.org>
|
|
Signed-off-by: Vincent Hsu <vincent.hsu@linaro.org>
|
|
Dynamically select type of packet I/O
sock_params->type =
ODP_PKTIO_TYPE_SOCKET_BASIC
ODP_PKTIO_TYPE_SOCKET_MMSG
ODP_PKTIO_TYPE_SOCKET_MMAP
ODP_PKTIO_TYPE_NETMAP
sock_params->fanout = 1;
pktio = odp_pktio_open(thr_args->pktio_dev, thr_args->pool, ¶ms);
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Cleaned warnings on include, include/helper and test/example. Used
@internal and @private to mark documentation that should not go
into ODP API docs.
Doxyfile.in needs INTERNAL_DOCS = YES to suppress warnings
(of @internal), but it should be set "NO" for "official"
documentation generation.
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
|
|
Signed-off-by: Vincent Hsu <vincent.hsu@linaro.org>
|
|
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
Signed-off-by: santosh shukla <santosh.shukla@linaro.org>
|
|
Very simple implementation. Does not implement cancel_tmo. Test included into example app.
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
|
|
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
|
|
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
|
|
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
|
|
- Enabled test level make / make clean without install
- Main level Makefile installs files still by default
- Moved common stuff into odp/Makefile.inc and odp/test/Makefile.inc
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
|
|
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
|
|
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
|