From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chas Williams <3chas3@gmail.com> Subject: [PATCH] net/bonding: set MTU on slave configure Date: Thu, 22 Feb 2018 23:01:21 -0500 Message-ID: <20180223040121.22056-1-3chas3@gmail.com> Cc: declan.doherty@intel.com, Chas Williams To: dev@dpdk.org Return-path: Received: from mail-qt0-f193.google.com (mail-qt0-f193.google.com [209.85.216.193]) by dpdk.org (Postfix) with ESMTP id A9D064CA8 for ; Fri, 23 Feb 2018 05:01:27 +0100 (CET) Received: by mail-qt0-f193.google.com with SMTP id f4so9105428qtj.6 for ; Thu, 22 Feb 2018 20:01:27 -0800 (PST) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Chas Williams 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 --- 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 c34c3251f..b59ba9f7c 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.13.6