> -----Original Message-----
> From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of
> Dmitry Eremin-Solenikov
> Sent: Wednesday, May 10, 2017 8:00 PM
> To: lng-odp-forward <lng-odp@lists.linaro.org>
> Subject: [lng-odp] odp_packet_free_multi with invalid packets
> 
> Hello,
> 
> I was looking onto a shortcut code to free packets results from IPsec
> call. Initially I wanted to just call odp_packet_free_multi() on top of
> that array. However I noticed that the function segfaults if called with
> an array containing ODP_PACKET_INVALID. Is it correct to call
> odp_packet_free_multi() on top of such arrays, or I'd better handcode
> such function checking and freeing packets one by one.

By default, results are undefined (may crash) if you pass bad handle (such as 
XXX_INVALID) to any ODP API. That's for performance, so that implementation 
does not validate always all handles from application.

-Petri 

Reply via email to