On 16/04/15 19:54, Zoltan Kiss wrote:
On 16/04/15 19:39, Zoltan Kiss wrote:
Hi,
If I add new data area, can I do that at the expense of the actual
segment's tailroom? (by shifting data up into the tailroom to make
space) In other words: does this necessarily increase
odp_packet_buf_len()?
And if I remove data area, do I have to decrease odp_packet_buf_len()? I
hope not, it wouldn't make too much sense, and it wouldn't be always
possible if you have only fixed sized buffers.
Zoli
I think I found a bug in the linux-generic implementation of add_data:
it doesn't keep the headroom size of the original packet. I'm looking
into these things because DPDK doesn't seem to allow you to move your
odp_packet_data() out of the first segment. However in case of
linux-generic it's also not possible because add_data doesn't seem to
carry the headroom information, and otherwise the headroom can only grow
until the first segment lasts.
Looking further I think I was wrong: the API uses offset *into the
packet*, which means you can't add data area into the headroom, as even
the offset 0 means that your new space will be after odp_packet_data().
Zoli
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp