Signed-off-by: Hemant Agrawal <hemant.agra...@nxp.com>
Signed-off-by: Shreyansh Jain <shreyansh.j...@nxp.com>
---
 doc/guides/nics/features/dpaa.ini |  1 +
 drivers/net/dpaa/dpaa_ethdev.c    | 16 ++++++++++++----
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/doc/guides/nics/features/dpaa.ini 
b/doc/guides/nics/features/dpaa.ini
index 86ab0a8..aaad818 100644
--- a/doc/guides/nics/features/dpaa.ini
+++ b/doc/guides/nics/features/dpaa.ini
@@ -6,6 +6,7 @@
 [Features]
 Link status          = Y
 Queue start/stop     = Y
+Jumbo frame          = Y
 MTU update           = Y
 ARMv8                = Y
 Usage doc            = Y
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 64ff32d..df4f2e4 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -72,7 +72,6 @@
 #include <fsl_bman.h>
 #include <fsl_fman.h>
 
-
 /* Keep track of whether QMAN and BMAN have been globally initialized */
 static int is_global_init;
 
@@ -89,18 +88,27 @@ dpaa_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
        fman_if_set_maxfrm(dpaa_intf->fif, mtu);
 
        if (mtu > ETHER_MAX_LEN)
-               return -1
-       dev->data->dev_conf.rxmode.jumbo_frame = 0;
+               dev->data->dev_conf.rxmode.jumbo_frame = 1;
+       else
+               dev->data->dev_conf.rxmode.jumbo_frame = 0;
 
        dev->data->dev_conf.rxmode.max_rx_pkt_len = mtu;
        return 0;
 }
 
 static int
-dpaa_eth_dev_configure(struct rte_eth_dev *dev __rte_unused)
+dpaa_eth_dev_configure(struct rte_eth_dev *dev)
 {
        PMD_INIT_FUNC_TRACE();
 
+       if (dev->data->dev_conf.rxmode.jumbo_frame == 1) {
+               if (dev->data->dev_conf.rxmode.max_rx_pkt_len <=
+                   DPAA_MAX_RX_PKT_LEN)
+                       return dpaa_mtu_set(dev,
+                               dev->data->dev_conf.rxmode.max_rx_pkt_len);
+               else
+                       return -1;
+       }
        return 0;
 }
 
-- 
2.7.4

Reply via email to