Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
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
|
|
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>
|
|
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>
|
|
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
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>
|
|
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>
|
|
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>
|
|
This reverts commit c75da1ebd24c881b78154e10ced2a885069877c4.
Exclude this commit from 1.3.
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|