From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0046.outbound.protection.outlook.com [104.47.38.46]) by dpdk.org (Postfix) with ESMTP id 5E0971B121; Wed, 19 Sep 2018 23:59:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EKulMzUJUGfCraF6IlsblwUXhwy7oksrMqZ/8f0E+pU=; b=SfO5AVeJ056CETISxDXIBDJmKeQp8WVYxMDISweCX7qLWDTMF5/0m05UFG7jmnWhGbMaQbLsq47hyPYqgsJ0EjsnosRwhO9Os+0/Re3VPKhTSrGsW9keY9loKO9GOI2+Y0UVVE+QXg3bfS1uniEkQAWiRSUZa5ZjWNFDIzi+Nk4= Received: from BYAPR07MB5365.namprd07.prod.outlook.com (20.177.125.18) by BYAPR07MB5703.namprd07.prod.outlook.com (20.178.0.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.17; Wed, 19 Sep 2018 21:59:43 +0000 Received: from BYAPR07MB5365.namprd07.prod.outlook.com ([fe80::2047:9647:f196:bde0]) by BYAPR07MB5365.namprd07.prod.outlook.com ([fe80::2047:9647:f196:bde0%6]) with mapi id 15.20.1143.017; Wed, 19 Sep 2018 21:59:43 +0000 From: "Mody, Rasesh" To: "dev@dpdk.org" CC: "Mody, Rasesh" , "ferruh.yigit@intel.com" , Dept-Eng DPDK Dev , "stable@dpdk.org" Thread-Topic: [PATCH 4/5] net/bnx2x: fix call to link handling periodic function Thread-Index: AQHUUGQSKl0z19/awEGd3qyIkgrM2g== Date: Wed, 19 Sep 2018 21:59:43 +0000 Message-ID: <1537394318-17682-4-git-send-email-rasesh.mody@cavium.com> References: <1537394318-17682-1-git-send-email-rasesh.mody@cavium.com> In-Reply-To: <1537394318-17682-1-git-send-email-rasesh.mody@cavium.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR04CA0003.namprd04.prod.outlook.com (2603:10b6:a03:40::16) To BYAPR07MB5365.namprd07.prod.outlook.com (2603:10b6:a03:64::18) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Rasesh.Mody@cavium.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [198.186.1.5] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; BYAPR07MB5703; 6:TOC4+VzF/bnV25D1R4kKhwTWnfC1sjT4ZyI2mOpH1Ac4Nr49Q/2E0JNxgiRnRGVpmqJeU0aNYnlztjjB+Z5egG9xTxCLGB0aiNWYBWbGukH0WgxS2xOvTbnxlK2HaXfGUK7depgn5edWMnBr0jEOKg+po4yOUzpctuOOaqdEBY+dTO9q4TvZhR6Xx7hzqhUKAWF1ICs41pVde7SQWr75gAg6Nd3i84Djimz2x9943kBhazhS/2GvJPnGSFaNcqpOeRJWRLFM5rA/W92MbwKije+oix1InlLnqdM2I2cJUj1zdVcEC08YNjX2e1hZIW4foU88FcIpqAbSDyu6lrfz+Yu5KWbNOYx3QcqjpEHB68OU30icrTsIHrP0u4ZK5l6yJq2NYedWAqc/ymIlnYbrz2XHoPoWknjHdQtXHc0E/434c0A8znf7RkHY35Wm4WX8HaNXMJOiYf7droBeObRo8Q==; 5:u3NahLG54yIWeMuoIGOguDhB5P4sP4iymlEE2OzOxZ2MObnG6ejRFQ46NtrJZgR2N/4GSdjbKHAdScLrYVibUnpFFnh9KKOwsMP74P2HGdXYVI8n3MjHd3L/d8f9k1jTcbK+otk2NmTbXwssTDCwGfqevaP7jOvLDVFJnJyjEcw=; 7:RjKNRzIwGGCJ7Jyg6HvuOZjRpK7FZb8f3/Oayi31A5rOWynxg3EzK3bhR13Lz7icn7gEN0FxT+esfN2HQdUTuav/Zr5gued4+yDvstH38pSSc0ypboyMQi5Q0Ep/Ix+p77pAnc5glqh/2XB/3qgOuPmR2iKWhokJTmzZyaIp4x0xi7Io2488IPEHLVFKtfbBaV2ttzlgooE+11t0s9C1r2EvoVV3yyMdmsfaRObbuTKoKd3H7JhPnZEgQc5jnUBb x-ms-office365-filtering-correlation-id: 634a9082-5d02-4366-3c47-08d61e7b3461 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BYAPR07MB5703; x-ms-traffictypediagnostic: BYAPR07MB5703: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(823301075)(3231355)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(201708071742011)(7699051); SRVR:BYAPR07MB5703; BCL:0; PCL:0; RULEID:; SRVR:BYAPR07MB5703; x-forefront-prvs: 0800C0C167 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(1496009)(346002)(136003)(396003)(376002)(39850400004)(366004)(189003)(199004)(446003)(5660300001)(76176011)(2351001)(6486002)(7736002)(6116002)(6436002)(3846002)(99286004)(54906003)(6916009)(11346002)(476003)(486006)(105586002)(2616005)(478600001)(5640700003)(106356001)(305945005)(6512007)(97736004)(66066001)(52116002)(53936002)(2906002)(256004)(316002)(4326008)(2501003)(102836004)(2900100001)(81156014)(386003)(86362001)(81166006)(5250100002)(26005)(36756003)(8676002)(72206003)(68736007)(8936002)(25786009)(1730700003)(14454004)(186003)(6506007); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB5703; H:BYAPR07MB5365.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 9GL30RN6nEie0zfoI6u6ierCLBTMns9LeIyoNnjzlPR2UoYLaNYh/JU1lm7oUvoAZJnulMdX1EtOfGSYS9JdbA5GEB4qdwDOawdaRau5WQ4q2gVvQUbt7nks8qSXbbCW1M9jK4qd3L87KxOuvfgKYE2HaZbBf6WsBDshStAyiE+J4jCLh96dgDDuGr2A5pGHE2zoCyP76kx16J7U4PV66QPcOQa2HYK6yc19gHKbYWVccR28q5+pEtgLFv1eYJEDKniyKlyI0USQZrtyBMvG304RMyEkyiRPTQeEQzLuKlRTSAD4JMHbgCWVBCfcfslVVV8MrE+LUdtFDECJ9TVDAi7euc2pA0Belit8g5AZNi0= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-Network-Message-Id: 634a9082-5d02-4366-3c47-08d61e7b3461 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Sep 2018 21:59:43.2405 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB5703 Subject: [dpdk-dev] [PATCH 4/5] net/bnx2x: fix call to link handling periodic function 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: , X-List-Received-Date: Wed, 19 Sep 2018 21:59:45 -0000 If link handling periodic function is allowed to be called in interrupt context, the periodic function can get called too frequently and exhaust the retry credits to check link status. This change makes sure link handling periodic function is not called in interrupt context. Fixes: 540a211084a7 ("bnx2x: driver core") Cc: stable@dpdk.org Signed-off-by: Rasesh Mody --- drivers/net/bnx2x/bnx2x_ethdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_eth= dev.c index ae2e60a..0057843 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.c +++ b/drivers/net/bnx2x/bnx2x_ethdev.c @@ -131,7 +131,9 @@ struct rte_bnx2x_xstats_name_off { =20 PMD_DEBUG_PERIODIC_LOG(INFO, sc, "Interrupt handled"); =20 + atomic_store_rel_long(&sc->periodic_flags, PERIODIC_STOP); bnx2x_interrupt_action(dev); + atomic_store_rel_long(&sc->periodic_flags, PERIODIC_GO); rte_intr_enable(&sc->pci_dev->intr_handle); } =20 --=20 1.7.10.3