[dpdk-dev] mbuf changes
Olivier Matz
olivier.matz at 6wind.com
Tue Oct 25 15:14:06 CEST 2016
Hi,
On 10/24/2016 05:49 PM, Morten Brørup wrote:
> And here’s something new to think about:
>
> m->next already reveals if there are more segments to a packet. Which
> purpose does m->nb_segs serve that is not already covered by m->next?
>
I was asking myself the same question some time ago:
http://dpdk.org/ml/archives/dev/2016-May/039483.html
But it seems nb_segs is useful for PMDs on TX side, to
anticipate how many descriptors a packet will use in the
TX ring. It can also help a PMD to check that this packet
is supported by the hardware (too many segments) without
browsing the list.
So finally I think it should be kept in the mbuf. But as
suggested by Bruce, it could go in the second cache line,
since m->next is also there, at the condition that this
field is set to 1 in mbuf_free().
Regards,
Olivier
More information about the dev
mailing list