Skip to contentSkip to conversation

Bad mbuf chain handling in the memif driver resulting in truncated packets

dpdk-dev [email protected] 1 participant 1 message Jun 10, 2021

lore
Share & tools
lore
#0 lore raw

https://bugs.dpdk.org/show_bug.cgi?id=729

Bug ID: 729
Summary: Bad mbuf chain handling in the memif driver resulting
in truncated packets
Product: DPDK
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: ethdev
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---

In a couple of places in the memif driver [1][2] rte_pktmbuf_is_contiguous()
[3] is being used to check whether there are more mbufs in the chain when sending packets. Problem is, rte_pktmbuf_is_contiguous() checks nb_segs in the mbuf, which, as far as I understand, is only set to the number of segments in the first mbuf in the chain. This results in truncated packets as usually, nb_segs is 1 in the mbufs other than the first. Replacing rte_pktmbuf_is_contiguous(mbuf) == 0 with mbuf->next != NULL fixes the issue.

The problem has been observed while trying to use TRex traffic generator with VPP [4].

[1]
http://code.dpdk.org/dpdk/v21.05/source/drivers/net/memif/rte_eth_memif.c#L660

[2]
http://code.dpdk.org/dpdk/v21.05/source/drivers/net/memif/rte_eth_memif.c#L717

[3] http://code.dpdk.org/dpdk/v21.05/source/lib/mbuf/rte_mbuf.h#L1687

[4] https://github.com/cisco-system-traffic-generator/trex-core/issues/686

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.