From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 79EC5A0096 for ; Tue, 4 Jun 2019 20:55:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 25E6B1B95D; Tue, 4 Jun 2019 20:55:07 +0200 (CEST) Received: from NAM04-BN3-obe.outbound.protection.outlook.com (mail-eopbgr680080.outbound.protection.outlook.com [40.107.68.80]) by dpdk.org (Postfix) with ESMTP id 1DF592BEA; Tue, 4 Jun 2019 20:55:04 +0200 (CEST) Received: from SN4PR0701CA0004.namprd07.prod.outlook.com (2603:10b6:803:28::14) by DM5PR07MB2874.namprd07.prod.outlook.com (2603:10b6:3:8::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1965.12; Tue, 4 Jun 2019 18:55:03 +0000 Received: from BY2NAM05FT033.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e52::209) by SN4PR0701CA0004.outlook.office365.com (2603:10b6:803:28::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1943.17 via Frontend Transport; Tue, 4 Jun 2019 18:55:02 +0000 Authentication-Results: spf=fail (sender IP is 199.233.58.38) smtp.mailfrom=marvell.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=fail action=none header.from=marvell.com; Received-SPF: Fail (protection.outlook.com: domain of marvell.com does not designate 199.233.58.38 as permitted sender) receiver=protection.outlook.com; client-ip=199.233.58.38; helo=CAEXCH02.caveonetworks.com; Received: from CAEXCH02.caveonetworks.com (199.233.58.38) by BY2NAM05FT033.mail.protection.outlook.com (10.152.100.170) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.20.1965.10 via Frontend Transport; Tue, 4 Jun 2019 18:55:02 +0000 Received: from dut1171.mv.qlogic.com (10.112.88.18) by CAEXCH02.caveonetworks.com (10.67.98.110) with Microsoft SMTP Server (TLS) id 14.2.347.0; Tue, 4 Jun 2019 11:53:48 -0700 Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id x54Irsrn028666; Tue, 4 Jun 2019 11:53:54 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id x54IrsQU028665; Tue, 4 Jun 2019 11:53:54 -0700 From: Shahed Shaikh To: CC: , , , Date: Tue, 4 Jun 2019 11:53:48 -0700 Message-ID: <20190604185352.28629-1-shshaikh@marvell.com> X-Mailer: git-send-email 2.12.0 MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-Matching-Connectors: 132041481028234696; (abac79dc-c90b-41ba-8033-08d666125e47); (abac79dc-c90b-41ba-8033-08d666125e47) X-Forefront-Antispam-Report: CIP:199.233.58.38; IPV:CAL; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(396003)(376002)(136003)(39850400004)(346002)(2980300002)(1110001)(339900001)(199004)(189003)(16586007)(6666004)(54906003)(356004)(8936002)(68736007)(36756003)(305945005)(86362001)(81166006)(81156014)(450100002)(8676002)(126002)(50226002)(316002)(498600001)(76130400001)(70206006)(26826003)(70586007)(6916009)(1076003)(36906005)(87636003)(5660300002)(2616005)(476003)(486006)(53936002)(26005)(336012)(85426001)(69596002)(48376002)(42186006)(4326008)(2906002)(47776003)(80596001)(105606002)(50466002)(51416003)(2351001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB2874; H:CAEXCH02.caveonetworks.com; FPR:; SPF:Fail; LANG:en; PTR:InfoDomainNonexistent; A:1; MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6d98f219-ff2d-489d-78b3-08d6e91e26c4 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(5600148)(711020)(4605104)(1401327)(2017052603328); SRVR:DM5PR07MB2874; X-MS-TrafficTypeDiagnostic: DM5PR07MB2874: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5516; X-Forefront-PRVS: 0058ABBBC7 X-Microsoft-Antispam-Message-Info: LOmCvAw0ImrfMw1+Iq9T6Nuk7m+jDG0eeJMRTlGRW7X7Tzl00t1fjKDAWd3mLchR0mI7merY616qebsCoEee5fB5kjCkF+iP612moLfe6HjjywN3qOFyR0g5sLdkajACAARB0R3nH2WsLKnwq9Uz27oATaCHZCxPPZpWQmtm+HKx9Wb1xkClTN09Cm8Na90YVjR0+dfptA3nI0CIcLm4WJXjT6r/DoHWDt1E7bxmIiN8BHr82bm9pOLDMkNZhPDNgPLSiXIL2a/SyFQp67P+JjdCJGvIFsCb/QWhx2cf9vz6xOcL4cBKoLAQ1hpZOIJKUcqADd53EKJTjF7xJAkksIYMX1F9DNgvValyOaQgJF1iDVo9L1ivSvjNcJ/DUuiIdbiVaTwOdZt2wvFlBh9V43zhQ8ACZAh82DizWYEkRTQ= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2019 18:55:02.5682 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6d98f219-ff2d-489d-78b3-08d6e91e26c4 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[199.233.58.38]; Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB2874 Subject: [dpdk-dev] [PATCH 1/5] net/bnx2x: fix packet drop 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" Patch "8bd31421c593 ("net/bnx2x: fix ramrod timeout")" introduced a regression where sc->scan_fp flags is set for unexpectedly long time. So the slow path completion handler flow is run unnecessarily which walks over receive descriptor ring of fast path and drops the data packets while looking for slow path completion descriptor out of fast path ring. This issue is seen under heavy traffic with link events happening in background. Fixes: 8bd31421c593 ("net/bnx2x: fix ramrod timeout") Cc: stable@dpdk.org Signed-off-by: Shahed Shaikh --- drivers/net/bnx2x/bnx2x.c | 2 ++ drivers/net/bnx2x/ecore_sp.c | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c index 3e705c7a1..0698b1a8a 100644 --- a/drivers/net/bnx2x/bnx2x.c +++ b/drivers/net/bnx2x/bnx2x.c @@ -4572,6 +4572,8 @@ static void bnx2x_handle_fp_tq(struct bnx2x_fastpath *fp) } } + /* Assuming we have completed slow path completion, clear the flag */ + rte_atomic32_set(&sc->scan_fp, 0); bnx2x_ack_sb(sc, fp->igu_sb_id, USTORM_ID, le16toh(fp->fp_hc_idx), IGU_INT_ENABLE, 1); } diff --git a/drivers/net/bnx2x/ecore_sp.c b/drivers/net/bnx2x/ecore_sp.c index 43194095b..5ac22e725 100644 --- a/drivers/net/bnx2x/ecore_sp.c +++ b/drivers/net/bnx2x/ecore_sp.c @@ -291,10 +291,6 @@ static int ecore_state_wait(struct bnx2x_softc *sc, int state, cnt *= 20; ECORE_MSG(sc, "waiting for state to become %d", state); - /* being over protective to remind bnx2x_intr_legacy() to - * process RAMROD - */ - rte_atomic32_set(&sc->scan_fp, 1); ECORE_MIGHT_SLEEP(); while (cnt--) { -- 2.12.3