aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-04-23queue: delete current implementation and use linux-generic1.0-beta_DPDK_1.7.1WIPZoltan Kiss
This one is just an old copy of linux-generic, let's use the current one. Later we can start off our own version if necessary. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-04-23packet: print debug info with default loggerZoltan Kiss
Although DPKD will still print its output to stdout. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-04-23packet: implement odp_packet_add/rem_dataZoltan Kiss
Based on the linux-generic implementation. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-04-23packet: implement odp_packet_copydata_inZoltan Kiss
Based on the linux-generic implementation. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-04-23packet: implement odp_packet_copydata_outZoltan Kiss
Based on the linux-generic implementation. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-04-23packet: implement odp_packet_copyZoltan Kiss
And two related functions. This is based on linux-generic implementation, performance could be improved in the future, e.g. it's using odp_packet_offset to get the offset for every segment, which unnecessarily iterates through all the segments from the beginning, every time. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-04-23packet: remove old implementation of odp_packet_copyZoltan Kiss
Otherwise the next patch would like quite unreadable. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-04-23packet: implement segment accessorsZoltan Kiss
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-04-23packet: make sure the packet buffer is aligned to cache lineZoltan Kiss
rte_mbuf is already aligned, odp_packet_hdr_t is right between it and the head of the buffer. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-04-23pktio: remove send_pkt_dpdk()Zoltan Kiss
Apart from calling rte_eth_tx_burst the only thing it does is to copy the pkt_table[] array into an another one. As far as I can determine DPDK doesn't touch this array of pointers, so it's not necessary to copy it. I've merged the rest of it into odp_pktio_send() Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-04-23packet: fix up L2/L3/L4 offset handlingZoltan Kiss
- return the pointer to the correct segment - refactor duplicate code into a common function - fix offset setting error check - set the offset to their default value during packet receive Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-04-23packet: sync up user metadata accessors to linux-genericZoltan Kiss
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-04-23packet: implement odp_packet_pool() and odp_packet_input()Zoltan Kiss
For odp_packet_input() pktio has to be adjusted as well to store the odp_pktio_t in the pool structure. A few header file dependencies are also fixed. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-04-23packet: implement missing pointers and lengths accessorsZoltan Kiss
According to the relevan section of include/odp/api/packet.h. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-04-23timer: enable linux-generic implementationZoltan Kiss
Actually it just needed a new implementation of odp_hdr_to_buf() to be in an own odp_buffer_inlines.h, and an extra include. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-04-23packet: fix odp_packet_resetZoltan Kiss
- set the data length from the parameter - check that parameter - and the return value during allocation as well - use headroom as well - memset only the header, not the whole packet - reset rte_mbuf and rte_pktmbuf values as well for each segment Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-04-23pool: initial implementation of odp_pool_destroyZoltan Kiss
DPDK doesn't support pool destroy at the moment. Instead we should improve odp_pool_create() to try to reuse pools. See this thread: http://thread.gmane.org/gmane.comp.networking.dpdk.devel/16498 Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-04-23pool: associate raw and timeout buffers with RTE_MBUF_CTRL typeZoltan Kiss
Packet buffers remain the same. Save the ODP type as well. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-04-23pool: update alloc and free to handle control buffer typeZoltan Kiss
Also translate the error scenario correctly Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-04-23pool: copy pool parameter handling from linux-genericZoltan Kiss
These changes are almost the same as with linux-generic, except that we make sure the headroom for packets is at leas RTE_PKTMBUF_HEADROOM. Debug logs are updated accordingly, and timeout type is no longer unimplemented. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-04-23packet: check ODP head and tailroom config conforms with DPDKZoltan Kiss
ODP_CONFIG_PACKET_HEADROOM is a minimum, we should check that it's smaller or equal to RTE_PKTMBUF_HEADROOM. ODP_CONFIG_PACKET_TAILROOM has to be 0, DPDK doesn't explicitly support mandating tailroom size for received packets. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-04-23pool: print a debug message if valid shm parameter is passed in odp_pool_createZoltan Kiss
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-04-23pool: save pool_hdl into DPDK private areas and implement odp_buffer_poolZoltan Kiss
Save the pool handle to pool and buffer metadata areas so we can return it in odp_buffer_pool. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-04-23buffer: return the ODP buffer type instead of DPDK oneZoltan Kiss
That's what the callers expect. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-04-23pool: calculate cache size before pool creationZoltan Kiss
According to the DPDK API, this value must be equal or smaller than RTE_MEMPOOL_CACHE_MAX_SIZE. Also, it is recommended to be a divisor of the number of elements. This algorithm tries to find the greatest divisor which is smaller than the max allowed, if there isn't any, the max is used. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-04-23pool: minor code style fixZoltan Kiss
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-03-30linux-dpdk: init: add terminate functionsMike Holmes
Re-use the stubs that were used to develop linux-generic Changed the return behaviour to be a fault Original commit was 5c7aed2c Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
2015-03-20pool: code style fixZoltan Kiss
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-03-20Revert "pool: made buffer pool create unimplemented"Zoltan Kiss
This reverts commit 3925e6a28da232eecc9a82cf8fdf61847d6b4896. Conflicts: platform/linux-dpdk/odp_pool.c Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-03-20pool: fix debug messagesZoltan Kiss
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-03-20pool: use "num" in odp_pool_createZoltan Kiss
To store the number of buffers requested. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-03-20pool: fix pool type names and sizesZoltan Kiss
Also add an overflow check, and make the timeout type implementation unimplemented for the time being. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-03-20pool: remove ODP_BUFFER_TYPE_ANYZoltan Kiss
This is no longer a valid type. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-03-17ODP-DPDK: Fix code style changesZoltan Kiss
Ran checkpatch on platform/linux-dpdk to fix up some accumulated code style problems, mostly indentation. This patch doesn't contain any functional changes. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>
2015-03-17TEMPORARILY removed timer from examplesVenkatesh Vivekanandan
Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org>
2015-03-17Fix undefined reference to _odp_buffer_type_setVenkatesh Vivekanandan
Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org>
2015-03-17Fix undefined reference to odp_pool_destroyVenkatesh Vivekanandan
- This function is currently unimplemented Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org>
2015-03-17Fix undefined reference to odp_queue_destroyVenkatesh Vivekanandan
- It internally implements, queue_enq_dummy queue_enq_multi_dummy and queue_deq_multi_destroy Port of 72011097 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org>
2015-03-17Fix undefined reference to odp_buffer_from_event & odp_buffer_to_eventVenkatesh Vivekanandan
Port of d9a7f995 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org>
2015-03-17Fix undefined reference to odp_global_data variableVenkatesh Vivekanandan
Port of b776ca47, de37ffa4, 6c0c7f72 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org>
2015-03-17Fix undefined reference to odph_linux_cpumask_defaultVenkatesh Vivekanandan
Port of 5e47a0cf Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org>
2015-03-17Fix undefined reference to odp_packet_to_eventVenkatesh Vivekanandan
Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org>
2015-03-17Fix undefined reference to odp_packet_from_eventVenkatesh Vivekanandan
Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org>
2015-03-17Fix undefined reference to odp_pktio_lookupVenkatesh Vivekanandan
- currently this function is unimplemented Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org>
2015-03-17dpdk: Taken odp_packet_io_queue.h from linux-generic which is needed by libodp.aVenkatesh Vivekanandan
Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org>
2015-03-17dpdk: disabled timer for now from odp-dpdkVenkatesh Vivekanandan
Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org>
2015-03-17queue: odp_queue_deq use events instead of buffersVenkatesh Vivekanandan
Port of d3066cb4 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org>
2015-03-17queue: odp_queue_deq_multi use events instead of buffersVenkatesh Vivekanandan
Port of e822279e Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org>
2015-03-17queue: odp_queue_enq use events instead of buffersVenkatesh Vivekanandan
Port of a49b7b64 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org>
2015-03-17queue: odp_queue_enq_multi use events instead of buffersVenkatesh Vivekanandan
Port of 37514635 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org>