From patchwork Wed May 13 12:38:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 48442 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3248B2121F for ; Wed, 13 May 2015 12:38:48 +0000 (UTC) Received: by wizk4 with SMTP id k4sf10845841wiz.2 for ; Wed, 13 May 2015 05:38:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=NdaitqMoY5jCIPFwuIuV9qax44T5gXdpptckepw+cJo=; b=WAbDt+MmQA650/Vp94ukl91D6fNn5eG8aRaqeJHI7Nt6EjXB90mldroD8zI2xt93yn dDl+goJwDJf4mN2xBl3vEqxNXol70F2iAyB1SjbdZ9yKSBqVT5Nswx+p+Vp6Q9jcSUGs uS6fWoPyff6fbHNNlLOrsgWV7HnFw8366LztmjqlTWr+ebwnP915k6FpV+Re0+ycc8zl h2whuOYVEt5w3hrqXvlsilEuqmSgEXYm6ugqb3oucI1SobwwciDOipyCCN/uNOpUv0rV rfKFF1j5131ZFZnm/Mf1+CqDlARBPPNcey/F1R7NZLd466IPrByna0a00e1/KyIWY+Pr +Gvg== X-Gm-Message-State: ALoCoQlHPGOYeX+/9Vi1oUDfYPsNqwJzk/0OiuvGVNj0P+1AcHWeguwNaLMt/BksuDROwuCYrWyJ X-Received: by 10.112.166.137 with SMTP id zg9mr14002962lbb.11.1431520727403; Wed, 13 May 2015 05:38:47 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.30.37 with SMTP id p5ls218609lah.9.gmail; Wed, 13 May 2015 05:38:47 -0700 (PDT) X-Received: by 10.152.3.161 with SMTP id d1mr6991482lad.70.1431520727247; Wed, 13 May 2015 05:38:47 -0700 (PDT) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id az14si12293974lab.154.2015.05.13.05.38.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 May 2015 05:38:47 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by lagv1 with SMTP id v1so28228955lag.3 for ; Wed, 13 May 2015 05:38:47 -0700 (PDT) X-Received: by 10.152.36.2 with SMTP id m2mr15623934laj.72.1431520727096; Wed, 13 May 2015 05:38:47 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp507963lbb; Wed, 13 May 2015 05:38:46 -0700 (PDT) X-Received: by 10.140.88.242 with SMTP id t105mr25642200qgd.92.1431520725492; Wed, 13 May 2015 05:38:45 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 16si19182209qhu.131.2015.05.13.05.38.44; Wed, 13 May 2015 05:38:45 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: by lists.linaro.org (Postfix, from userid 109) id 6F1AF61E3A; Wed, 13 May 2015 12:38:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 92C9E61D43; Wed, 13 May 2015 12:38:41 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 46CF361E01; Wed, 13 May 2015 12:38:39 +0000 (UTC) Received: from mail-ob0-f170.google.com (mail-ob0-f170.google.com [209.85.214.170]) by lists.linaro.org (Postfix) with ESMTPS id 1ABF261E03 for ; Wed, 13 May 2015 12:38:36 +0000 (UTC) Received: by obblk2 with SMTP id lk2so28453911obb.0 for ; Wed, 13 May 2015 05:38:35 -0700 (PDT) X-Received: by 10.182.97.138 with SMTP id ea10mr15661097obb.11.1431520715596; Wed, 13 May 2015 05:38:35 -0700 (PDT) Received: from localhost.localdomain (cpe-24-28-70-239.austin.res.rr.com. [24.28.70.239]) by mx.google.com with ESMTPSA id s3sm12734183obt.27.2015.05.13.05.38.34 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 May 2015 05:38:34 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Wed, 13 May 2015 07:38:30 -0500 Message-Id: <1431520710-2525-1-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.0 X-Topics: patch Subject: [lng-odp] [PATCHv6] linux-generic: packet: Add lazy parsing support X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: bill.fischofer@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Lazy parsing defers parsing until the results are actually needed. This allows applications that do their own parsing and never reference ODP parse results to avoid the overhead of SW parsing. Signed-off-by: Bill Fischofer Reviewed-by: Zoltan Kiss --- Changes in v6: - Added lazy parse hook in classifier since it references internals for perf Changes in v5: - Streamline implementation for odp-dpdk compatibility Changes in v4: - Rebase to avoid merge conflicts with commit db1f4e58 Changes in v3: - Incorporate review comments from Maxim Changes in v2; - Corrected processing of odp_packet_has_error() .../linux-generic/include/odp_packet_internal.h | 13 +++- platform/linux-generic/odp_classification.c | 4 + platform/linux-generic/odp_packet.c | 30 ++++++-- platform/linux-generic/odp_packet_flags.c | 86 +++++++++++++--------- platform/linux-generic/odp_packet_io.c | 2 +- platform/linux-generic/odp_packet_socket.c | 6 +- 6 files changed, 95 insertions(+), 46 deletions(-) diff --git a/platform/linux-generic/include/odp_packet_internal.h b/platform/linux-generic/include/odp_packet_internal.h index 90dfe80..9890dc8 100644 --- a/platform/linux-generic/include/odp_packet_internal.h +++ b/platform/linux-generic/include/odp_packet_internal.h @@ -34,7 +34,8 @@ typedef union { uint32_t all; struct { - /* Bitfield flags for each protocol */ + uint32_t unparsed:1; /**< Set to inticate parse needed */ + uint32_t l2:1; /**< known L2 protocol present */ uint32_t l3:1; /**< known L3 protocol present */ uint32_t l4:1; /**< known L4 protocol present */ @@ -245,6 +246,14 @@ static inline void packet_set_len(odp_packet_t pkt, uint32_t len) odp_packet_hdr(pkt)->frame_len = len; } +#define ODP_PACKET_UNPARSED ~0 + +static inline void _odp_packet_reset_parse(odp_packet_t pkt) +{ + odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt); + pkt_hdr->input_flags.all = ODP_PACKET_UNPARSED; +} + /* Forward declarations */ int _odp_packet_copy_to_packet(odp_packet_t srcpkt, uint32_t srcoffset, odp_packet_t dstpkt, uint32_t dstoffset, @@ -254,7 +263,7 @@ void _odp_packet_copy_md_to_packet(odp_packet_t srcpkt, odp_packet_t dstpkt); odp_packet_t _odp_packet_alloc(odp_pool_t pool_hdl); -int _odp_packet_parse(odp_packet_t pkt); +int _odp_packet_parse(odp_packet_hdr_t *pkt_hdr); /* Convert a packet handle to a buffer handle */ odp_buffer_t _odp_packet_to_buffer(odp_packet_t pkt); diff --git a/platform/linux-generic/odp_classification.c b/platform/linux-generic/odp_classification.c index 0e46b1b..fdb544d 100644 --- a/platform/linux-generic/odp_classification.c +++ b/platform/linux-generic/odp_classification.c @@ -823,6 +823,10 @@ cos_t *pktio_select_cos(pktio_entry_t *entry, uint8_t *pkt_addr, cls = &entry->s.cls; + /* Check for lazy parse needed */ + if (pkt_hdr->input_flags.unparsed) + _odp_packet_parse(pkt_hdr); + /* Return error cos for error packet */ if (pkt_hdr->error_flags.all) return cls->error_cos; diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index 3ef0267..668ddda 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -242,12 +242,17 @@ uint32_t odp_packet_user_area_size(odp_packet_t pkt) void *odp_packet_l2_ptr(odp_packet_t pkt, uint32_t *len) { odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt); + if (pkt_hdr->input_flags.unparsed) + _odp_packet_parse(pkt_hdr); return packet_map(pkt_hdr, pkt_hdr->l2_offset, len); } uint32_t odp_packet_l2_offset(odp_packet_t pkt) { - return odp_packet_hdr(pkt)->l2_offset; + odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt); + if (pkt_hdr->input_flags.unparsed) + _odp_packet_parse(pkt_hdr); + return pkt_hdr->l2_offset; } int odp_packet_l2_offset_set(odp_packet_t pkt, uint32_t offset) @@ -257,6 +262,8 @@ int odp_packet_l2_offset_set(odp_packet_t pkt, uint32_t offset) if (offset >= pkt_hdr->frame_len) return -1; + if (pkt_hdr->input_flags.unparsed) + _odp_packet_parse(pkt_hdr); pkt_hdr->l2_offset = offset; return 0; } @@ -264,12 +271,17 @@ int odp_packet_l2_offset_set(odp_packet_t pkt, uint32_t offset) void *odp_packet_l3_ptr(odp_packet_t pkt, uint32_t *len) { odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt); + if (pkt_hdr->input_flags.unparsed) + _odp_packet_parse(pkt_hdr); return packet_map(pkt_hdr, pkt_hdr->l3_offset, len); } uint32_t odp_packet_l3_offset(odp_packet_t pkt) { - return odp_packet_hdr(pkt)->l3_offset; + odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt); + if (pkt_hdr->input_flags.unparsed) + _odp_packet_parse(pkt_hdr); + return pkt_hdr->l3_offset; } int odp_packet_l3_offset_set(odp_packet_t pkt, uint32_t offset) @@ -279,6 +291,8 @@ int odp_packet_l3_offset_set(odp_packet_t pkt, uint32_t offset) if (offset >= pkt_hdr->frame_len) return -1; + if (pkt_hdr->input_flags.unparsed) + _odp_packet_parse(pkt_hdr); pkt_hdr->l3_offset = offset; return 0; } @@ -286,12 +300,17 @@ int odp_packet_l3_offset_set(odp_packet_t pkt, uint32_t offset) void *odp_packet_l4_ptr(odp_packet_t pkt, uint32_t *len) { odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt); + if (pkt_hdr->input_flags.unparsed) + _odp_packet_parse(pkt_hdr); return packet_map(pkt_hdr, pkt_hdr->l4_offset, len); } uint32_t odp_packet_l4_offset(odp_packet_t pkt) { - return odp_packet_hdr(pkt)->l4_offset; + odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt); + if (pkt_hdr->input_flags.unparsed) + _odp_packet_parse(pkt_hdr); + return pkt_hdr->l4_offset; } int odp_packet_l4_offset_set(odp_packet_t pkt, uint32_t offset) @@ -301,6 +320,8 @@ int odp_packet_l4_offset_set(odp_packet_t pkt, uint32_t offset) if (offset >= pkt_hdr->frame_len) return -1; + if (pkt_hdr->input_flags.unparsed) + _odp_packet_parse(pkt_hdr); pkt_hdr->l4_offset = offset; return 0; } @@ -814,9 +835,8 @@ static inline void parse_udp(odp_packet_hdr_t *pkt_hdr, * Simple packet parser */ -int _odp_packet_parse(odp_packet_t pkt) +int _odp_packet_parse(odp_packet_hdr_t *pkt_hdr) { - odp_packet_hdr_t *const pkt_hdr = odp_packet_hdr(pkt); odph_ethhdr_t *eth; odph_vlanhdr_t *vlan; uint16_t ethtype; diff --git a/platform/linux-generic/odp_packet_flags.c b/platform/linux-generic/odp_packet_flags.c index ab3d12f..4f680a1 100644 --- a/platform/linux-generic/odp_packet_flags.c +++ b/platform/linux-generic/odp_packet_flags.c @@ -7,182 +7,198 @@ #include #include +#define retflag(p, x) do { \ + odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(p); \ + if (pkt_hdr->input_flags.unparsed) \ + _odp_packet_parse(pkt_hdr); \ + return pkt_hdr->x; \ + } while (0) + +#define setflag(p, x, v) do { \ + odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(p); \ + if (pkt_hdr->input_flags.unparsed) \ + _odp_packet_parse(pkt_hdr); \ + pkt_hdr->x = v & 1; \ + } while (0) int odp_packet_has_error(odp_packet_t pkt) { - return (odp_packet_hdr(pkt)->error_flags.all != 0); + odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt); + if (pkt_hdr->input_flags.unparsed) + _odp_packet_parse(pkt_hdr); + return odp_packet_hdr(pkt)->error_flags.all != 0; } /* Get Input Flags */ int odp_packet_has_l2(odp_packet_t pkt) { - return odp_packet_hdr(pkt)->input_flags.l2; + retflag(pkt, input_flags.l2); } int odp_packet_has_l3(odp_packet_t pkt) { - return odp_packet_hdr(pkt)->input_flags.l3; + retflag(pkt, input_flags.l3); } int odp_packet_has_l4(odp_packet_t pkt) { - return odp_packet_hdr(pkt)->input_flags.l4; + retflag(pkt, input_flags.l4); } int odp_packet_has_eth(odp_packet_t pkt) { - return odp_packet_hdr(pkt)->input_flags.eth; + retflag(pkt, input_flags.eth); } int odp_packet_has_jumbo(odp_packet_t pkt) { - return odp_packet_hdr(pkt)->input_flags.jumbo; + retflag(pkt, input_flags.jumbo); } int odp_packet_has_vlan(odp_packet_t pkt) { - return odp_packet_hdr(pkt)->input_flags.vlan; + retflag(pkt, input_flags.vlan); } int odp_packet_has_vlan_qinq(odp_packet_t pkt) { - return odp_packet_hdr(pkt)->input_flags.vlan_qinq; + retflag(pkt, input_flags.vlan_qinq); } int odp_packet_has_arp(odp_packet_t pkt) { - return odp_packet_hdr(pkt)->input_flags.arp; + retflag(pkt, input_flags.arp); } int odp_packet_has_ipv4(odp_packet_t pkt) { - return odp_packet_hdr(pkt)->input_flags.ipv4; + retflag(pkt, input_flags.ipv4); } int odp_packet_has_ipv6(odp_packet_t pkt) { - return odp_packet_hdr(pkt)->input_flags.ipv6; + retflag(pkt, input_flags.ipv6); } int odp_packet_has_ipfrag(odp_packet_t pkt) { - return odp_packet_hdr(pkt)->input_flags.ipfrag; + retflag(pkt, input_flags.ipfrag); } int odp_packet_has_ipopt(odp_packet_t pkt) { - return odp_packet_hdr(pkt)->input_flags.ipopt; + retflag(pkt, input_flags.ipopt); } int odp_packet_has_ipsec(odp_packet_t pkt) { - return odp_packet_hdr(pkt)->input_flags.ipsec; + retflag(pkt, input_flags.ipsec); } int odp_packet_has_udp(odp_packet_t pkt) { - return odp_packet_hdr(pkt)->input_flags.udp; + retflag(pkt, input_flags.udp); } int odp_packet_has_tcp(odp_packet_t pkt) { - return odp_packet_hdr(pkt)->input_flags.tcp; + retflag(pkt, input_flags.tcp); } int odp_packet_has_sctp(odp_packet_t pkt) { - return odp_packet_hdr(pkt)->input_flags.sctp; + retflag(pkt, input_flags.sctp); } int odp_packet_has_icmp(odp_packet_t pkt) { - return odp_packet_hdr(pkt)->input_flags.icmp; + retflag(pkt, input_flags.icmp); } /* Set Input Flags */ void odp_packet_has_l2_set(odp_packet_t pkt, int val) { - odp_packet_hdr(pkt)->input_flags.l2 = val; + setflag(pkt, input_flags.l2, val); } void odp_packet_has_l3_set(odp_packet_t pkt, int val) { - odp_packet_hdr(pkt)->input_flags.l3 = val; + setflag(pkt, input_flags.l3, val); } void odp_packet_has_l4_set(odp_packet_t pkt, int val) { - odp_packet_hdr(pkt)->input_flags.l4 = val; + setflag(pkt, input_flags.l4, val); } void odp_packet_has_eth_set(odp_packet_t pkt, int val) { - odp_packet_hdr(pkt)->input_flags.eth = val; + setflag(pkt, input_flags.eth, val); } void odp_packet_has_jumbo_set(odp_packet_t pkt, int val) { - odp_packet_hdr(pkt)->input_flags.jumbo = val; + setflag(pkt, input_flags.jumbo, val); } void odp_packet_has_vlan_set(odp_packet_t pkt, int val) { - odp_packet_hdr(pkt)->input_flags.vlan = val; + setflag(pkt, input_flags.vlan, val); } void odp_packet_has_vlan_qinq_set(odp_packet_t pkt, int val) { - odp_packet_hdr(pkt)->input_flags.vlan_qinq = val; + setflag(pkt, input_flags.vlan_qinq, val); } void odp_packet_has_arp_set(odp_packet_t pkt, int val) { - odp_packet_hdr(pkt)->input_flags.arp = val; + setflag(pkt, input_flags.arp, val); } void odp_packet_has_ipv4_set(odp_packet_t pkt, int val) { - odp_packet_hdr(pkt)->input_flags.ipv4 = val; + setflag(pkt, input_flags.ipv4, val); } void odp_packet_has_ipv6_set(odp_packet_t pkt, int val) { - odp_packet_hdr(pkt)->input_flags.ipv6 = val; + setflag(pkt, input_flags.ipv6, val); } void odp_packet_has_ipfrag_set(odp_packet_t pkt, int val) { - odp_packet_hdr(pkt)->input_flags.ipfrag = val; + setflag(pkt, input_flags.ipfrag, val); } void odp_packet_has_ipopt_set(odp_packet_t pkt, int val) { - odp_packet_hdr(pkt)->input_flags.ipopt = val; + setflag(pkt, input_flags.ipopt, val); } void odp_packet_has_ipsec_set(odp_packet_t pkt, int val) { - odp_packet_hdr(pkt)->input_flags.ipsec = val; + setflag(pkt, input_flags.ipsec, val); } void odp_packet_has_udp_set(odp_packet_t pkt, int val) { - odp_packet_hdr(pkt)->input_flags.udp = val; + setflag(pkt, input_flags.udp, val); } void odp_packet_has_tcp_set(odp_packet_t pkt, int val) { - odp_packet_hdr(pkt)->input_flags.tcp = val; + setflag(pkt, input_flags.tcp, val); } void odp_packet_has_sctp_set(odp_packet_t pkt, int val) { - odp_packet_hdr(pkt)->input_flags.sctp = val; + setflag(pkt, input_flags.sctp, val); } void odp_packet_has_icmp_set(odp_packet_t pkt, int val) { - odp_packet_hdr(pkt)->input_flags.icmp = val; + setflag(pkt, input_flags.icmp, val); } diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index f16685d..5ae24b9 100644 --- a/platform/linux-generic/odp_packet_io.c +++ b/platform/linux-generic/odp_packet_io.c @@ -378,7 +378,7 @@ static int deq_loopback(pktio_entry_t *pktio_entry, odp_packet_t pkts[], for (i = 0; i < nbr; ++i) { pkts[i] = _odp_packet_from_buffer(odp_hdr_to_buf(hdr_tbl[i])); - _odp_packet_parse(pkts[i]); + _odp_packet_reset_parse(pkts[i]); } return nbr; diff --git a/platform/linux-generic/odp_packet_socket.c b/platform/linux-generic/odp_packet_socket.c index 2802c43..9272146 100644 --- a/platform/linux-generic/odp_packet_socket.c +++ b/platform/linux-generic/odp_packet_socket.c @@ -251,7 +251,7 @@ int recv_pkt_sock_basic(pkt_sock_t *const pkt_sock, /* Parse and set packet header data */ odp_packet_pull_tail(pkt, pkt_sock->max_frame_len - recv_bytes); - _odp_packet_parse(pkt); + _odp_packet_reset_parse(pkt); pkt_table[nb_rx] = pkt; pkt = ODP_PACKET_INVALID; @@ -360,7 +360,7 @@ int recv_pkt_sock_mmsg(pkt_sock_t *const pkt_sock, odp_packet_pull_tail(pkt_table[i], pkt_sock->max_frame_len - msgvec[i].msg_len); - _odp_packet_parse(pkt_table[i]); + _odp_packet_reset_parse(pkt_table[i]); pkt_table[nb_rx] = pkt_table[i]; nb_rx++; @@ -519,7 +519,7 @@ static inline unsigned pkt_mmap_v2_rx(int sock, struct ring *ring, mmap_rx_user_ready(ppd.raw); /* Parse and set packet header data */ - _odp_packet_parse(pkt_table[i]); + _odp_packet_reset_parse(pkt_table[i]); frame_num = next_frame_num; i++;