Chengwen Feng
af531efa4b
net/hns3: fix packets offload features flags in Rx
Currently there is a certain probability of the unexpected ol_flag of the Rx packets's rte_mbuf when receiving packets. The root cause as below: 1. The member variable named ol_flag of the structure named rte_mbuf is not properly initialized to zero in the '.rx_pkt_burst' ops implementation function named hns3_recv_pkts. 2. When multi-segment rte_mbufs are needed for long packet in Rx operation, the driver should assign value to the ol_flag of the first segment, not to the ol_flag of the last segment. This patch fixes it with the following modification in the '.rx_pkt_burst' ops implementation function named hns3_recv_pkts. 1. Where the first write operation in the '.rx_pkt_burst' ops implementation function, assign PKT_RX_RSS_HASH to ol_flags directly using '=' operation instead of '|=' operation. 2. In the static function named hns3_rx_set_cksum_flag, the last rte_mbuf's ol_flags should be assigned when processing multi-segment. We fix it by passing first_seg variable to the function instead of rxm(the last segment's address). Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations") Fixes: ad7cf94823e8 ("net/hns3: fix offload flag for RSS hash") Cc: stable@dpdk.org Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.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-3-Clause license for the core libraries and drivers. The kernel components are GPL-2.0 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%