From: Tomasz Duszynski Date: Thu, 18 Jan 2018 10:57:36 +0000 (+0100) Subject: net/mrvl: allow changing MTU before port init X-Git-Tag: spdx-start~62 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=59c796c889c7b1a001b1e3354750baa2ca9bdba9;p=dpdk.git net/mrvl: allow changing MTU before port init DPDK updates MTU once mtu_set() callback returns success. Since PMD changes port's MTU to dev->mtu every time device is started it is safe to call mtu_set() before MUSDK ppio was initialized. Fixes: c0511a8f741f ("net/mrvl: check if ppio is initialized") Cc: stable@dpdk.org Signed-off-by: Tomasz Duszynski --- diff --git a/drivers/net/mrvl/mrvl_ethdev.c b/drivers/net/mrvl/mrvl_ethdev.c index 4294c5676e..a0116752eb 100644 --- a/drivers/net/mrvl/mrvl_ethdev.c +++ b/drivers/net/mrvl/mrvl_ethdev.c @@ -379,7 +379,7 @@ mrvl_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) return -EINVAL; if (!priv->ppio) - return -EPERM; + return 0; ret = pp2_ppio_set_mru(priv->ppio, mru); if (ret)