Hello,
Would be great to get any help on a couple of queries.
for an mbuf passed to the if_start routine of a network device driver, can I assume that the mtod(mbuf, ...) points to physically contiguous space ? If not, what should I do to convert it into a chain of physically contiguous mbufs with least CPU cost.
When a cluster is allocated for an mbuf, what does mtod(mbuf, ...) return ?
pointer to the data section of mbuf
OR
to the external data (cluster) of the mbuf ?
For an mbuf with cluster, when m_pullup(mbuf, len) is called, does some data from cluster gets coped to the data area of the mbuf ?
OR
is a new mbuf added at the beginning of the chain with no external data, but len bytes from 2nd mbuf's cluster copied to its data area ?
Thanks a lot in advance.
Would be great to get any help on a couple of queries.
for an mbuf passed to the if_start routine of a network device driver, can I assume that the mtod(mbuf, ...) points to physically contiguous space ? If not, what should I do to convert it into a chain of physically contiguous mbufs with least CPU cost.
When a cluster is allocated for an mbuf, what does mtod(mbuf, ...) return ?
pointer to the data section of mbuf
OR
to the external data (cluster) of the mbuf ?
For an mbuf with cluster, when m_pullup(mbuf, len) is called, does some data from cluster gets coped to the data area of the mbuf ?
OR
is a new mbuf added at the beginning of the chain with no external data, but len bytes from 2nd mbuf's cluster copied to its data area ?
Thanks a lot in advance.