Message ID | 1430327107-5788-1-git-send-email-zoltan.kiss@linaro.org |
---|---|
State | New |
Headers | show |
Need to evaluate this against patch http://patches.opendataplane.org/patch/1511/ which implements lazy parsing as an alternative to the API change. On Wed, Apr 29, 2015 at 12:05 PM, Zoltan Kiss <zoltan.kiss@linaro.org> wrote: > All the examples are setting the param structure to 0, and > ODP_PKTIN_PARSE_ALL > is 0, so no need to change their default behavious. > > Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> > --- > platform/linux-generic/odp_packet.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/platform/linux-generic/odp_packet.c > b/platform/linux-generic/odp_packet.c > index 2abb465..c652bec 100644 > --- a/platform/linux-generic/odp_packet.c > +++ b/platform/linux-generic/odp_packet.c > @@ -833,6 +833,11 @@ int _odp_packet_parse(odp_packet_t pkt) > uint8_t *parseptr; > uint32_t offset, seglen; > uint8_t ip_proto = 0; > + pktio_entry_t *pktio_entry = get_pktio_entry(pkt_hdr->input); > + enum odp_pktio_parse_mode parse_mode = > pktio_entry->s.param.parse_mode; > + > + if (parse_mode == ODP_PKTIN_PARSE_NONE) > + return 0; > > /* Reset parser metadata for new parse */ > pkt_hdr->error_flags.all = 0; > -- > 1.9.1 > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp >
diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index 2abb465..c652bec 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -833,6 +833,11 @@ int _odp_packet_parse(odp_packet_t pkt) uint8_t *parseptr; uint32_t offset, seglen; uint8_t ip_proto = 0; + pktio_entry_t *pktio_entry = get_pktio_entry(pkt_hdr->input); + enum odp_pktio_parse_mode parse_mode = pktio_entry->s.param.parse_mode; + + if (parse_mode == ODP_PKTIN_PARSE_NONE) + return 0; /* Reset parser metadata for new parse */ pkt_hdr->error_flags.all = 0;
All the examples are setting the param structure to 0, and ODP_PKTIN_PARSE_ALL is 0, so no need to change their default behavious. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> --- platform/linux-generic/odp_packet.c | 5 +++++ 1 file changed, 5 insertions(+)