[dpdk-dev] net/bonding: set MTU on slave configure
Checks
Commit Message
From: Chas Williams <chas3@att.com>
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>
---
drivers/net/bonding/rte_eth_bond_pmd.c | 8 ++++++++
1 file changed, 8 insertions(+)
Comments
On 2/23/2018 4:01 AM, Chas Williams wrote:
> From: Chas Williams <chas3@att.com>
>
> 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>
On 3/14/2018 12:11 PM, Radu Nicolau wrote:
>
> On 2/23/2018 4:01 AM, Chas Williams wrote:
>> From: Chas Williams <chas3@att.com>
>>
>> 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>
Applied to dpdk-next-net/master, thanks.
@@ -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,