I've posted patch http://patches.opendataplane.org/patch/1511/ to add lazy parsing support to linux-generic. Needs to be ported to odp-dpdk but that should be straightforward.
This version implements all/none lazy parsing. The first reference to any ODP parse results API causes a full parse to be performed. But for apps that never make such calls then no ODP parsing is performed. There is a slight performance penalty for those apps that do use ODP parsing since the code has to check whether a parse is needed. Need to quantify that to see if it's significant in real world apps. On Wed, Apr 29, 2015 at 10:43 AM, Ola Liljedahl <[email protected]> wrote: > I disprove of this patch. There are ways to accomplish what we need > without changing the API. > > On 29 April 2015 at 15:06, Maxim Uvarov <[email protected]> wrote: > >> On 04/23/2015 13:29, Petri Savolainen wrote: >> >>> Application can indicate which packet parsing results it is >>> interested in (all or none). >>> >>> Signed-off-by: Petri Savolainen <[email protected]> >>> --- >>> include/odp/api/packet_flags.h | 1 + >>> include/odp/api/packet_io.h | 13 +++++++++++++ >>> 2 files changed, 14 insertions(+) >>> >>> diff --git a/include/odp/api/packet_flags.h >>> b/include/odp/api/packet_flags.h >>> index bfbcc94..ee5dd33 100644 >>> --- a/include/odp/api/packet_flags.h >>> +++ b/include/odp/api/packet_flags.h >>> @@ -26,6 +26,7 @@ extern "C" { >>> * @{ >>> */ >>> + >>> >> no need to do that. >> >>> /** >>> * Check for packet errors >>> * >>> diff --git a/include/odp/api/packet_io.h b/include/odp/api/packet_io.h >>> index 77c207e..4656204 100644 >>> --- a/include/odp/api/packet_io.h >>> +++ b/include/odp/api/packet_io.h >>> @@ -18,6 +18,7 @@ >>> extern "C" { >>> #endif >>> + >>> >> no need to do that. >> >>> /** @defgroup odp_packet_io ODP PACKET IO >>> * Operations on a packet. >>> * @{ >>> @@ -58,6 +59,16 @@ enum odp_pktio_input_mode { >>> }; >>> /** >>> + * Packet parsing mode >>> + */ >>> +enum odp_pktio_parse_mode { >>> + /** Parse all protocols */ >>> + ODP_PKTIN_PARSE_ALL = 0, >>> + /** Parsing not needed */ >>> + ODP_PKTIN_PARSE_NONE >>> +}; >>> + >>> +/** >>> * Packet IO parameters >>> * >>> * In minimum, user must select the input mode. Use 0 for defaults. >>> Initialize >>> @@ -66,6 +77,8 @@ enum odp_pktio_input_mode { >>> typedef struct odp_pktio_param_t { >>> /** Packet input mode */ >>> enum odp_pktio_input_mode in_mode; >>> + /** Packet parse mode */ >>> + enum odp_pktio_parse_mode parse_mode; >>> } odp_pktio_param_t; >>> /** >>> >> >> _______________________________________________ >> lng-odp mailing list >> [email protected] >> https://lists.linaro.org/mailman/listinfo/lng-odp >> > > > _______________________________________________ > lng-odp mailing list > [email protected] > https://lists.linaro.org/mailman/listinfo/lng-odp > >
_______________________________________________ lng-odp mailing list [email protected] https://lists.linaro.org/mailman/listinfo/lng-odp
