aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>2016-03-24 16:42:36 +0200
committerIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>2016-03-24 20:06:22 +0200
commitb51120de9b46f56f9081a239cac15176544c2c6a (patch)
tree487972893e2c2d68c08531f44a593dec97ade773
parentdd9f4a45f4b657d67b24517f8ca9e3af0b52f9a7 (diff)
downloadodp-keystone2-b51120de9b46f56f9081a239cac15176544c2c6a.tar.gz
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 <ivan.khoronzhuk@linaro.org>
-rw-r--r--platform/linux-keystone2/include/odp_packet_io_internal.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/linux-keystone2/include/odp_packet_io_internal.h b/platform/linux-keystone2/include/odp_packet_io_internal.h
index b2e1f5a..6e60f4e 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