net/bonding: set MTU on slave configure
authorChas Williams <chas3@att.com>
Fri, 23 Feb 2018 04:01:21 +0000 (23:01 -0500)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 30 Mar 2018 12:08:43 +0000 (14:08 +0200)
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 <chas3@att.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
drivers/net/bonding/rte_eth_bond_pmd.c

index c34c325..b59ba9f 100644 (file)
@@ -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,