We find that when traffic is light, a small number of packets will have wrong metadata (e.g. packet type), however this issue will not happen when traffic is heavy. The root cause is some fields in fm10k_rx_desc are read at the wrong time, since the descriptor (being 16-bytes big) is not read as a single atomic operation. When the input speed is slower than software's capability, fm10k scalar Rx function accesses descriptors at about the same time as HW writes them, so the scenario can occur: some fields like pkt_info in fm10k_rx_desc are read before HW writeback but some fields like DD bit are read after HW writeback, this will lead to the later packet parsing function using incorrect value. This patch fixes this issue by reading and parsing Rx descriptor only after first checking that the DD bit is set. Fixes: 4b61d3bfa941 ("fm10k: add receive and tranmit") Fixes: c82dd0a7bfa5 ("fm10k: add scatter receive") Signed-off-by: Wang Xiao W <xiao.w.wang@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
DPDK is a set of libraries and drivers for fast packet processing. It supports many processor architectures and both FreeBSD and Linux. The DPDK uses the Open Source BSD license for the core libraries and drivers. The kernel components are GPLv2 licensed. Please check the doc directory for release notes, API documentation, and sample application information. For questions and usage discussions, subscribe to: users@dpdk.org Report bugs and issues to the development mailing list: dev@dpdk.org
Description
Languages
C
99.1%
Meson
0.5%
Python
0.2%
Shell
0.1%