New MTU value is not propagated to vport in HW when MTU update request
is sent while ports are stopped.
This patch fixes the logic error for above mentioned condition.
Fixes:
d121a6b5f781 ("net/qede: fix VF MTU update")
Cc: stable@dpdk.org
Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
Reviewed-by: Rasesh Mody <rmody@marvell.com>
PMD_INIT_FUNC_TRACE(edev);
/* Update MTU only if it has changed */
- if (eth_dev->data->mtu != qdev->mtu) {
- if (qede_update_mtu(eth_dev, qdev->mtu))
+ if (qdev->new_mtu && qdev->new_mtu != qdev->mtu) {
+ if (qede_update_mtu(eth_dev, qdev->new_mtu))
goto err;
+ qdev->mtu = qdev->new_mtu;
+ qdev->new_mtu = 0;
}
/* Configure TPA parameters */
restart = true;
}
rte_delay_ms(1000);
- qdev->mtu = mtu;
+ qdev->new_mtu = mtu;
/* Fix up RX buf size for all queues of the port */
for (i = 0; i < qdev->num_rx_queues; i++) {
struct qede_fastpath *fp_array;
struct qede_fastpath_cmt *fp_array_cmt;
uint16_t mtu;
+ uint16_t new_mtu;
bool enable_tx_switching;
bool rss_enable;
struct rte_eth_rss_conf rss_conf;