From b51120de9b46f56f9081a239cac15176544c2c6a Mon Sep 17 00:00:00 2001 From: Ivan Khoronzhuk Date: Thu, 24 Mar 2016 16:42:36 +0200 Subject: linux-ks2: packet_io_internal: don't parse already parsed packets If packet was already parsed, then no need to parse it once again. It allows to use parse function in different places. Signed-off-by: Ivan Khoronzhuk --- platform/linux-keystone2/include/odp_packet_io_internal.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/platform/linux-keystone2/include/odp_packet_io_internal.h b/platform/linux-keystone2/include/odp_packet_io_internal.h index b2e1f5a7..6e60f4e6 100644 --- a/platform/linux-keystone2/include/odp_packet_io_internal.h +++ b/platform/linux-keystone2/include/odp_packet_io_internal.h @@ -27,6 +27,11 @@ static inline void pktin_update_event(odp_event_t ev, queue_entry_t *qentry) { odp_packet_t pkt = odp_packet_from_event(ev); struct odp_pkthdr *hdr = _odp_pkt_hdr(pkt); + + /* if packet is alredy parsed, just exit */ + if (hdr->input_flags.all) + return; + hdr->input = qentry->pktin; ODP_DBG("Received packet ---------\n"); #ifdef SW_PARSING -- cgit v1.2.3