[1/6] net/bnx2x: fix eth dev MTU

Message ID 1555033662-22935-1-git-send-email-rmody@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series [1/6] net/bnx2x: fix eth dev MTU |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS

Commit Message

Rasesh Mody April 12, 2019, 1:47 a.m. UTC
  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 |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
  

Comments

Ferruh Yigit April 15, 2019, 8:01 a.m. UTC | #1
On 4/12/2019 2:47 AM, Rasesh Mody wrote:
> 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>

Series applied to dpdk-next-net/master, thanks.
  

Patch

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");