The original behavior of loopback_recv() is incorrect then, because it gives back the failed packets to the caller in pkts[], some of the might had been already released.

On 11/04/16 05:01, Bala Manoharan wrote:
  int packet_classifier(odp_pktio_t pktio, odp_packet_t pkt)
diff --git a/platform/linux-generic/pktio/loop.c
b/platform/linux-generic/pktio/loop.c
index 0ea6d0e..5ed4ca9 100644
--- a/platform/linux-generic/pktio/loop.c
+++ b/platform/linux-generic/pktio/loop.c
@@ -70,7 +70,7 @@ static int loopback_recv(pktio_entry_t *pktio_entry,
odp_packet_t pkts[],
                         pkt_hdr = odp_packet_hdr(pkt);
                         packet_parse_reset(pkt_hdr);
                         packet_parse_l2(pkt_hdr);
-                       if (0 > _odp_packet_classifier(pktio_entry, pkt)) {
+                       if (_odp_packet_classifier(pktio_entry, pkt) == 1) {
                                 pkts[j++] = pkt;
                                 pktio_entry->s.stats.in_octets +=
                                         odp_packet_len(pkts[i]);
--
_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to