From: Alejandro Lucero Date: Fri, 24 Nov 2017 14:23:48 +0000 (+0000) Subject: net/nfp: fix MTU settings X-Git-Tag: spdx-start~617 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d9b98888d4c596aa536b49ba16e33f4046d4ace2;p=dpdk.git net/nfp: fix MTU settings The wrong mtu length was used for configuring the hardware. The max_rx_pktlen reported was also wrong. Fixes: defb9a5dd156 ("nfp: introduce driver initialization") Cc: stable@dpdk.org Signed-off-by: Alejandro Lucero --- diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index 0501156bac..9a7b0b22e2 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -1196,7 +1196,7 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) dev_info->max_rx_queues = (uint16_t)hw->max_rx_queues; dev_info->max_tx_queues = (uint16_t)hw->max_tx_queues; dev_info->min_rx_bufsize = ETHER_MIN_MTU; - dev_info->max_rx_pktlen = hw->mtu; + dev_info->max_rx_pktlen = hw->max_mtu; /* Next should change when PF support is implemented */ dev_info->max_mac_addrs = 1; @@ -2774,7 +2774,7 @@ nfp_net_init(struct rte_eth_dev *eth_dev) hw->ver = nn_cfg_readl(hw, NFP_NET_CFG_VERSION); hw->cap = nn_cfg_readl(hw, NFP_NET_CFG_CAP); hw->max_mtu = nn_cfg_readl(hw, NFP_NET_CFG_MAX_MTU); - hw->mtu = hw->max_mtu; + hw->mtu = ETHER_MTU; if (NFD_CFG_MAJOR_VERSION_of(hw->ver) < 2) hw->rx_offset = NFP_NET_RX_OFFSET;