numam-dpdk/drivers/net/memif
Junxiao Shi 3e3f736e50 net/memif: fix chained mbuf determination
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.

Fixes: 09c7e63a71 ("net/memif: introduce memory interface PMD")
Fixes: 43b815d881 ("net/memif: support zero-copy slave")
Cc: stable@dpdk.org

Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
2021-09-27 17:25:21 +02:00
..
memif_socket.c net/memif: fix abstract socket address length 2021-07-30 13:25:54 +02:00
memif_socket.h net/memif: replace master/slave arguments 2020-10-20 13:17:08 +02:00
memif.h net/memif: replace master/slave arguments 2020-10-20 13:17:08 +02:00
meson.build drivers: change indentation in build files 2021-04-21 14:04:09 +02:00
rte_eth_memif.c net/memif: fix chained mbuf determination 2021-09-27 17:25:21 +02:00
rte_eth_memif.h build: remove redundant _GNU_SOURCE definitions 2021-03-23 08:41:05 +01:00
version.map version: 21.11-rc0 2021-08-17 08:37:52 +02:00