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. 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. 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.
Zoli
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp