Hi Shally, I am unsure this leads to a safe direction and here is why.
Depending on the hardware, software provides either 1) a bunch of buffers where the HW will place packets (1 buffer will receive one packet) or 2) a large memory zone in which the hardware will place the packets according to a silicon specific policy. In the case of 2, I am not sure a packet has to be contained in a odp_buffer_t. And even so, freeing such an odp_buffer_t will not result in freeing the underlying memory because allocation unit is memory region not odp_buffer_t. Could you elaborate on the use case you have in mind? Cordially, FF On 1 March 2017 at 07:41, Verma, Shally <[email protected]> wrote: > I wanted to check if we could introduce a generic handle concept in ODP > (something like odp_handle_t carrying purpose similar to void * ) which can > be used for API that need to handle multiple types in one call. Ex. an API > that works on both Packet and Buffer Type .Such use cases can take generic > handle in input and map it to either per requirement. > > If agreed, following defines the purpose.. > > odp_handle_t is a generic handle type which implementation should > implement in such a way that it could be map to represent any other type. > It is to aid an API which handle multiple types. Example , odp_handle_t > can represent as odp_buffer_t or odp_packet_t > > Thanks > Shally > > > > > > > -- [image: Linaro] <http://www.linaro.org/> François-Frédéric Ozog | *Director Linaro Networking Group* T: +33.67221.6485 [email protected] | Skype: ffozog
