[dpdk-dev] [PATCH] net/memif: fix chained mbuf determination
Jakub Grajciar -X (jgrajcia - PANTHEON TECH SRO at Cisco)
jgrajcia at cisco.com
Wed Sep 22 08:19:59 CEST 2021
> > 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>
Looks ok to me. Thanks for the patch!
Reviewed-by: Jakub Grajciar <jgrajcia at cisco.com>
More information about the dev
mailing list