On 27 May 2015 at 14:45, Ola Liljedahl <[email protected]> wrote:

> On 27 May 2015 at 19:30, Zoltan Kiss <[email protected]> wrote:
>
>> Hi,
>>
>> While hunting some ODP-DPDK bugs I've found something which needs
>> clarification: what happens with those packets not sent by
>> odp_pktio_send()? This is the case when e.g. there is no free TX
>> descriptors, so the function returns with less than "len". Our examples
>> either doesn't seem to do anything about that, or handle it as a failure.
>> But a real world application should be able to handle that. I can see two
>> options:
>> - odp_pktio_send() calls odp_packet_free on the packets which were not
>> successfully sent.
>
> In this case, odp_pktio_send() could also return "len". All packets were
> taken care of (one way or the other). Transmission is not guaranteed,
> packets can go missing practically anywhere.
>
>
>> Pro: we can have better information about which buffers exactly were not
>> sent (although rationally, the last "len-<retval>" packets). Cons: the
>> application might have other plans with those packets, e.g. send them later
>> - The application has to handle those packets. Pro: more choice, not just
>> dropping. Cons: we have to mandate that the last "len-<retval>" packets
>> have to be the ones which were not sent.
>
> If an implementation fails to send (transmit, enqueue, whatever) packet N,
> it should stop trying to send any more packets in the vector and just
> return N. So 0..N-1 were sent and N..len-1 were not sent.
>
>
>
>> I can't come up with a scenario where it wouldn't be the case anyway, but
>> I have a gut feeling it can happen, and platforms have to handle that
>>
>> I prefer the second option, that's how DPDK handles that too. It needs a
>> comment upgrade in the API, and fixing our usage of odp_pktio_send around
>> the code base to release the not sent packets.
>>
> Agree.
>

Can you describe what is needed in a Bug Zoltan ?
https://bugs.linaro.org/enter_bug.cgi?product=OpenDataPlane


>
>>
>> Zoli
>> _______________________________________________
>> lng-odp mailing list
>> [email protected]
>> https://lists.linaro.org/mailman/listinfo/lng-odp
>>
>
>
> _______________________________________________
> lng-odp mailing list
> [email protected]
> https://lists.linaro.org/mailman/listinfo/lng-odp
>
>


-- 
Mike Holmes
Technical Manager - Linaro Networking Group
Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to