From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 933A8A0613 for ; Sun, 20 Oct 2019 07:21:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BBDF31BF42; Sun, 20 Oct 2019 07:21:04 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id D3CFA1BF23; Sun, 20 Oct 2019 07:21:01 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x9K5KuKl005336; Sat, 19 Oct 2019 22:21:00 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0818; bh=EgnRb2DzOH0Y5GwWajLTJn9wFuTS0rYrbZi3v/yckvc=; b=iIcHbKQbGZKemyulwuOOgM6QnZ+vPE6zq+De6MjmPZmpyliz9pooLx7A7/G/Iw+maRfc Q6V1dwUNqHQR2VO57KuMHd7GaAd0pNqUIxSS1ym2y73SPNt3qgC15SFfZNyTRPdpLHum j77v9Z3a5+/Vlu28nnIgd0/bxr2fHT4wjvUd5mPNBZKcP8eqZvmoseY+q0r5ycBu6NX+ Ts0JFRFxbmsesUOZFasLSXHs1bMyGcYv9a7v19TupeY0iJ0pj14akbmHedfdEBlrmizz wH0Fs1P+vJxP5P8S4SasBDezk4Zh+mcAjsm3k2hyKZ72+Syf0W0QQr/WRFvdCdN5Y79h KQ== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 2vqyuqacnn-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sat, 19 Oct 2019 22:21:00 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Sat, 19 Oct 2019 22:20:59 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Sat, 19 Oct 2019 22:20:59 -0700 Received: from irv1user08.caveonetworks.com (unknown [10.104.116.105]) by maili.marvell.com (Postfix) with ESMTP id 35CE83F703F; Sat, 19 Oct 2019 22:20:59 -0700 (PDT) Received: (from rmody@localhost) by irv1user08.caveonetworks.com (8.14.4/8.14.4/Submit) id x9K5KxmX009963; Sat, 19 Oct 2019 22:20:59 -0700 X-Authentication-Warning: irv1user08.caveonetworks.com: rmody set sender to rmody@marvell.com using -f From: Rasesh Mody To: , , CC: Shahed Shaikh , , Date: Sat, 19 Oct 2019 22:20:50 -0700 Message-ID: <20191020052051.9905-2-rmody@marvell.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20191020052051.9905-1-rmody@marvell.com> References: <20191020052051.9905-1-rmody@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-10-20_02:2019-10-18,2019-10-20 signatures=0 Subject: [dpdk-dev] [PATCH 2/3] net/qede: fix to modify MTU update flow X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list 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: Shahed Shaikh 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 Reviewed-by: Rasesh Mody --- drivers/net/qede/qede_ethdev.c | 8 +++++--- drivers/net/qede/qede_ethdev.h | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c index 53fdfde9a..42e2b5083 100644 --- a/drivers/net/qede/qede_ethdev.c +++ b/drivers/net/qede/qede_ethdev.c @@ -1038,9 +1038,11 @@ static int qede_dev_start(struct rte_eth_dev *eth_dev) 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 */ @@ -2248,7 +2250,7 @@ static int qede_set_mtu(struct rte_eth_dev *dev, uint16_t mtu) 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++) { diff --git a/drivers/net/qede/qede_ethdev.h b/drivers/net/qede/qede_ethdev.h index 21115a077..b988a73f2 100644 --- a/drivers/net/qede/qede_ethdev.h +++ b/drivers/net/qede/qede_ethdev.h @@ -225,6 +225,7 @@ struct qede_dev { 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; -- 2.18.0