From: Chas Williams Date: Fri, 23 Feb 2018 04:01:21 +0000 (-0500) Subject: net/bonding: set MTU on slave configure X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=fcd771ea5b587fe1f8e9c8d01333131e775e6925;p=dpdk.git 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 --- 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,