[dpdk-dev] net/nfp: fix MTU settings
Checks
Commit Message
The wrong mtu length was used for configuring the hardware. The
max_rx_pktlen reported was also wrong.
Fixes: defb9a5dd156 ("nfp: introduce driver initialization")
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
drivers/net/nfp/nfp_net.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On 11/24/2017 6:23 AM, Alejandro Lucero wrote:
> 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 <alejandro.lucero@netronome.com>
Applied to dpdk-next-net/master, thanks.
@@ -1196,7 +1196,7 @@ enum nfp_qcp_ptr {
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 @@ uint32_t nfp_net_txq_full(struct nfp_net_txq *txq)
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;