From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id A165F2C28; Wed, 13 Mar 2019 18:55:27 +0100 (CET) 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 x2DHoxBQ012650; Wed, 13 Mar 2019 10:55:26 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=4tq6oa1445zcDzi+K5JioILSmEcV29LPlGIZbNYzNz4=; b=e+qDzhgJxN2XqS5VFLF5gZxGuiAoGqB7VhbSEPHnu9fDiwoH8ftaIN24XJ0NY9Crcf0+ 2cewKxdW91whPJHnFcWNyyhKaMY95WfS2byxBbcNenV5ygjuFfB+0e/jYkgtehBNS9Hq ufZlQ3AKW2DTRnNEvoPOp0FSj/t1TZ+zlPLgWv2wvLmlUISn1KEAudTJSx9GqQAExH0p 6I7pYtesK0MA5S/gAR/54lpp6xNZFwF8U82jLN7f7LNboeV/WsQ1pNEW5d7C+dzjG2ON nRRrUjEhawXHzETSjv/Osw8rlIuMG72zGFcPiKiD9iBnipVyb6Eiu/xx2Ly6SGgr75Kw lA== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 2r6s7ujptn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 13 Mar 2019 10:55:26 -0700 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 13 Mar 2019 10:55:20 -0700 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (104.47.45.57) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Wed, 13 Mar 2019 10:55:20 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4tq6oa1445zcDzi+K5JioILSmEcV29LPlGIZbNYzNz4=; b=A2aM9ehNalOn+HHOmiNlS/ZiLHCfR1cq1zBhVg6jel5YAP+NQZEnZWfkf0RI8sOB7SbjByRwkILjYVd8FAx5zBrdU6gK5kATN4ZyiABdZbPsgD/i7dsnPzDSOgfNMMyHkSfM7nPd2sIiuyj6j2LV/fz9UIcT6pJ+bkn5eV4k3Mw= Received: from BYAPR18MB2838.namprd18.prod.outlook.com (20.179.58.18) by BYAPR18MB2695.namprd18.prod.outlook.com (20.178.207.224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.13; Wed, 13 Mar 2019 17:55:19 +0000 Received: from BYAPR18MB2838.namprd18.prod.outlook.com ([fe80::a9e1:1b71:88f7:8908]) by BYAPR18MB2838.namprd18.prod.outlook.com ([fe80::a9e1:1b71:88f7:8908%5]) with mapi id 15.20.1709.011; Wed, 13 Mar 2019 17:55:19 +0000 From: Rasesh Mody To: Shahed Shaikh , "dev@dpdk.org" CC: "ferruh.yigit@intel.com" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 1/1] net/qede: fix receive packet drop Thread-Index: AQHU2PQN2Pl9hm+/QE6clMxMh4QmMaYJ2bdw Date: Wed, 13 Mar 2019 17:55:19 +0000 Message-ID: References: <20190312165114.23740-1-shshaikh@marvell.com> In-Reply-To: <20190312165114.23740-1-shshaikh@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [199.233.58.37] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 20f0cd6a-1b5a-4bff-0996-08d6a7dd0e9d x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600127)(711020)(4605104)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:BYAPR18MB2695; x-ms-traffictypediagnostic: BYAPR18MB2695: x-microsoft-antispam-prvs: x-forefront-prvs: 09752BC779 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(396003)(376002)(39850400004)(366004)(136003)(189003)(199004)(446003)(6246003)(110136005)(25786009)(86362001)(6116002)(11346002)(54906003)(476003)(4326008)(106356001)(97736004)(53936002)(486006)(3846002)(256004)(7696005)(9686003)(26005)(105586002)(76176011)(68736007)(55016002)(6436002)(8936002)(102836004)(316002)(5660300002)(99286004)(71200400001)(71190400001)(6506007)(66066001)(229853002)(52536013)(74316002)(305945005)(186003)(33656002)(2501003)(81166006)(2906002)(81156014)(8676002)(7736002)(478600001)(14454004); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR18MB2695; H:BYAPR18MB2838.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 6E+ruScDpmQlUg5TU1QXSAT1AWpe8aSCMscmm8tTYvW0mYTHmfMm2izzKl47ClVPYp1OHMfUrrqZJrVw3Iiw+pwT3ux4dpKY8coe2zZVwfNgTFC9mr1ohQDx0Wn/+D2Oqu79J9PPq/GPN0kwiNUWQEw4ZFBr0vtknimNCOj3cSk1ATxO49lzYtFvZwpSZGSvYmJyIJKUHQujwOtq0lKqclCDx7pWchj05IW6h/uyaeb3gq1pihE8UGgYmsvi2LecKoe5hGCwHyzqdiD+jQQBV6pHZunVJF03nQGqy1dnlSJxnMpDF/nSoHvTSSDGUa7Q6X80NldRHCnKaaT6l9K8IfNJgOhS28b66zUsm2S32Ob5tYBjPJqsN0vlPFlrsra9wuDfEt64XKGXvpAzBXXBn9c122A0YRAznu0r8dcCh5g= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 20f0cd6a-1b5a-4bff-0996-08d6a7dd0e9d X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Mar 2019 17:55:19.3126 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR18MB2695 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-13_11:, , signatures=0 Subject: Re: [dpdk-dev] [PATCH 1/1] net/qede: fix receive 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: , X-List-Received-Date: Wed, 13 Mar 2019 17:55:28 -0000 >From: dev On Behalf Of Shahed Shaikh >Sent: Tuesday, March 12, 2019 9:51 AM > >There is a corner case in which driver won't post receive buffers when dri= ver >has processed all received packets in single loop (i.e. hw_consumer =3D=3D >sw_consumer) and then HW will start dropping packets since it did not see >new receive buffers posted. > >This corner case is seen when size of Rx ring is less than or equals Rx pa= cket >burst count for dev->rx_pkt_burst(). > >Fixes: 8f2312474529 ("net/qede: fix performance bottleneck in Rx path") >Cc: stable@dpdk.org > >Signed-off-by: Shahed Shaikh >--- Acked-by: Rasesh Mody > drivers/net/qede/qede_rxtx.c | 15 ++++++++------- > 1 file changed, 8 insertions(+), 7 deletions(-) > >diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c >index 70c32e3..27bac09 100644 >--- a/drivers/net/qede/qede_rxtx.c >+++ b/drivers/net/qede/qede_rxtx.c >@@ -1420,13 +1420,6 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf >**rx_pkts, uint16_t nb_pkts) > uint32_t rss_hash; > int rx_alloc_count =3D 0; > >- hw_comp_cons =3D rte_le_to_cpu_16(*rxq->hw_cons_ptr); >- sw_comp_cons =3D ecore_chain_get_cons_idx(&rxq->rx_comp_ring); >- >- rte_rmb(); >- >- if (hw_comp_cons =3D=3D sw_comp_cons) >- return 0; > > /* Allocate buffers that we used in previous loop */ > if (rxq->rx_alloc_count) { >@@ -1447,6 +1440,14 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf >**rx_pkts, uint16_t nb_pkts) > rxq->rx_alloc_count =3D 0; > } > >+ hw_comp_cons =3D rte_le_to_cpu_16(*rxq->hw_cons_ptr); >+ sw_comp_cons =3D ecore_chain_get_cons_idx(&rxq->rx_comp_ring); >+ >+ rte_rmb(); >+ >+ if (hw_comp_cons =3D=3D sw_comp_cons) >+ return 0; >+ > while (sw_comp_cons !=3D hw_comp_cons) { > ol_flags =3D 0; > packet_type =3D RTE_PTYPE_UNKNOWN; >-- >2.7.4