aboutsummaryrefslogtreecommitdiff
path: root/platform
AgeCommit message (Collapse)Author
2018-11-14linux-gen: ishm: read single va size from configMatias Elo
Simplify adjusting single VA memory size by moving the value to ODP config (shm.single_va_size). The default size is dropped to 128MB to save memory. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-11-14linux-gen: ishm: move block memory mapping into _odp_ishm_address()Matias Elo
Move internal block memory mapping from odp_shm_lookup() to odp_shm_addr(). Calling odp_shm_addr() is mandatory when sharing shm blocks (not ODP_SHM_SINGLE_VA) between ODP processes. Calling odp_shm_lookup() is optional. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-11-14linux-gen: queue scalable: remove _ODP_ISHM_SINGLE_VA from pool createMatias Elo
ishm pool create is done during global init so no need to use _ODP_ISHM_SINGLE_VA flag. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-11-14linux-gen: ishm: remove unused internal functionsMatias Elo
Ease code maintenance by removing the following unused functions: find_block_by_address(void *addr) _odp_ishm_free_by_name(const char *name) _odp_ishm_free_by_address(void *addr) _odp_ishm_lookup_by_index(int block_index) _odp_ishm_lookup_by_address(void *addr) Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-11-14linux-gen: ishm: remove unnecessary _odp_ishm_pool_lookup() functionMatias Elo
Ease code maintenance by removing unnecessary code. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-11-14linux-gen: cls: simplify shm usagePetri Savolainen
Combine three shm reservations into one reservation. This simplifies shm usage and results less ODP internally allocated SHM blocks. Also one combined block is more memory efficient than multiple (saves memory and page mappings). Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-11-14linux-gen: shm: modify shm print header stringPetri Savolainen
Highlight that printed values are from ODP SHM only, i.e. it's not generic memory allocation status of the entire system. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-11-14linux-gen: ishm: allocate small shm blocks using normal pagesMatias Elo
Only memory reservations larger than ISHM_HUGE_PAGE_LIMIT (64kB) are allocated using huge pages (if available). Smaller reservations are done using normal pages to conserve memory. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-11-14linux-gen: ishm: add internal _ODP_ISHM_USE_HP flagMatias Elo
Add internal shm flag for allocating shm memory always from huge pages. This is required by zero-copy dpdk packet pool. Internal _odp_shm_reserve() function is added for passing extra shm flags. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-11-14linux-gen: ishm: remove unused odp_shm_internal headerMatias Elo
odp_shm_internal.h contents were not used so delete the file and rename odp_ishm_internal.h to odp_shm_internal.h. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-11-14linux-gen: ishm: remove _ODP_SHM_NO_HP flagMatias Elo
Reserving large shm blocks without huge pages increases page misses. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-11-09linuxgen: add dumpconfig utilityMaxim Uvarov
it might be useful to package small binary which prints platform default builtin config file. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
2018-11-07linux-gen: ipsec: check crypto param salt lengthPetri Savolainen
Add salt/nonce length checks. Add missing nonce into an IPSEC performance test case. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-31linux-gen: pktio: remove sched_cb_pktin_poll_oldPetri Savolainen
The function is not used anymore. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-31linux-gen: schedule_sp: use sched_cb_pktin_pollPetri Savolainen
Use sched_cb_pktin_poll instead of sched_cb_pktin_poll_old, so that the old pktin poll function can be removed. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-31linux-gen: thread: use automatic schedule group configurationPetri Savolainen
Read from scheduler configuration if an automatic schedule group is enabled or disabled. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-31linux-gen: sched: add config request function to interfacePetri Savolainen
Added config request function to scheduler internal interface. Other modules may use this to examine scheduler configuration. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-31linux-gen: config: add schedule group config file optionsPetri Savolainen
Added options to disable unused automatic schedule groups. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-29linux-gen: ipsec: make SA lifetime checking more scalable to multiple threadsJanne Peltonen
Enforcing the packet and byte based SA life times is currently slow if the same SA is being handled by multiple threads since the threads keep checking and updating the same shared byte and packet counters. Make the implementation more scalable by having a thread-local quota of packets and bytes for each SA and by updating the shared byte and packet counters less frequently (i.e. when the quota runs out). This introduces some inexactness to life time warnings and errors. The warnings and errors about soft and hard limits being reached may come a bit earlier than expected based on the packets sent to the wire. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-29linux-gen: sched: increase max spread weightPetri Savolainen
Increase max spread weight. The default value is kept the same. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-29linux-gen: sched: use spread weight from config filePetri Savolainen
Use the new config file option instead of fixed prefer ratio. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-29linux-gen: sched: add spread weight config file optionPetri Savolainen
Add new config file option to control scheduler internal queue preference ratio. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-24linux-gen: timer: run inline timers during queue dequeue operationsMatias Elo
Process inline timers (if enabled) during odp_queue_deq() and odp_queue_deq_multi() calls. This fixes inline timers not working if odp_schedule() or odp_schedule_multi() was never called. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-24linux-gen: timer: reduce inline timer overheadMatias Elo
Reduce inline timer overhead by not polling timers until at least one timer pool has been created. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-24linux-gen: queue: add internal interface for adding/removing inline timersMatias Elo
Add internal queue interface functions queue_timer_add_fn_t and queue_timer_rem_fn_t for adding/removing inline timers. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-18linux-gen: config: maximum pool size 1MPetri Savolainen
Change maximum pool size back to 1M. Maximum packet pool capability is defined in the config file. This is the upper limit for that config. Also this is max capability of buffer and tmo pools. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-18linux-gen: pool: add max num packets in config filePetri Savolainen
This config is used to for maximum capability. The default capability needs to be modest so that system memory limit is not exceeded. User may increase maximum number of packets when system memory size allows (and SHM single VA is not used). Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-18linux-gen: pool: add packet param checksPetri Savolainen
Do also checks against maximum number of packets and max packet headroom size. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-18linux-gen: pool: output error on pool createPetri Savolainen
Change from debug to error message on pool create checks. These are slow path errors and it's helpful to see those also when not debugging. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-18linux-gen: config: move queue size config to scalablePetri Savolainen
Only scalable queues use build time the queue size config. Move it to scalable config file. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-18linux-gen: config: improve config file check error outputPetri Savolainen
It was hard to notice from log that config file version has a mismatch. This is a common error when config file version has updated, but a user has not updated his own config file. Improve error check output, so that failure reason is better highlighted. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-18linux-gen: pool: increase minimum packet segment lengthMatias Elo
Some DPDK NICs need at least 2176 byte buffers (2048B + headroom) to not segment standard ethernet frames. Increase minimum segment length to avoid this and add matching check to zero-copy dpdk pktio pool create. Reported-by: P. Gyanesh Kumar Patra <pgyanesh.patra@gmail.com> Signed-off-by: Matias Elo <matias.elo@nokia.com> Tested-by: P. Gyanesh Kumar Patra <pgyanesh.patra@gmail.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-18example: stop and close pktio devices on exitMatias Elo
Stop and close used pktio devices on exit to free used resources. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-16linux-gen: ring: allocate global data from shmMatias Elo
Enables using ipc in process mode. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-16linux-gen: sched scalable: allocate global data from shmMatias Elo
Enables using scalable scheduler in process mode. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-16linux-gen: sched: remove unused schedule interface functionsPetri Savolainen
These functions are not needed after iquery scheduler was removed. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-16linux-gen: remove iquery scheduler implementationPetri Savolainen
Iquery scheduler has no advantage compared to basic and scalable scheduler. It has not been developed for a long time. Remove it to reduce maintenance overhead. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-16linux-gen: sched: remove iquery from interfacePetri Savolainen
Remove iquery from scheduler and queue interface. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-15linux-gen: pktio: fix index calculation of multiple dest_queuePetri Savolainen
Packets to different destination queues interleaved resulted bad indexes when pktin_recv_buf() was recording which packets belong to the same dest_queue. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-15linux-gen: pool: reduce max pool sizePetri Savolainen
Reduce maximum pool size, so that maximum size (packet) pool requires less than 1GB of SHM memory. The limit of 1GB (for default configuration) comes from maximum SHM reserve size in process mode (single VA) and limited memory size CI virtual machines. This define can be increased when pool size options are added into the configuration file. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-15linux-gen: ring: add reader tail checkPetri Savolainen
Reader tail index is needed to detect if a reader is so much behind that a writer is going to overwrite the data it is reading. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-15linux-gen: pool: ring size must be larger than num itemsPetri Savolainen
Ensure that ring size is larger than number of events to be stored in there. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-15linux-gen: sched: remove unnecessary queue null indexPetri Savolainen
Ring does not use any more special null index. So, queue index initialization to null index is not needed any more. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-11linux-gen: dpdk: improved zero-copy implementationMatias Elo
Improved zero-copy DPDK pktio implementation which better adheres to DPDK APIs. The new implementation reduces overhead by moving mbuf initialization to ODP pool create and by using offsets instead of saved pointers to do ODP packet / DPDK mbuf conversion. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-11linux-gen: dpdk: prefix visible internal parse functions with _odp_Matias Elo
Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-11linux-gen: dpdk: fix running multiple odp instances simulaneuslyMatias Elo
Prefix DPDK packet pool names and huge page mappings with PID to avoid name conflicts. Also, let DPDK detect process type automatically. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-10linux-gen: ipsec: make IPv4 ID allocator scale better to multiple threadsJanne Peltonen
Allocate IPv4 ID to threads in blocks to avoid updating shared IPv4 ID variable for every packet. Keep free ID blocks in a ring to maximize the time before reusing a block. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-10linux-gen: ipsec: use global IPv4 ID allocator for all tunnel SAsJanne Peltonen
Change the per-SA IPv4 ID allocator to a global one for IPsec to reduce the risk of duplicate IPv4 IDs when there are multiple SAs between the same endpoints. Use zero IPv4 ID in atomic datagrams (RFC 6864). Fixes: https://bugs.linaro.org/show_bug.cgi?id=4013 Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-10linux-gen: ipsec: use sequence number counter for counter based IVJanne Peltonen
Reduce frequently updated SA state by reusing 64-bit sequence number as a counter based IV instead of having a separate counter for it. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-10linux-gen: ipsec: separate hot r/w data from r/o data in an SAJanne Peltonen
Group very frequently updated SA state together, separately from read-only data to reduce false sharing of cache lines and resulting cache missed (not done for tun_ipv4.hdr_id which should be removed). Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>