aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/pktio
AgeCommit message (Collapse)Author
2022-03-23Merge tag 'v1.35.0.0' of https://github.com/OpenDataPlane/odp into odp-dpdkMatias Elo
Signed-off-by: Matias Elo <matias.elo@nokia.com>
2022-03-02linux-gen: dpdk: implement new packet output queue size parameterMatias Elo
Implement new packet output queue size API for dpdk pktio. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2022-03-02linux-gen: loop: clean internal queue on device close/reconfigureMatias Elo
Free possible remaining packets in the implementation's internal plain queue during odp_pktio_close() or odp_pktout_queue_config(). Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2022-03-02linux-gen: loop: implement new packet output queue size parameterMatias Elo
Implement new packet output queue size API for loop pktio. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2022-02-21linux-gen: dpdk: fix potential undefined behavior with zero-copyTuomas Taipale
When freeing copied packets after zero-copy send, copy need was checked by accessing the packet header. At this point, the data may or may not be valid anymore. Fix this by saving the indices of copied packets already beforehand and use those for later access. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2022-02-08linux-gen: remove odp_api.h includes from implementationMatias Elo
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>
2022-02-07Merge tag 'v1.34.0.0' of https://github.com/OpenDataPlane/odp into odp-dpdkMatias Elo
Signed-off-by: Matias Elo <matias.elo@nokia.com>
2022-02-04linux-gen: packet: rename internal classifier metadata copy functionMatias Elo
Rename implementation internal copy_packet_cls_metadata() function to _odp_packet_copy_cls_md() to better align with internal function naming convention. The argument order has also been swapped for the same reason. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2022-02-03linux-gen: ipc: get rid of possible uninitialized variable accessJanne Peltonen
When compiling with LTO, the compiler may complain about uninitialized variable access in case odp_shm_info would fail. Return a pointer to a static string instead of an uninitialized pointer in that case. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-12-29linux-gen: pktio: socket: fix log textTuomas Taipale
Add missing whitespace to `sock_init_global()` log. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-12-16Merge tag 'v1.33.0.0' of https://github.com/OpenDataPlane/odp into odp-dpdkMatias Elo
Signed-off-by: Matias Elo <matias.elo@nokia.com>
2021-11-23linux-gen: buffer: use common event headerMatias Elo
Use common _odp_event_hdr_t in odp_buffer_hdr_t. Cache line alignment constraint has been moved to odp_buffer_hdr_t. The implementation internal scheduler and queue interfaces have been modified to use event headers instead of buffer headers. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-11-23linux-gen: packet: use common event headerMatias Elo
Use common _odp_event_hdr_t in odp_packet_hdr_t. Cache line alignment constraint has been moved to odp_packet_hdr_t. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-11-23Merge tag 'v1.32.1.0' of https://github.com/OpenDataPlane/odp into odp-dpdkMatias Elo
Signed-off-by: Matias Elo <matias.elo@nokia.com>
2021-11-12linux-gen: dpdk: packet parsing fixesMatias Elo
Merge fixes done to the generic packet parsing code (ad9638fd9, 50fe59300, adae181a7) into the DPDK specific packet parsing implementation. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-10-21linux-gen: use common debug print macroMatias Elo
Use common implementation internal debug macro ODP_DBG_LVL() to avoid "ISO C99 requires at least one argument for the "..." in a variadic macro" errors when building with 'pedantic' option. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-10-21linux-gen: fix print format build errorsMatias Elo
Fix "format '%p' expects argument of type 'void *'" errors when building with 'pedantic' option. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-10-21linux-gen: fix extra semicolon build errorsMatias Elo
Fix "ISO C does not allow extra ';' outside of a function" errors when building with 'pedantic' option. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-10-21linux-gen: pktio: fix empty translation unit build errorsMatias Elo
Fix "ISO C forbids an empty translation unit" errors when building with 'pedantic' option. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-10-21linux-gen: pktio: fix conversion overflow build errorsMatias Elo
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>
2021-10-11linux-gen: dpdk: packet parsing fixesMatias Elo
Merge fixes done to the generic packet parsing code (ad9638fd9, 50fe59300, adae181a7) into the DPDK specific packet parsing implementation. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-10-05Merge tag 'v1.32.0.0' of https://github.com/OpenDataPlane/odp into odp-dpdkMatias Elo
Signed-off-by: Matias Elo <matias.elo@nokia.com>
2021-09-23linux-gen: pktio: loop: fix parsing of segmented packetsJanne Peltonen
The receive processing in loop pktio processes packets that have the same underlying packet buffers as they had when sent. This means that, unlike other pktios that allocate packet buffers, loop may have packets with inconvenient segment boundaries in the receive path. Such packets may get parsed incorrectly since loop uses a parsing function that assumes contiguous packet data for the parsed headers. Fix the problem by doing parsing using odp_packet_parse() which can handle segmented packets too. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-08-18Merge tag 'v1.31.0.0' of https://github.com/OpenDataPlane/odp into odp-dpdkMatias Elo
Signed-off-by: Matias Elo <matias.elo@nokia.com>
2021-08-16linux-gen: dpdk: fix invalid mbuf data offsetMatias Elo
Fix the check in mbuf_update() which detects if mbuf data offset needs to be updated. The previous check didn't detect a scenario where data offset was not at default value (caused by e.g. odp_packet_push_head()). Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reported-and-tested-by: Christian Hong <guochun.hgc@alibaba-inc.com>
2021-07-13Merge tag 'v1.30.1.0' of https://github.com/OpenDataPlane/odp into odp-dpdkMatias Elo
Signed-off-by: Matias Elo <matias.elo@nokia.com>
2021-07-06linux-gen: pktio: fix DPDK 18.11 buildPetri Savolainen
Fix build for DPDK versions earlier than 19.11, which changed rte_eth_allmulticast_enable() prototype (added return value). This fix has been tested with DPDK v18.11. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-07-05linux-gen: dpdk: add configuration option for multicast frame receptionMatias Elo
Add configuration option 'pktio_dpdk.multicast_en' for DPDK pktio to enable/disable reception of all multicast frames. Fixes: https://github.com/OpenDataPlane/odp/issues/1326 Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reported-by: Bogdan Pricope <bogdan.pricope.2013@gmail.com>
2021-07-05linux-gen: pktio: use names other than index also as dpdk portsVijay Ram Inavolu
dpdk_open() only allows netdev string to be a port number This is to allow passing all other supported DPDK ports as well. Signed-off-by: Vijay Ram Inavolu <vinavolu@marvell.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-07-02Merge tag 'v1.30.0.0' of https://github.com/OpenDataPlane/odp into odp-dpdkMatias Elo
Signed-off-by: Matias Elo <matias.elo@nokia.com>
2021-06-23linux-gen: dpdk: implement extra statistics counters functionsMatias Elo
Add DPDK pktio level support for the new extra packet statistics APIs. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-23linux-gen: netmap: implement extra statistics counters functionsMatias Elo
Add netmap pktio level support for the new extra packet statistics APIs. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-23linux-gen: socket: implement extra statistics counters functionsMatias Elo
Add socket pktio level support for the new extra packet statistics APIs. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-23linux-gen: socket_mmap: implement extra statistics counters functionsMatias Elo
Add socket_mmap pktio level support for the new extra packet statistics APIs. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-23linux-gen: pktio: add internal wrapper functions for extra statisticsMatias Elo
Add internal wrapper functions for socket based pktio devices for reading extra pktio statistics. The wrapper functions call either ethtool or sysfs implementations. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-23linux-gen: pktio: read extra statistics using linux sysfsMatias Elo
Add internal functions for reading extra pktio statistics using Linux sysfs. These functions can be used by multiple pktio devices. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-23linux-gen: pktio: read extra statistics using ethtoolMatias Elo
Add internal functions for reading extra pktio statistics using ethtool. These functions can be used by multiple pktio devices. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-23linux-gen: pktio: add alternative ethtool statistics counter namesMatias Elo
The statistics counter names provided by ethtool are not standardized. Add alternative counter names to compare against to increase the possibility that all required counters are found. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-23linux-gen: socket: fix typo in sysfs pktio statisticsMatias Elo
Fix typo in RX dropped packet count path. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-23linux-gen: dpdk: add support for per queue statistics countersMatias Elo
Implement per input/output queues statistics counters for DPDK pktio. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-23linux-gen: dpdk: set per rx/tx queue statistics mappingsMatias Elo
Set per input/output queue statistics counter mappings for DPDK pktio. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-23linux-gen: loop: add support for per queue statistics countersMatias Elo
Implement per input/output queues statistics counters for loop pktio. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-23linux-gen: pktio: implement statistics counters capabilitiesMatias Elo
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>
2021-06-23linux-gen: pktio: add support for broadcast and multicast statisticsMatias Elo
Add support for multicast and broadcast packet input/output statistics counters for socket based pktio devices. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-21linux-gen: dpdk: enable c language posix extensionsMatias Elo
Enable POSIX and GNU extensions with DPDK parser as DPDK uses strnlen() internally. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-16linux-gen: dpdk: fix snap ethtype parsingMatias Elo
DPDK pktio SNAP ethtype parsing code was using incorrect pointer. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-06-11linux-gen: dpdk: don't enable input hashing automaticallyMatias Elo
Don't enable input hashing automatically for DPDK pktio. An application may reasonably expect that all packets will end up in the same input queue when input hashing is not enabled in odp_pktin_queue_param_t. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-06-11linux-gen: dpdk: don't fail on unsupported input hash protocolMatias Elo
Since there is no capability for the supported input hash protocols it's better to just print a debug message instead of fail odp_pktin_queue_config() if an unsupported input hash protocol was selected. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-05-27Merge tag 'v1.29.0.0' of https://github.com/OpenDataPlane/odp into odp-dpdkMatias Elo
Signed-off-by: Matias Elo <matias.elo@nokia.com>
2021-05-26Merge tag 'v1.28.0.0' of https://github.com/OpenDataPlane/odp into odp-dpdkMatias Elo
Signed-off-by: Matias Elo <matias.elo@nokia.com>