Age | Commit message (Collapse) | Author |
|
ODP application can be better managed if the application is aware of pool
stats like the number of entries available and the number of entries in the
local caches of the pool.
Introduce odp_pool_stats() to read pool statistics counters.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Some ODP application can be better managed if the application is aware of
the pool indices. Typical application use cases are for example table
lookup and debugging.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Inline IPsec operation prepends an application provided header to the
IPsec packet before sending the packet out. Allow an application to
provide the header in packet data in front of the plain text IP packet
as an alternative to providing the header through a separate memory
buffer.
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Allow application to check parameters associated with an IPsec SA.
Retrieved information covers constant fields that application had
provided while creating session (like details of cipher choices) and
variables associated with IPsec (like sequence number, anti-replay
parameters). Also, this API allows application to check session
constants which implementation is allowed to update based on the
support available (like anti-replay window).
Signed-off-by: Sachin Yaligar <syaligar@marvell.com>
Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Add protocols API header to accommodate protocol specific
definitions.
Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
In some ODP implementations, plain queues might be using software
primitives such as a simple ring and the ODP timer hardware pools
can enqueue timeouts only into schedule queues.
Introducing capability `queue_type_sched` and `queue_type_plain`
which define the queue types that can be the destination of the
timeout events.
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
|
|
Add support for IPsec stats collection and reporting. This would allow
applications to use ODP APIs for stats collection and retrieval. Also
implementations can optimize stats reporting, which would otherwise
involve inspecting every packet and updating stats atomically.
Stats collection can be enabled using the 'stats_en' option added in
odp_ipsec_config_t.
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Vidya Velumuri <vvelumuri@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Add odp_ipsec_sa_print() API to print implementation defined
information about specified SA. Also add odp_ipsec_print() API
to print global IPSEC configuration and other related information.
Signed-off-by: Sachin Yaligar <syaligar@marvell.com>
Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Introduce GTPU tunnel endpoint identifier term.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Introduce SCTP source and destination port terms.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Introduce ICMP identifier, code and type terms.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Introduce IGMP group address term.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Update specification text of odp_packet_is_valid() and
odp_packet_vector_valid() to mention that those calls
should not crash if the handle is corrupted.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Update specification text to mention that the call should not
crash if the buffer handle is corrupted.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Added odp_event_is_valid() call for debugging. It can be used e.g.
when suspecting that some event handles have been corrupted. This
call should not crash on a corrupted handle. Crash cannot be
always avoided, but the call should e.g. validate the handle value
before accessing any memory address pointed by the handle.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
In case of IPsec packets, odp_packet_has_error() can be used to check parse
errors after IPsec processing. All IPsec errors/warnings need to be
checked using odp_ipsec_result().
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Introduce odp_packet_vector_t type handling functions such
alloc and free the vector from packet vector pool,
get and set the vector size and get the vector packets array
for creating, manipulating the packet vector abstracted
using the odp_packet_vector_t.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
There are two configuration aspects of the pktin vector producer.
First, When pktin subsystem produces the vector of packets,
it needs to choose the ODP_VECTOR_POOL to hold/form
the vector.
Second, The max timeout interval to accumulate a vector for
packets.
The odp_pktin_vector_config_t depicts the configuration
parameters.
Pktin subsystem forms a vector, when either max timeout or max vector size
is reached, and injects it as an event to the event queue.
The pktin configuration available either through pktio or
classification subsystem based on the final odp queue delivery.
This patch also introduces odp_pktin_vector_capability_t capability
parameter to probe the pktin vector producer availability in the
implementation as well as to know the max and min timeout value
for accumulating the packet by the pktin vector producer and
also the max_vector_size.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Introduce packet vector events which hold an array of odp_packet_t.
This patch also introduce the odp_packet_vector_from_event()
and odp_packet_vector_to_event() event conversion APIs.
In order to build the linux-generic in --disable-abi-compat mode,
A dummy definition of odp_packet_vector_t has been added.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Introduce the vector pool to hold the vector of a generic type such
as packets. Updated odp_pool_capability_t to advertise the new vector
pool capabilities and odp_pool_param_t to configure the vector pool.
The application shall use the max_vector_size parameter to configure
the max number of general types such as odp_packet_t that
can hold in the vector.
When vector pool used as odp_packet_t container,
either pktin subsystem can allocate a buffer to hold/form
the vector in packet input path as pktin producer or
the application can allocate the vector pool using
odp_packet_vector_alloc() from packet API to create a vector
of packets to store an array of packets as a vector.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Added odp_sys_config_print() function which prints out
implementation specific configuration options. An implementation
may support a lot of config options defined with various
methods (files, env variables, API). This call records those
options into a log, so that developers can check later which
options were used e.g. for a test run.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Govindarajan Mohandoss <Govindarajan.Mohandoss@arm.com>
|
|
System info may be used to retrieve various system information
with a single call. Content of the system info structure may be
extended later, but it contains initially e.g. CPU ISA family
and version.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Govindarajan Mohandoss <Govindarajan.Mohandoss@arm.com>
|
|
As per the GCC documentation, the 'aligned' attribute should be added
after the 'struct' keyword. Consequently, the ODP_ALIGNED attribute has
been moved in various structs of the atomic abi files. The 'Enforce
alignment' comment has been removed from these files since the effect of
the ODP_ALIGNED macro is easy to understand.
Also, for these files, the typedef declaration has been combined with the
struct definition which is consistent with most typedef structs in ODP
source code.
Suggested-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Malvika Gupta <Malvika.Gupta@arm.com>
Reviewed-by: Govindarajan Mohandoss <Govindarajan.Mohandoss@arm.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Unaligned types are needed e.g. when pointing to field of
a packed structure (like protocol headers).
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
|
|
Now that we have API that works with Packet IO time source
that is applicable/used for both Rx and Tx packet timestamps,
odp_pktin_ts_*() API are redundant. So this patch deprecates them.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Add packet timestamp capture on Tx support by allowing
capture enable or disable to be set on per packet basis.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Capturing timestamp on Tx of a packet by HW is a feature where
timestamp is captured when requested on a packet at the moment
of Tx on a pktio. This feature is useful for protocols like PTP
or for debugging purposes. Current spec only supports packet
timestamping on Rx. So this patch extends spec to capture
timestamp on Tx for the pkts which requested it.
This patch also adds new API for retrieving timestamp from
Packet IO time source that is used both for Rx and Tx
packet timestamping purposes by HW.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Currently ODP spec provides support for holding references
to packets and thereby those packets are not freed by platform
after transmission if they have more than one reference.
This support is useful when using stack that needs retransmissions
like TCP or some fragmentation implementations.
Most of the other forwarding/pipeline applications will not be using
this support as they don't hold any references and forward traffic
after packet manipulations.
Since there is a performance hit in some platforms for supporting
ref count update and validation in odp_pktout_send(),
this patch adds support to indicate via pktio config if PKTIO
can optimize the fastpath for case where packets sent for
transmission will not have multiple references and platform/HW
can always free them post transmission.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Fix doxygen syntax for odp_packet_color_t enum.
Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Move odp_packet_chksum_status_t enum from spec/packet.h
to abi/packet.h to allow platform specific header files
to make use of this enumeration. Currently this is not
possible as spec/packet.h is included after the platform
specific header files.
Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
In odp_likely(), consider any non-zero value likely, instead of only
the value 1. This mirrors the behavior of odp_unlikely(), and probably
also matches API user expectations.
There are currently four places in linux-generic implementation where
odp_likely() is called with non-boolean values.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Current odp_pktio_skip_set() is supposed to work on all
platforms. Since this API is HW dependent as it asks ingress
parser to skip X bytes before starting to parse packet for standard
L2/L3 protocols, it may not be supported by every platforms.
Hence adding a set_op capability in packet_io for reporting
if a given platform supports it or not.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Existing API spec requires application to just provide L3 offset and
and L4 offset and expects platform either in SW or HW parse the packet in
Tx and identify L3 and L4 protocols and then generate checksum if
requested. Since not all platforms have support for packet parsing in HW
in Tx, they depend on software to provide L3 and L4 types in addition to
existing L3 and L4 protocol offsets. Doing the parsing in platform SW for
such cases brings down performance and is counter productive.
Since similar to L3 and L4 offsets, even L3 and L4 proto types are provided
by HW parser in packet ingress, making use of the same information in Tx is
benefitial for performance.
So this patch changes Tx checksum insertion semantics by mandating that
application should have valid packet metadata for L3 and L4 type
along with existing requirement of L3 and L4 offsets, and platform will
make use of the same information for checksum calculation and insertion.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
When traffic manager (TM) is enabled on pktio (ODP_PKTOUT_MODE_TM),
application is expected to specify the traffic manager queue to be
used for packet transmission after inline IPsec processing.
Applications requiring such a usage on supported platforms can specify
tm_queue as part of odp_ipsec_out_inline_param_t and have the packets
submitted to the specified tm_queue.
Platforms supporting usage of TM with inline IPsec can expose that via
IPsec capabilities. For platforms which does not support such a mode of
operation, inline IPsec outbound would be disabled when traffic manager
is configured on the pktio.
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
In order to accelerate the lookup function, typical classification
HW gives a feature to embedded a custom application-defined value as
metadata when a specific flow matches the PMR rule.
Introduce a new feature called mark to enable this use-case where
the application can create a PMR with mark and configure the application
defined values as struct odp_pmr_create_opt_t::mark for the given
PMR, and then application retrieve the value through odp_packet_cls_mark()
in fast-path to achieve the first level HW accelerated lookup.
Since the existing odp_cls_pmr_create() API does not support
structure version to accept new arguments, introduced
odp_cls_pmr_create_opt() API provide additional options for
creating the PMR which include the mark support.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Remove the limitation of input data length to be a
multiple of 8 for bit mode crypto operation.
Clarify the bit order for the data in the last byte when
the length is not a multiple of 8.
Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Always build both random module implementations to detect possible build
issues. Renamed random_null implementation to random_std.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Values inside it are explicitly defined in spec which eliminates the
need for this typedef. Additionally it's not present anywhere in the
spec, which makes it seem like a forgotten type to remove.
Signed-off-by: Stanislaw Kardach <skardach@marvell.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
|
|
Doxygen entry was missing for odp_proto_l4_type_t.
Signed-off-by: Stanislaw Kardach <skardach@marvell.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
|
|
The number of colors should be strictly defined in the spec since the
number of spec colors is limited to 3.
Signed-off-by: Stanislaw Kardach <skardach@marvell.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
|
|
Newer doxygen (1.8.17) is treating enum <name> and typedef ... <name> as
different definitions and therefore warns about undocumented
enumerations. Therefore eliminate the unused enumeration names as only
the typedef definition exists in the API and therefore the only valid
variable definition is:
odp_event_type_t foo;
Not:
enum odp_event_type_t foo;
Signed-off-by: Stanislaw Kardach <skardach@marvell.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
|
|
Add new odp_queue_print() function for printing implementation defined
queue debug information.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Use odp_pktio_link_status_t enum as odp_pktio_link_status() return
value. The enum values match old function return values to maintain
backward compatibility.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Stanislaw Kardach <skardach@marvell.com>
|
|
Add new function odp_pktio_link_info() and data structure
odp_pktio_link_info_t for reading current link status information:
- Autonegotiation mode (enabled/disabled)
- Duplex mode (unknown/half duplex/full duplex)
- Flow control (unknown/on/off)
- Media (media type as string)
- Link status (unknown/up/down)
- Speed (unknown/Mbps)
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Stanislaw Kardach <skardach@marvell.com>
|
|
Clarify that info structures (odp_tm_node_info_t, odp_tm_node_fanin_info_t,
odp_tm_queue_info_t, odp_tm_query_info_t) are written only on success.
Invalid out tags were removed from query flags.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Added functions to get the current local/global time stamp
directly in nanoseconds. For example, odp_time_local_ns() is
equivant of calling odp_time_to_ns(odp_time_local()). This
simplifies use cases where time will be always converted to
nanoseconds. However, when time API performance is important
conversions to nanoseconds should be avoided or minimized.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Stanislaw Kardach <skardach@marvell.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Added option to specify timer pool resolution in hertz. High
resolution values in nanoseconds result small numbers and thus
poor granularity. Hertz offers better granularity with high
resolution values. User gives resolution either in nanoseconds
or hertz, and sets the other parameter to zero.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Stanislaw Kardach <skardach@marvell.com>
|
|
Traffic Manager API defines all types as platform specific yet unit tests
expect to be able to print them. Therefore introduce u64 debug print
conversion functions for all TM types.
Signed-off-by: Stanislaw Kardach <skardach@marvell.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
It may not be possible for random generator functions to return
requested number of bytes. Clarify that implementation is not required
to loop until "len" bytes are available. Instead application should
contain such logic.
Signed-off-by: Stanislaw Kardach <skardach@marvell.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Add abi header for hash to allow platforms to inline hash.
Signed-off-by: Stanislaw Kardach <skardach@marvell.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|