From: Chen Jing D(Mark) Date: Fri, 27 Nov 2015 01:55:45 +0000 (+0800) Subject: fm10k: fix Rx function selection X-Git-Tag: spdx-start~7925 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=ff0f9a6e37fde15d1e225550ec49e87d2148e390;p=dpdk.git fm10k: fix Rx function selection Steps to reproduce the bug: 1. All Rx offloading is disabled and start the device, then Vector Rx is used. 2. Stop the device. Re-configure to enable hw_ip_checksum = 1, start the device again. 3. In this case, assume regular Rx should be used since Vector Rx doesn't support ip checksum offload. But actually Vector Rx is used and cause checksum won't be done by hardware. The reason is after re-configuring, driver misses an "else" in func fm10k_set_rx_function(). Then Rx func in last round are used. Fixes: 77a8ab47eb38 ("fm10k: select best Rx function") Reported-by: Xiao Wang Signed-off-by: Chen Jing D(Mark) Acked-by: Xiao Wang --- diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index 0dd56d2192..a9067c93de 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -2483,6 +2483,8 @@ fm10k_set_rx_function(struct rte_eth_dev *dev) dev->rx_pkt_burst = fm10k_recv_pkts_vec; } else if (dev->data->scattered_rx) dev->rx_pkt_burst = fm10k_recv_scattered_pkts; + else + dev->rx_pkt_burst = fm10k_recv_pkts; rx_using_sse = (dev->rx_pkt_burst == fm10k_recv_scattered_pkts_vec ||