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 | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+)
diff --git a/doc/guides/nics/features/dpaa.ini b/doc/guides/nics/features/dpaa.ini index 29ba47e..0b992fd 100644 --- a/doc/guides/nics/features/dpaa.ini +++ b/doc/guides/nics/features/dpaa.ini @@ -5,5 +5,6 @@ ; [Features] Queue start/stop = 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 b93f781..122e45b 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -77,6 +77,26 @@ static int is_global_init; static int +dpaa_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) +{ + struct dpaa_if *dpaa_intf = dev->data->dev_private; + + PMD_INIT_FUNC_TRACE(); + + if (mtu < ETHER_MIN_MTU) + return -EINVAL; + + 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.max_rx_pkt_len = mtu; + return 0; +} + +static int dpaa_eth_dev_configure(struct rte_eth_dev *dev __rte_unused) { PMD_INIT_FUNC_TRACE(); @@ -199,6 +219,7 @@ static struct eth_dev_ops dpaa_devops = { .tx_queue_setup = dpaa_eth_tx_queue_setup, .rx_queue_release = dpaa_eth_rx_queue_release, .tx_queue_release = dpaa_eth_tx_queue_release, + .mtu_set = dpaa_mtu_set, }; /* Initialise an Rx FQ */ -- 2.7.4