From fcd771ea5b587fe1f8e9c8d01333131e775e6925 Mon Sep 17 00:00:00 2001 From: Chas Williams Date: Thu, 22 Feb 2018 23:01:21 -0500 Subject: [PATCH] net/bonding: set MTU on slave configure When a slave is configured make sure that the slave's MTU matches the bonding's idea of the MTU. Signed-off-by: Chas Williams Acked-by: Radu Nicolau --- drivers/net/bonding/rte_eth_bond_pmd.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index c34c3251f3..b59ba9f7c8 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -1831,6 +1831,14 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev, } } + errval = rte_eth_dev_set_mtu(slave_eth_dev->data->port_id, + bonded_eth_dev->data->mtu); + if (errval != 0 && errval != -ENOTSUP) { + RTE_BOND_LOG(ERR, "rte_eth_dev_set_mtu: port %u, err (%d)", + slave_eth_dev->data->port_id, errval); + return errval; + } + /* Configure device */ errval = rte_eth_dev_configure(slave_eth_dev->data->port_id, nb_rx_queues, nb_tx_queues, -- 2.20.1