aboutsummaryrefslogtreecommitdiff
path: root/include/odp/api/packet_io.h
AgeCommit message (Collapse)Author
2022-03-03api: pktio: split packet io types into a separate headerMatias Elo
Split packet IO types into a separate header file to enable easier function inlining. No API changes. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2022-03-03api: pool: split pool types into a separate headerMatias Elo
Split pool types into a separate header file to enable easier function inlining. No API changes. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-07-12api: queue: add separate header for type definitionsMatias Elo
Enable easier function inlining by moving type definitions into a separate header file. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Tested-by: Ashwin Sekhar T K <asekhar@marvell.com>
2021-07-12api: packet: add separate header for type definitionsMatias Elo
Enable easier function inlining by moving type definitions into a separate header file. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Tested-by: Ashwin Sekhar T K <asekhar@marvell.com>
2018-02-26update Linaro Copyrights to 2018 yearMaxim Uvarov
Using simple commands: find . -not -path .git -type f -exec \ sed -i -E 's/ (201[0-9]), Linaro/ \1-2018, Linaro/g' {} + find . -not -path .git -type f -exec \ sed -i -E 's/ (201[0-9])(-201[0-9]), Linaro/ \1-2018, Linaro/g' {} + Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
2018-01-18include, linux-gen: move API files into generic locationDmitry Eremin-Solenikov
Now that api header files consist only of generic includes, move them to generic locations, so that they can be reused by implementations. Signed-off-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>
2016-03-04api and linux-generic: make room for new apiChristophe Milard
This is about making the current structure clearer so that other interfaces can be added to ODP: The ODP API specification (platform agnostic) is moved from include/odp/api to include/odp/api/spec. The ODP API platform definition (for linux generic) is moved from platform/linux-generic/include/odp to platform/linux-generic/include/odp/api Include statements are adjusted accordinaly. This patch has been done by a script which is given with the cover-letter of this patch series. Signed-off-by: Christophe Milard <christophe.milard@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08api: pktio: rename single_user paramPetri Savolainen
Renamed single_user pktio queue parameters to op_mode with enumeration type. This is in line with event queue enq_ and deq_mode parameters which are defined for the same purpose. Also term "single" gives wrong impression since application may use multiple threads but must itself synchronize those. This enables op_mode extensions in the future (e.g. dedicated single thread mode). Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08api: pktio: renames for compact type and func namesPetri Savolainen
Renamed some multiqueue api type and function name, so that those fit better on 80 char lines. Standardized packet input side to use odp_pktin_ prefix and output side odp_pktout_ prefix. odp_pktio_input_mode_t odp_pktin_mode_t odp_pktio_output_mode_t odp_pktout_mode_t odp_pktio_input_queue_param_t odp_pktin_queue_param_t odp_pktio_output_queue_param_t odp_pktout_queue_param_t odp_pktio_input_queues_config() odp_pktin_queue_config() odp_pktio_output_queues_config() odp_pktout_queue_config() odp_pktio_in_queues() odp_pktin_event_queue() odp_pktio_pktin_queues() odp_pktin_queue() odp_pktio_pktout_queues() odp_pktout_queue() odp_pktio_input_queue_param_init() odp_pktin_queue_param_init() odp_pktio_output_queue_param_init() odp_pktout_queue_param_init() Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08api: pktio: rename pktio modesPetri Savolainen
Aligned pktin and pktout modes with renamed queue types in the following way: ODP_PKTIN_MODE_RECV to ODP_PKTIN_MODE_DIRECT ODP_PKTIN_MODE_POLL to ODP_PKTIN_MODE_QUEUE ODP_PKTIN_MODE_SCHED was not renamed ODP_PKTOUT_MODE_SEND to ODP_PKTOUT_MODE_DIRECT Direct pktio modes (_RECV/_SEND) are renamed to _DIRECT, which is future proof to support additional direct calls for packet input/output. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08api: pktio: remove unused ODP_PKTIO_ANYStuart Haslam
ODP_PKTIO_ANY is defined in the API header but there's no description of its intended use and it wouldn't make sense to pass it to the majority of exisitng APIs that take odp_pktio_t handles. It's not currently used anywhere, so remove it. Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08api: pktio: added link statusMaxim Uvarov
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2016-02-08api: pktio: refine multiqueue API specPetri Savolainen
Specify explicitly that new config calls invalidate old handles and outputted queue handles are stored in 0 ... N-1. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08api: pktio: added direct send to pktio output queuePetri Savolainen
Added odp_pktio_send_queue for direct packet send to a pktio output queue. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08api: pktio: added multiple pktio output queuesPetri Savolainen
Added output queue configuration parameters and functions for setting up multiple output queues. Added also a function to query the number of output queues. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08api: pktio: added direct queue receivePetri Savolainen
Added odp_pktio_recv_queue for direct packet receive from pktio input queues. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08api: pktio: added multiple pktio input queuesPetri Savolainen
Added input queue configuration parameters and functions to setup multiple input queue and hashing. Added also functions to query the number of queues and queue handles. Direct receive does use new odp_pktin_queue_t handle type. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08api: pktio: added pktio capability structPetri Savolainen
Added capability structure and a function to query it. Capability limits are used for advanced pktio configuration, like configuration of multiple input/output queues. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-08api: define pktio statistics apiMaxim Uvarov
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-22api: pktio: add odp_pktio_print() APIMatias Elo
Add API function for printing implementation specific pktio debug information. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Conflicts: platform/linux-generic/odp_packet_io.c
2015-10-27api: pktio: improve pktio_start and stop documentationPetri Savolainen
Improved documentation of open, start, stop and close calls. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-10-27api: doc: remove broken doxygen referencePetri Savolainen
Reference caused warning when creating doxygen documentation. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-10-22api: pktio: add odp_pktio_param_init() APIBill Fischofer
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-10-22api: pktio: add input and output modes to make pktio one wayNicolas Morey-Chaisemartin
Add extra mode to disable inputs and/or outputs from a packet io. This can be used to make pktio read-only, write-only or R/W. Depending on the chosen mode, platform implementation may be able to reduce usage of H/W resources. Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-10-22api: pktio: specify that pool type must be ODP_POOL_PACKETStuart Haslam
The pool passed to odp_pktio_open() must be of type ODP_POOL_PACKET so add a note to clarify. Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-10-22api: pktio description of doxygen groupMaxim Uvarov
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Suggested-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu>
2015-09-03Revert "api: pktio description of doxygen group"Maxim Uvarov
This reverts commit c75da1ebd24c881b78154e10ced2a885069877c4. Exclude this commit from 1.3. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-09-03api: pktio description of doxygen groupMaxim Uvarov
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Suggested-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu>
2015-07-06api: pktio: added output modePetri Savolainen
Added pktio parameter to select packet output mode. Left out "default output queue" option, since it may disappear when TM is integrated. Can be added later if still needed. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-07-06api: pktio: rename pktio_input_mode enumPetri Savolainen
We have decided to standardize enum naming to typedef _t, renamed the enum according to that. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-07-06api: packet_io: clarify what happens when not all packets are sentZoltan Kiss
Clarify that the user owns all events not sent/enqueued successfully. Currently our examples are not handling this situation as well. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-06-05api: codespell: correct spellingMike Holmes
Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-05-08api: packet_io: added start and stopPetri Savolainen
Packet IO start and stop enable a controlled setup and tear down phases. Interface control sequence: * odp_pktio_open() creates a pktio interface object * potential interface configurations (classification, input queues, etc) * odp_pktio_start() enables packet input/output * receive / transmit packets * odp_pktio_stop() disables packet input/output * drain remaining packets from queues * remove / destroy input queues * odp_pktio_close() destroys the pktio interface object Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-05-08api: packet_io: added odp_pktio_param_tPetri Savolainen
Packet IO interface level parameters are needed e.g. to select input mode. User must select and use one input mode (sched, poll or recv) per pktio interface. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-05-08api: packet_io: remove excess references to ODPPetri Savolainen
All handles are ODP types, no need to repeat that. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-05-08api: packet_io: change word instance to interfacePetri Savolainen
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-05-08api: pktio: Clarify doc on default pool usage on odp_pktio_openBill Fischofer
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-02-27api: packet_io: remove specific errno valuePetri Savolainen
Remove the specific value. This was the only errno value specified in the API. Add specific values when we have selected the set (and mechanism) of possible errno values for all APIs. 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>
2015-02-25api: packet io: fix doxygen define for ODP_PKTIO_MACADDR_MAXSIZEMaxim Uvarov
Add missing "*" in doxygen comment. https://bugs.linaro.org/show_bug.cgi?id=1252 Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-02-25api: packet_io: replace ssize_t with intPetri Savolainen
ssize_t is a POSIX type. API definition must be pure C (C99). Int is at least 16 bits and can hold any mac address size. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-02-08api: reflect file path in header guardsTaras Kondratiuk
Start header guards with ODP_API_ prefix to avoid confusion with other files with the same name. Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-02-05api: odp_packet_io.h: clean up pktio parameter names and descriptionsOla Liljedahl
Use 'pktio' as the parameter name for all packet IO handles. Unify the descriptions to say "packet IO handle". Signed-off-by: Ola Liljedahl <ola.liljedahl@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-02-05api: odp_packet_io.h: use int for size of pkt_tablesOla Liljedahl
odp_pktio_recv() and odp_pktio_send() use int for 'len' parameter to match return type. Signed-off-by: Ola Liljedahl <ola.liljedahl@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-02-05api: odp_packet_io.h: updated return descriptionsOla Liljedahl
Signed-off-by: Ola Liljedahl <ola.liljedahl@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-02-05api: odp_pktio.h: odp_pktio_mac_addr() return chars written or errorOla Liljedahl
Added define ODP_PKTIO_MACADDR_MAXSIZE which specifies the recommended output buffer size for odp_pktio_mac_addr(). odp_pktio_mac_addr() takes output buffer size as input and returns number of chars written (on success), <0 on failure. Updated the implementation. Updated all usages in example and test programs. Signed-off-by: Ola Liljedahl <ola.liljedahl@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-02-04api: pktio: add strong typing handle display functionBill Fischofer
Add function odp_pktio_to_u64() Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-01-29api: remove platform includesAnders Roxell
Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Reviewed-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-01-29api: packet_io: move typedef and definesAnders Roxell
Align the style with the rest of the header files of linux-generic Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Reviewed-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-01-29api: move generic API into the odp namespaceAnders Roxell
Move generic API into an api directory. Force the platform implementation to add its own header file that shall include the generic API header file. This splitup enables platform implementors to implement inline functions without modifying the "public" API files. Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Reviewed-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>