Petri Savolainen(psavol) replied on github web page:
@@ -401,30 +401,39 @@ uint32_t odp_packet_buf_len(odp_packet_t pkt);
* Packet data pointer
- * Returns the current packet data pointer. When a packet is received
- * from packet input, this points to the first byte of the received
- * packet. Packet level offsets are calculated relative to this position.
+ * Returns pointer to the first byte of packet data. When packet is segmented,
+ * only a portion of packet data follows the pointer. When unsure, use e.g.
+ * odp_packet_seg_len() to check the data length following the pointer. Packet
packet_offset is for different purpose (access data on arbitrary offset), these
calls are optimized for the common case (offset zero). Also
odp_packet_seg_data_len(), the new data_seg_len(), odp_packet_l2_ptr(),
odp_packet_l3_ptr() and odp_packet_l4_ptr() output seg len, but we don't need
to list all possible ways to get it. It's enough that the reader understands
that a packet may have segments and segment length is different thing than
total packet length
> Dmitry Eremin-Solenikov(lumag) wrote:
> And here too, please.
>> Dmitry Eremin-Solenikov(lumag) wrote:
>> odp_packet_seg_len() **or odp_packet_offset()**, if you don't mind.
updated_at 2018-02-23 07:33:19