[dpdk-dev] [PATCH] net/memif: fix chained mbuf determination

Ferruh Yigit ferruh.yigit at intel.com
Mon Sep 20 17:20:37 CEST 2021


On 9/9/2021 3:42 PM, Junxiao Shi wrote:
> Previously, TX functions call rte_pktmbuf_is_contiguous to determine
> whether an mbuf is chained. However, rte_pktmbuf_is_contiguous is
> designed to work on the first mbuf of a packet only. In case a packet
> contains three or more segment mbufs in a chain, it may cause truncated
> packets or rte_mbuf_sanity_check panics.
> 
> This patch updates TX functions to determine chained mbufs using
> mbuf_head->nb_segs field, which works in all cases. Moreover, it
> maintains that the second cacheline is only accessed when chained mbuf
> is actually present.
> 
> Signed-off-by: Junxiao Shi <git at mail1.yoursunny.com>

+ memif maintainer, Jakub.

Jakub, can you please review the patch?


More information about the dev mailing list