This patch is now merged, although I had some doubts that it has bad impact on performance. Here are some performance results for couple of simple, single thread packet alloc/free test cases. No references involved, just plain packets as before.
Test results before and after "linux-generic: packet: implement reference apis": CPU cycles per operation before after packet_alloc 127.8 250.9 +96 % packet_alloc_multi 873.7 1538.8 +76 % packet_free 31 116.8 +277 % packet_free_multi 214.5 1369.2 +538 % packet_alloc_free 73.4 193.7 +164 % packet_alloc_free_multi 286.1 1228.8 +330 % Huge performance degradation. Numbers are now many times worse than before or after my optimizations. To me this shows that almost a complete rewrite (or revert) is needed. -Petri > -----Original Message----- > From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of Bill > Fischofer > Sent: Thursday, January 05, 2017 4:56 PM > To: lng-odp@lists.linaro.org > Subject: [lng-odp] [API-NEXT PATCHv6 2/5] linux-generic: packet: implement > reference apis > > Implement the APIs: > - odp_packet_ref_static() > - odp_packet_ref() > - odp_packet_ref_pkt() > - odp_packet_is_ref() > - odp_packet_unshared_len() > > This also involves functional upgrades to the existing packet manipulation > APIs to work with packet references as input arguments. > > Signed-off-by: Bill Fischofer <bill.fischo...@linaro.org> > --- > .../linux-generic/include/odp_packet_internal.h | 73 ++- > platform/linux-generic/odp_packet.c | 542