On 01/19/2015 12:18 PM, Ola Liljedahl wrote:
> On 17 January 2015 at 23:22, Taras Kondratiuk
> <[email protected]> wrote:
>> On 01/17/2015 01:29 PM, Jerin Jacob wrote:
>>> odp_packet_seg_t is an opaque type, based on the implementation, the return
>>> value of odp_packet_last_seg can be changed after headroom/tailroom 
>>> push/pull
>>> operation.
>>
>> No. By definition headroom/tailroom push/pull operations don't change
>> segmentation. So the last segment must remain the same.
> Don't we make segmentation visible to allow ODP implementations to use
> non-consecutive buffers to implement the buffer or packet the
> application is working with? An implementation might need to add
> another segment for a push operation e.g. if there is not space enough
> in the current head or tail segment. And it might be useful for ODP
> implementations to remove unused segments (for pull operations), some
> HW might not like to operate on empty segments (or indeed any segment
> with a small number of bytes of data).
> 
> So I can't understand how ODP can define that push and pull operations
> shall *not* affect the underlying segmentation of the packet.

According a current spec these operation do not modify segmentation for
application to able to cache handles and/or pointers:
"Operation does not modify packet segmentation or move data. Handles and
pointers remain valid. User is responsible to update packet metadata
offsets when needed."

There are more heavyweight functions which can be used if there is no
enough headroom/tailroom: odp_packet_add_data()/odp_packet_rem_data().

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

Reply via email to