From: Matias Elo <matias....@nokia.com> Frame size should include also packet headroom and tailroom.
Signed-off-by: Matias Elo <matias....@nokia.com> --- /** Email created from pull request 78 (matiaselo:dev/dpdk_ext_mempool_v2) ** https://github.com/Linaro/odp/pull/78 ** Patch: https://github.com/Linaro/odp/pull/78.patch ** Base sha: 490f4bf22129638899ce71c99a8847e8ba849692 ** Merge commit sha: 1c79cd17efc7b9547426620c0f001d12a7ebca76 **/ platform/linux-generic/pktio/socket_mmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/linux-generic/pktio/socket_mmap.c b/platform/linux-generic/pktio/socket_mmap.c index 2dba7b08..6fc4b4cc 100644 --- a/platform/linux-generic/pktio/socket_mmap.c +++ b/platform/linux-generic/pktio/socket_mmap.c @@ -355,9 +355,9 @@ static void mmap_fill_ring(struct ring *ring, odp_pool_t pool_hdl, int fanout) pool = pool_entry_from_hdl(pool_hdl); /* Frame has to capture full packet which can fit to the pool block.*/ - ring->req.tp_frame_size = (pool->data_size + - TPACKET_HDRLEN + TPACKET_ALIGNMENT + - + (pz - 1)) & (-pz); + ring->req.tp_frame_size = (pool->headroom + pool->data_size + + pool->tailroom + TPACKET_HDRLEN + + TPACKET_ALIGNMENT + + (pz - 1)) & (-pz); /* Calculate how many pages do we need to hold all pool packets * and align size to page boundary.