This patch series does a number of things but the main purpose is to get the ODP packet example working in the current form. The main issue was that the netmap I/O was not designed to handle multiple threads opening its own pktio instance over the same device. This works seamlessly with socket I/O but with netmap special care is needed to synchronize access (to what is effectively the same hardware resources) from concurent access.
First patch updates to currently latest netmap v11.1. This is needed because of the API additions, better support for latest kernels and other fixes they made upstream. The second patch fixes an issue that appears when using odp_schedule. Before this each thread used to get its own mapping of the netmap memory which caused problems when a thread would receive a packet from a pktio that was opened by another thread, hence a different mmap address. Burst I/O was not affected of course. The third patch is a rework of the pkt I/O for two reasons: cleaner implementation based on already existing APIs and better structure for adding locking in patch 4. Basically paving the way for last patch. Last patch introduces an array of devices together with RX and TX spinlocks. Any new pktio that opens the same device (identified by name) references the same dev structure with the same locks. Finally the locks are used in the RX and TX routines which together with the previous patch allows for the packet example to work with any number of threads without errors. Ciprian Barbu (4): Update to netmap_v11.1 Use single mmap address for all pktios Refactor netmap I/O using existing APIs Added per-device lock platform/linux-netmap/Makefile.am | 2 +- platform/linux-netmap/README | 23 +- platform/linux-netmap/include/odp_internal.h | 51 ++++ platform/linux-netmap/include/odp_packet_netmap.h | 28 +- platform/linux-netmap/odp_init.c | 96 +++++++ platform/linux-netmap/odp_packet_netmap.c | 336 ++++++++++------------ 6 files changed, 336 insertions(+), 200 deletions(-) create mode 100644 platform/linux-netmap/include/odp_internal.h create mode 100644 platform/linux-netmap/odp_init.c -- 1.8.3.2 _______________________________________________ lng-odp mailing list [email protected] http://lists.linaro.org/mailman/listinfo/lng-odp
