mbuf: get physical address of data
Signed-off-by: Declan Doherty <declan.doherty@intel.com> Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
This commit is contained in:
parent
a2cd6480c2
commit
0781e8a7ac
@ -1624,6 +1624,27 @@ static inline struct rte_mbuf *rte_pktmbuf_lastseg(struct rte_mbuf *m)
|
|||||||
*/
|
*/
|
||||||
#define rte_pktmbuf_mtod(m, t) rte_pktmbuf_mtod_offset(m, t, 0)
|
#define rte_pktmbuf_mtod(m, t) rte_pktmbuf_mtod_offset(m, t, 0)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A macro that returns the physical address that points to an offset of the
|
||||||
|
* start of the data in the mbuf
|
||||||
|
*
|
||||||
|
* @param m
|
||||||
|
* The packet mbuf.
|
||||||
|
* @param o
|
||||||
|
* The offset into the data to calculate address from.
|
||||||
|
*/
|
||||||
|
#define rte_pktmbuf_mtophys_offset(m, o) \
|
||||||
|
(phys_addr_t)((m)->buf_physaddr + (m)->data_off + (o))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A macro that returns the physical address that points to the start of the
|
||||||
|
* data in the mbuf
|
||||||
|
*
|
||||||
|
* @param m
|
||||||
|
* The packet mbuf.
|
||||||
|
*/
|
||||||
|
#define rte_pktmbuf_mtophys(m) rte_pktmbuf_mtophys_offset(m, 0)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A macro that returns the length of the packet.
|
* A macro that returns the length of the packet.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user