Fix to update eth dev MTU for jumbo frames

Fixes: 540a211084a7 ("bnx2x: driver core")
Cc: sta...@dpdk.org

Signed-off-by: Rasesh Mody <rm...@marvell.com>
---
 drivers/net/bnx2x/bnx2x_ethdev.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index 1f2eb92..5b4c5cf 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -181,8 +181,10 @@ void bnx2x_periodic_stop(void *param)
 
        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");
-- 
1.7.10.3

Reply via email to