Age | Commit message (Collapse) | Author |
|
Reduce latency by enqueueing packets directly to classifier and inline
IPsec destination queues from pktio devices.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
|
|
Prefix implementation internal debug macro names with underscore.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Set promiscuous mode disabled by default. Updated interface MAC
address to match destination MAC used in test files.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Remove an extra level of hierarchy from pktio_entry_t, and make the
type cache aligned.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
|
|
Use atomic instead of internal in_errors counter in loop and pcap so
that these counters are handled the same way in every pktio.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
When classification is enabled, but packet doesn't match any CoS and
default CoS is not set, or packet has an error and error CoS is not
set, the packet is dropped. In this case, increment in_discards
counter.
Also, fit existing in_discards increment calls on one line.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
pktio_entry::in_chksums is just a copy of information in pktin
config. Remove it, and instead use pktin config directly.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
|
|
All pktios except loop and pcap are missing the functionality to move
received packets to the pool indicated by CoS. Add the missing
implementation.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
|
|
We've been avoiding L4 checksum validation in case the packet is
dropped due to other parse errors or classification. However, L4
checksum must be validated before classification, otherwise packets
with an invalid checksum are not classified to the error CoS. Move L4
checksum validation into _odp_packet_parse_common().
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
|
|
When unable to copy a packet, use stats_extra.in_discards instead of
stats.in_discards. In many pktios (although not loop or pcap), the
latter comes directly from e.g. a socket. The former is therefore more
suitable for other errors.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
|
|
Don't count packets with errors in in_octets and in_packets. Add
in_errors and in_discards counters.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
When encountering a packet error in packet parser and pktin has been
configured to drop on that kind of packet error, return an error,
which causes pktio to drop the packet.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Instead of calling *_packet_parse_layer() when classifier is not
enabled, always call *_packet_parse_common().
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Unlike _odp_packet_parse_layer(), _odp_packet_parse_common() (which is
called when classifier is enabled) does not validate L4 checksum. Call
_odp_packet_l4_chksum() directly in each pktio, when classifier is
enabled.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Move packet parsing functions to new odp_parse.c and
odp_parse_internal.h files.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Instead of calling _odp_packet_parse_common() in
_odp_cls_classify_packet(), make the call in pktio before the classify
call. This is cleaner and makes for better error handling.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Don't include odp_api.h header inside the implementation files as it
unnecessarily includes all API headers. The remaining includes have been
cleaned up and grouped.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Fix "overflow in conversion from 'int' to 'char' changes value" errors when
building with 'pedantic' option.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Fill new odp_pktio_stats_capability_t capability for all pktio devices
supporting statistics counters.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Implement new odp_pktio_stats_t.in_packets/out_packets packet IO statistics
counters.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Rename the rest of the global symbols in the static library that do
not have the "_odp_" prefix.
Fixes: https://github.com/OpenDataPlane/odp/issues/805
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Implementation of odp_pktio_maxlen_set() for pcap pktio.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Rename pktio_if_ops_t.mtu_get to maxlen_get to make naming consistent with
the API functions.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Rename some symbols that are global in the static library, in order to
avoid clashes with application code. The prefix "_odp_" is added to
the existing names.
This patch renames most of the global symbols, a few more still remain
to be renamed.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Add classifier integration to pcap pktio. With the previous
code packets received from a pcap interface were never
classified.
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Implement support for recording timestamps of transmitted packets.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
This patch adds framework for new pktio and packet API
to support retrieval of timestamps from Packet IO time source.
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>
|
|
Use odp_pktio_link_status_t enum as odp_pktio_link_status() return
value.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Add implementation for odp_pktio_link_info() function.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Add implementation for odp_pktio_link_status() function.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Reopening pcap interface, which is needed to implemement loop support,
causes pcap internal failure in process mode.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Previously some pktio types could recv/send packets even though the pktio
was not in started state.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reported-by: Carl Wallen <carl.wallen@nokia.com>
|
|
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Previously, config.h header was not included in install dir. This caused a
compilation failure when an application tried to include ODP helper
headers.
config.h has been moved to include/odp subdirectory to avoid naming
conflicts and unnecessary includes have been removed.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reported-by: Mikko Parpala <mikko.parpala@nokia.com>
|
|
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
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>
|
|
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>
|
|
If configured, check IPv4 header checksum.
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Reviewed-by: Bogdan Pricope <bogdan.pricope@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
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>
|
|
Use only one function (packet_hdr) in handle to header pointer
conversion. odp_packet_hdr is bad name for an implementation
internal function as API function prefix is odp_packet_.
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Use always inlined versions of packet to/from memory copy
functions.
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Use argument named 'num' on all pktio devices to pass the number of packets
to receive/transmit.
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>
|
|
Add implement of MAC address set API. It calls packet IO
specific MAC address set function.
Signed-off-by: Bogdan Pricope <bogdan.pricope@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Replace old lazy parsing code with a new packet parsing implementation
which follows the latest API (parsing level is selected using
odp_pktio_config()).
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Modify dpdk pktio to take advantage of multi-alloc/free. Others pktios do
alloc/free still one packet at a time. For example, l2fwd test application
packet throughput is increased about 10% (with dpdk pktio).
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Make print for example more platform independent and move
prints about pktio states in platform initialization code.
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
|
|
Remove all dependencies to helper by copying
protocol header definitions into linux-generic,
checked and decoupled all odph_* ODPH_* references.
Signed-off-by: Yi He <yi.he@linaro.org>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Modify packet parser functions to utilize new
packet_parser_t structure.
Renamed the main parser function _odp_parse_common() to
packet_parse_common(). packet_parse_common() now takes
also segment length as argument.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Removed 'int taken', so that 'enum state' is the only
variable which holds pktio entry state. Added PKTIO_ prefix
for better name space protection and code readability.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|