First set of packet and packet flag functions are inlined. Inline functions are used (can be used) internally always, but are exposed through API only when builing for non-ABI compatibility.
Packet handle value is changed from index(es) to a packet header pointer. Packet/buffer header structure or other internal types are not exposed to applications, but offsets to header fields are used instead. Ticketlock inlining was changed to the same file structure, which allows now also application to use inlined functions. Performance is improved significantly on both packet microbench (e.g. odp_packet_len() from 9 to 4 cycles per call) and l2fwd (packet rate +20%). Petri Savolainen (10): linux-gen: inline: rename _STATIC to _ODP_INLINE linux-gen: ticketlock: inline also in application linux-gen: packet: packet handle is hdr pointer test: l2fwd: add pktio driver print out validation: packet: print reason for suite init failure test: generator: various improvements test: l2fwd script: limit number of generator cpus test: l2fwd: use packet_data linux-gen: packet: inline functions linux-gen: packet: inline flag functions example/generator/odp_generator.c | 77 ++++-- platform/linux-generic/Makefile.am | 5 + platform/linux-generic/include/odp/api/packet.h | 11 +- .../linux-generic/include/odp/api/packet_flags.h | 11 +- .../include/odp/api/plat/atomic_inlines.h | 114 +++++---- .../include/odp/api/plat/byteorder_inlines.h | 24 +- .../include/odp/api/plat/packet_flag_inlines.h | 90 +++++++ .../include/odp/api/plat/packet_flag_inlines_api.h | 41 +++ .../include/odp/api/plat/packet_inlines.h | 173 +++++++++++++ .../include/odp/api/plat/packet_inlines_api.h | 113 +++++++++ .../include/odp/api/plat/packet_types.h | 87 ++++++- .../include/odp/api/plat/static_inline.h.in | 8 +- .../include/odp/api/plat/std_clib_inlines.h | 6 +- .../include/odp/api/plat/sync_inlines.h | 6 +- .../include/odp/api/plat/ticketlock_inlines.h | 19 +- .../include/odp/api/plat/ticketlock_inlines_api.h | 36 +++ .../linux-generic/include/odp/api/ticketlock.h | 4 + .../linux-generic/include/odp_packet_internal.h | 57 +---- platform/linux-generic/odp_packet.c | 278 ++++++++------------- platform/linux-generic/odp_packet_flags.c | 41 +-- platform/linux-generic/odp_ticketlock.c | 24 +- platform/linux-generic/pktio/dpdk.c | 5 +- platform/linux-generic/pktio/netmap.c | 5 +- test/common_plat/performance/Makefile.am | 4 + test/common_plat/performance/odp_l2fwd.c | 22 +- test/common_plat/performance/odp_l2fwd_run.sh | 10 +- test/common_plat/validation/api/packet/packet.c | 23 +- 27 files changed, 877 insertions(+), 417 deletions(-) create mode 100644 platform/linux-generic/include/odp/api/plat/packet_flag_inlines.h create mode 100644 platform/linux-generic/include/odp/api/plat/packet_flag_inlines_api.h create mode 100644 platform/linux-generic/include/odp/api/plat/packet_inlines.h create mode 100644 platform/linux-generic/include/odp/api/plat/packet_inlines_api.h create mode 100644 platform/linux-generic/include/odp/api/plat/ticketlock_inlines_api.h -- 2.8.1