aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/pktio/io_ops.c
AgeCommit message (Collapse)Author
2021-02-26linux-gen: rename remaining global symbols in the static libraryJere Leppänen
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>
2020-12-23linux-gen: rename some global symbols in the static libraryJere Leppänen
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>
2019-10-07linux-gen: rename implementation internal autoheader definesMatias Elo
Rename implementation internal defines so that they stand out from the API defines. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2019-10-07linux-gen: include only ODP defines in autogenerated header filesMatias Elo
The config.h file has been split into three parts: autoheader_build.h: should NOT be included by ANY source file autoheader_external.h: can be included by any source file, including public headers autoheader_internal.h: can be included by any internal source file, but NOT by public headers autoheader_external.h and autoheader_internal.h are generated based on matching template files (*.in) and include only ODP defines. autoheader_build.h includes all build defines and should not be included by any source file. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2019-10-07linux-gen: rename ODP implementation internal configure definesMatias Elo
Rename implementation internal defines so that they stand out from the autoheader defines. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2019-09-27linux-gen: include config.h header in install directoryMatias Elo
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>
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-24linux-generic: pktio: add null pktio supportJuha-Matti Tilli
Sometimes, you may wish to run an application by using a dummy interface that never receives any packets and that discards transmitted packets. This is possible with non-looping pcap pktio with no input and output pcaps. So, the pktio would be just "pcap:". However, you cannot have two pktios named "pcap:" because there is code to check if the pktio is already opened. Also, the pcap pktio requires that ODP is compiled with the pcap library, which it may not be. Also, pcap is always single-queue and therefore not suitable for modern multi-queue applications. Also, recently a patch was provided to ODP to allow interruptible sleep when receiving packets. This, however, does not work with mixed pcap and socket/netmap pktio types. To fix these issues, a new "null" pktio is introduced. It is used by specifying the interface name to be "null:0", "null:1", or similar. All packets sent to the null pktio are discarded and no packets are received. The null pktio fully supports the interruptible sleep infrastructure, meaning applications can have 0% idle CPU load when one interface is a null interface and another interface is socket or netmap. Signed-off-by: Juha-Matti Tilli <juha-matti.tilli@iki.fi> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-08-25linux-gen: drop _ODP_PKTIO_IPC defineDmitry Eremin-Solenikov
Since 39b3a1681097638 ("linux-gen: remove pktio ipc option from configure") IPC pktio is enabled unconditionally. Drop define guarding conditional compilation of several remaining bits. Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-08-25linux-gen: use config.h headerDmitry Eremin-Solenikov
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-18linux-generic: pktio: add option to enable and disable ipc pktioMaxim Uvarov
With more options to enable/disable features it's more easy to isolate and debug problem if any. For now I have suspitious that in CI make check runs in parallel with other make checks which share the same pool memory. I.e. one process can corrupt memory for other process. Moving IPC to option it will be easy to debug that. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2016-02-16linux-generic: pktio: add dpdk pktio build supportMatias Elo
Add initial support for building ODP with DPDK pktio. Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Matias Elo <matias.elo@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-12linux-generic: add ipc pktio supportMaxim Uvarov
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-14linux-generic: pktio: add tap pktio typeIlya Maximets
Creates a new pktio type that allows for creating and sending/receiving packets through TAP interface. It is intended for use as a simple conventional communication method between applications that use kernel network stack (ping, ssh, iperf, etc.) and ODP applications for the purpose of functional testing and can be used as it is with some of the existing example applications. To use this interface the name passed to odp_pktio_open() must begin with "tap:" and be in the format: tap:iface iface the name of TAP device to be created. TUN/TAP kernel module should be loaded to use this pktio. There should be no device named 'iface' in the system. The total length of the 'iface' is limited by IF_NAMESIZE. Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Reviewed-and-tested-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-10-20linux-generic: pktio: add pcap pktio typeStuart Haslam
Create a new pktio type that allows for reading from and writing to a pcap capture file. This is intended to be used as a simple way of injecting test packets into an application for functional testing and can be used as it is with some of the existing example applications. To use this interface the name passed to odp_pktio_open() must begin with "pcap:" and be in the format; pcap:in=test.pcap:out=test_out.pcap:loops=10 in the name of the input pcap file. If no input file is given attempts to receive from the pktio will just return no packets. out the name of the output pcap file. If no output file is given any packets transmitted over the interface will just be freed. loops the number of times to iterate through the input file, set to 0 to loop indefinitely. The default value is 1. Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-10-08linux-generic: pktio: add netmap pktio supportMatias Elo
Added new netmap pktio interface type which operates in the same manner as the existing socket io interfaces. The code is based on the odp-netmap branch. Using netmap io requires netmap headers and loaded netmap kernel module. Netmap can be installed from https://github.com/luigirizzo/netmap. ODP netmap support is enabled using --with-netmap-path=<netmap_dir> configuration option. If netmap kernel module is loaded when starting ODP application netmap io will be used by default. If the module is not found standard socket io is used. Netmap io can be disabled with ODP_PKTIO_DISABLE_NETMAP environment variable. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-and-tested by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-08-18linux-generic: pktio: remove basic socket implementationNicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Reviewed-and-Tested-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-07-16linux-generic: packet_io: use generic interface for pktio implementationsNicolas Morey-Chaisemartin
Each packet_io type now implements a pktio_if_ops_t structure which serves as the only interface use by odp_packet_io.c. The type of a device is retrieved by calling the pktio_XX open function in order from the global pktio_if_ops struct and by stopping on the first successful order. As a result odp_pktio_type_t has been removed, and implementation can be extended by just adding a new pktio_if_opts_t structure to pktio_if_opts Signed-off-by: Clément Leger <cleger@kalray.eu> Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>