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 A6691A0487 for ; Thu, 4 Jul 2019 01:44:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7B21E2C2B; Thu, 4 Jul 2019 01:44:12 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 91D052956; Thu, 4 Jul 2019 01:44:10 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x63NfBVJ010160; Wed, 3 Jul 2019 16:44:09 -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=Syf5Yx809pFoBbkBurHdd8Q+7Mod1nTjB/5+93F9gYI=; b=kD7obRkRtLzvlHmApM/mKvL4SWFQBGzTRAa4YByPd/oJHPE/i32IvCNU/daCLAosTRHX dYF2BmFrEgKEyFTlZoPWSx4+UCfeHlV+UjzeIXRMgUeJB0GKpqn764FvL/LJVQ7Sja9p thttYUR09Ps9bogjYQ+blzITNNRrdTWY2JFETFfRKMBuB3f4fknlfFyRf7Vc42JYLNZw oQer6UkpDxsvSxuysy80xRDPPtjFklBFNeIbB+exsIHPptTchi7jWefAuV17ZqcgfCub VuqRW5gcCzin52wYNMj/rw4rwfEDJavbtxjURdWXm81JNJX4QGWHpkAQTRFNx5g3nuI/ IA== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 2tgrv1bd24-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 03 Jul 2019 16:44:09 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 3 Jul 2019 16:44:08 -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; Wed, 3 Jul 2019 16:44:08 -0700 Received: from irv1user08.caveonetworks.com (unknown [10.104.116.105]) by maili.marvell.com (Postfix) with ESMTP id 655713F7041; Wed, 3 Jul 2019 16:44:08 -0700 (PDT) Received: (from rmody@localhost) by irv1user08.caveonetworks.com (8.14.4/8.14.4/Submit) id x63Ni8a9011796; Wed, 3 Jul 2019 16:44:08 -0700 X-Authentication-Warning: irv1user08.caveonetworks.com: rmody set sender to rmody@marvell.com using -f From: Rasesh Mody To: CC: Rasesh Mody , , , Date: Wed, 3 Jul 2019 16:43:12 -0700 Message-ID: <20190703234313.10782-2-rmody@marvell.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20190703234313.10782-1-rmody@marvell.com> References: <20190703234313.10782-1-rmody@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-07-03_06:, , signatures=0 Subject: [dpdk-dev] [PATCH 2/3] net/bnx2x: fix link events polling for SRIOV 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" We do not need to schedule periodic poll for slowpath link events for SRIOV. The link events are handled by the PF driver. Fixes: 6041aa619f9a ("net/bnx2x: fix poll link status") Cc: stable@dpdk.org Signed-off-by: Rasesh Mody --- drivers/net/bnx2x/bnx2x_ethdev.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c index 10b4fdb8e..127811b92 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.c +++ b/drivers/net/bnx2x/bnx2x_ethdev.c @@ -218,9 +218,12 @@ bnx2x_dev_start(struct rte_eth_dev *dev) PMD_INIT_FUNC_TRACE(sc); /* start the periodic callout */ - if (atomic_load_acq_long(&sc->periodic_flags) == PERIODIC_STOP) { - bnx2x_periodic_start(dev); - PMD_DRV_LOG(DEBUG, sc, "Periodic poll re-started"); + if (IS_PF(sc)) { + if (atomic_load_acq_long(&sc->periodic_flags) == + PERIODIC_STOP) { + bnx2x_periodic_start(dev); + PMD_DRV_LOG(DEBUG, sc, "Periodic poll re-started"); + } } ret = bnx2x_init(sc); @@ -258,10 +261,10 @@ bnx2x_dev_stop(struct rte_eth_dev *dev) rte_intr_disable(&sc->pci_dev->intr_handle); rte_intr_callback_unregister(&sc->pci_dev->intr_handle, bnx2x_interrupt_handler, (void *)dev); - } - /* stop the periodic callout */ - bnx2x_periodic_stop(dev); + /* stop the periodic callout */ + bnx2x_periodic_stop(dev); + } ret = bnx2x_nic_unload(sc, UNLOAD_NORMAL, FALSE); if (ret) { @@ -680,7 +683,9 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf) return 0; out: - bnx2x_periodic_stop(eth_dev); + if (IS_PF(sc)) + bnx2x_periodic_stop(eth_dev); + return ret; } -- 2.18.0