From bd9ada24daa4aaaf9d632653043eba00fe6bc219 Mon Sep 17 00:00:00 2001 From: "Chen Jing D(Mark)" Date: Fri, 29 May 2015 16:10:40 +0800 Subject: [PATCH] fm10k: fix jumbo frame issue fm10k can't receive frame greater than 1536 and Scatter RX function can't work correctly. The root cause is SRRCTL.FM10K_SRRCTL_BUFFER_CHAINING_EN bit is not enabled. Test report: http://dpdk.org/ml/archives/dev/2015-June/019242.html Signed-off-by: Chen Jing D(Mark) Acked-by: Shaopeng He Tested-by: Michael Qiu Acked-by: Michael Qiu --- drivers/net/fm10k/fm10k_ethdev.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index c87c6f9f42..926ac0621c 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -444,9 +444,14 @@ fm10k_dev_rx_init(struct rte_eth_dev *dev) /* It adds dual VLAN length for supporting dual VLAN */ if ((dev->data->dev_conf.rxmode.max_rx_pkt_len + - 2 * FM10K_VLAN_TAG_SIZE) > buf_size){ + 2 * FM10K_VLAN_TAG_SIZE) > buf_size || + dev->data->dev_conf.rxmode.enable_scatter) { + uint32_t reg; dev->data->scattered_rx = 1; dev->rx_pkt_burst = fm10k_recv_scattered_pkts; + reg = FM10K_READ_REG(hw, FM10K_SRRCTL(i)); + reg |= FM10K_SRRCTL_BUFFER_CHAINING_EN; + FM10K_WRITE_REG(hw, FM10K_SRRCTL(i), reg); } /* Enable drop on empty, it's RO for VF */ @@ -457,11 +462,6 @@ fm10k_dev_rx_init(struct rte_eth_dev *dev) FM10K_WRITE_FLUSH(hw); } - if (dev->data->dev_conf.rxmode.enable_scatter) { - dev->rx_pkt_burst = fm10k_recv_scattered_pkts; - dev->data->scattered_rx = 1; - } - /* Configure RSS if applicable */ fm10k_dev_mq_rx_configure(dev); return 0; -- 2.20.1