net/bnx2x: fix MTU for jumbo frame
authorRasesh Mody <rmody@marvell.com>
Fri, 12 Apr 2019 01:47:37 +0000 (18:47 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 19 Apr 2019 12:51:54 +0000 (14:51 +0200)
Fix to update eth dev MTU for jumbo frames

Fixes: 540a211084a7 ("bnx2x: driver core")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rmody@marvell.com>
drivers/net/bnx2x/bnx2x_ethdev.c

index 1f2eb92..5b4c5cf 100644 (file)
@@ -181,8 +181,10 @@ bnx2x_dev_configure(struct rte_eth_dev *dev)
 
        PMD_INIT_FUNC_TRACE(sc);
 
-       if (rxmode->offloads & DEV_RX_OFFLOAD_JUMBO_FRAME)
+       if (rxmode->offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {
                sc->mtu = dev->data->dev_conf.rxmode.max_rx_pkt_len;
+               dev->data->mtu = sc->mtu;
+       }
 
        if (dev->data->nb_tx_queues > dev->data->nb_rx_queues) {
                PMD_DRV_LOG(ERR, sc, "The number of TX queues is greater than number of RX queues");