On 08/13/15 15:44, Bill Fischofer wrote:

    @@ -72,6 +76,9 @@ static int loopback_send(pktio_entry_t
    *pktio_entry, odp_packet_t pkt_tbl[],
            queue_entry_t *qentry;
            unsigned i;

    +       if (pktio_entry->s.state == STATE_STOP)
    +               return 0;
    +


Shouldn't this be an error return? If I call a send function and it does nothing and returns 0 ("OK") then those buffers are going to be leaked, no?

Yes, I should about what to return here. If it's 0 that means 0 packets were transmitted, and 0 packet were free by platform. So application should
take care what to do with it.

But yes, agree that we need to give app some feedback that transmission fails due to stopped pktio.
Something like

__odp_errno == -EPERM;
return -1;

For read path, more likely we need the same thing.

Maxim.
_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to