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 A2FDBA2E1B for ; Thu, 5 Sep 2019 07:44:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 91F691ED41; Thu, 5 Sep 2019 07:44:17 +0200 (CEST) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00076.outbound.protection.outlook.com [40.107.0.76]) by dpdk.org (Postfix) with ESMTP id 8EE911ED2A; Thu, 5 Sep 2019 07:44:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BSEKLjM7C5HmefEEmvmDd5MDIphGScFI2f8t9vgetlc=; b=zlcdL8Yc9RRXyGMgk7lBduxnZHebzqFFNJVspsCQONROZuVzib++ylvu8jZbbzF93LwsiKrANMwTU8Fn/RyZcp/D3YwB5lQoKth6G0Kp4pqYQz/r2Ufyy8QyqLNx9gevW4UbJJvFtaCcivt1+lVD0ove0LES4Nape6oSvcsd5AQ= Received: from VI1PR08CA0185.eurprd08.prod.outlook.com (2603:10a6:800:d2::15) by HE1PR0802MB2394.eurprd08.prod.outlook.com (2603:10a6:3:dd::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2220.22; Thu, 5 Sep 2019 05:44:10 +0000 Received: from VE1EUR03FT056.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::202) by VI1PR08CA0185.outlook.office365.com (2603:10a6:800:d2::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2241.14 via Frontend Transport; Thu, 5 Sep 2019 05:44:09 +0000 Authentication-Results: spf=temperror (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=temperror action=none header.from=arm.com; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT056.mail.protection.outlook.com (10.152.19.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2241.14 via Frontend Transport; Thu, 5 Sep 2019 05:44:08 +0000 Received: ("Tessian outbound a25c4e5fef41:v27"); Thu, 05 Sep 2019 05:44:05 +0000 X-CR-MTA-TID: 64aa7808 Received: from 820c34f30150.1 (cr-mta-lb-1.cr-mta-net [104.47.8.57]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id 959D464A-4DF9-4943-AC3C-6BE6C9647F48.1; Thu, 05 Sep 2019 05:44:00 +0000 Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-am5eur03lp2057.outbound.protection.outlook.com [104.47.8.57]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 820c34f30150.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 05 Sep 2019 05:44:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QhkQQ7CboB6z72J+JJcATLj4q2cn2F0jqQr/HcVwTm2tdE5kgMY4ith3eIb7xlJtH1pzMq4LH9Le2n8Y01rql0fA1I6LHrvODhhX2/JWua1ClmYfZoo7ZRc8qnYXXzNJ41osFYbO+oIpxnKroOxeWbsl0lKALqRXP0OdNhQ7X68Okgh0nBm26hIFe7CsRIWcMI6ioEQ+bDRhjUp+8PKzk1/WkqvyPTP6FPNM5+BRckVlG6YFHCKNESg/GRJNgTovZyFmIXR1CLi5rtHpwRq+X1YO/uBY7OPkNMI0Q0SXZIe14bbhlDM3JgjQBtwTXGPlIxpmOdGu/7RLbzVgJYZbNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zpj0rCZ0gfJwCJky/vIzhm00oQItDgFag8N28+CPwB8=; b=FAW3/gBhJce7YH2M9iRLA56WGvo1wXEBLKCuih/yW5UpJGmSO/HF0IT6hN6mF+vnXzaYdoJ9PA7HSw+TqOEPu+KT+IXmyLdUIR/+3W2yChWiCsgJ+dXqwjhp8oI7tofovhLwiErgtCB0IpOLSiW8v6M+WEcDkCFmQgQIPz0b2SzDSPGCAFMsKCAZZIU2wnqBcdsRZ2fl8tfMEhH3QQQ8TMXOP5E4Xik1CJDSk5hnzFGow1KVofcToT8ROvTAUnnLTZgJwK5XmHWpRLyjv26u/wzK1M3mzEqycVxKAuJmzee+EjBkfeTI4N9fTEVuB7Jq0gLEsJi80aTE2q7ZkRyW0A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zpj0rCZ0gfJwCJky/vIzhm00oQItDgFag8N28+CPwB8=; b=JNDYSKgCOaJhAEO9/hgrHPr5A5jAX6bSY8pFmaARG5615biRWBD9NQ/p2UCSNgh6rqHvKcqAZp9AtZt8+KGhD4ukUbgv0gX2uFKKvEyoGMd+szEEpJRR/f8RqSiWwrZ5mSdjZ/g60V42K3DwY4yzar3vLB2duLVcBvxcKO+W6ds= Received: from VI1PR08MB5376.eurprd08.prod.outlook.com (52.133.244.200) by VI1PR08MB3325.eurprd08.prod.outlook.com (52.134.31.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2241.13; Thu, 5 Sep 2019 05:43:58 +0000 Received: from VI1PR08MB5376.eurprd08.prod.outlook.com ([fe80::c09a:49d3:eab2:f707]) by VI1PR08MB5376.eurprd08.prod.outlook.com ([fe80::c09a:49d3:eab2:f707%3]) with mapi id 15.20.2241.014; Thu, 5 Sep 2019 05:43:58 +0000 From: "Gavin Hu (Arm Technology China)" To: Marcin Smoczynski , "konstantin.ananyev@intel.com" , "keith.wiles@intel.com" , "adrien.mazarguil@6wind.com" CC: "dev@dpdk.org" , "stable@dpdk.org" , Mariusz Drost Thread-Topic: [dpdk-dev] [PATCH v1] net/tap: fix blocked rx packets error Thread-Index: AQHVYYP7cAk4ThGJHUCTTTk7ZXKVLKcci+Rw Date: Thu, 5 Sep 2019 05:43:57 +0000 Message-ID: References: <20190902114310.15928-1-marcinx.smoczynski@intel.com> In-Reply-To: <20190902114310.15928-1-marcinx.smoczynski@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 6289d2ae-3f7f-47d4-aa4c-b672eb724fe2.0 x-checkrecipientchecked: true Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Gavin.Hu@arm.com; x-originating-ip: [113.29.88.7] x-ms-publictraffictype: Email X-MS-Office365-Filtering-Correlation-Id: 5be30028-82a8-4c96-2c62-08d731c41245 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam-Untrusted: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:VI1PR08MB3325; X-MS-TrafficTypeDiagnostic: VI1PR08MB3325:|HE1PR0802MB2394: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:8273;OLM:8273; x-forefront-prvs: 015114592F X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(396003)(136003)(376002)(346002)(366004)(199004)(189003)(13464003)(2201001)(6436002)(55016002)(86362001)(4326008)(9686003)(53936002)(8936002)(26005)(186003)(55236004)(478600001)(486006)(102836004)(71190400001)(71200400001)(14454004)(5660300002)(256004)(446003)(6246003)(14444005)(11346002)(76176011)(476003)(6506007)(53546011)(229853002)(33656002)(99286004)(7736002)(305945005)(74316002)(2906002)(8676002)(81156014)(81166006)(3846002)(6116002)(15650500001)(7696005)(66066001)(316002)(2501003)(76116006)(110136005)(54906003)(52536014)(66946007)(66446008)(64756008)(25786009)(66556008)(66476007); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB3325; H:VI1PR08MB5376.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: TIQalUJvpf2toEVDA0Dbii8ZE16eTa/AgII7Zz4e+lfn+2BJS0juibb/doqIiDp4KIS2pRcPiuHKnYOF3ZjhXWAMtvuZjcYl8x7Y3pN0yXRwY9Iu1FSLUct6JrhfjjQkHRyx3fYXmWphObHVQ/64Vo+42TPuaA0GkhN22a5TZ3eu+VyXAXIralb+U8jIhUOTArbxMZwC9/AE7sCQVFdr6S4vMCPI/iXcCH8d2WRIwbg1T0ql7q6PoZexmjKC69zm8FRDEV+SnWUwTxb+QGCKfZw26itMp3KkoDNZj+jnfvfH4yVjUnuLGnhnRDO42TDege6eTgXqcZG/wLCEKR/TSS3U3+PbRUdYrW9YI2p5uqx2BexmXAyPPI5m0bGuHYn6zaRQTzNfxePvy2FS+2um7e7TvGwa9mi9vVsHf37X3iU= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3325 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Gavin.Hu@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT056.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; IPV:CAL; SCL:-1; CTRY:IE; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(376002)(346002)(136003)(396003)(39860400002)(2980300002)(13464003)(40434004)(189003)(199004)(4326008)(26826003)(2201001)(229853002)(5660300002)(52536014)(70586007)(25786009)(450100002)(316002)(70206006)(86362001)(478600001)(14444005)(8676002)(76130400001)(97756001)(81156014)(8746002)(81166006)(50466002)(2501003)(54906003)(14454004)(99286004)(55016002)(36906005)(336012)(6506007)(126002)(9686003)(76176011)(63350400001)(476003)(22756006)(46406003)(8936002)(26005)(66066001)(15650500001)(11346002)(486006)(7736002)(107886003)(356004)(7696005)(6246003)(305945005)(23726003)(102836004)(5024004)(446003)(3846002)(53546011)(2906002)(63370400001)(74316002)(47776003)(110136005)(186003)(33656002)(6116002); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0802MB2394; H:64aa7808-outbound-1.mta.getcheckrecipient.com; FPR:; SPF:TempError; LANG:en; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; MX:1; A:1; X-MS-Office365-Filtering-Correlation-Id-Prvs: 4ffa707e-103b-4db2-40db-08d731c40bfa X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(710020)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:HE1PR0802MB2394; X-Forefront-PRVS: 015114592F X-Microsoft-Antispam-Message-Info: AHoRScq1fOia4L+P1twP6Ue7UQXXlhM5pPAZIWVVLHsR7qYFHqf0RuucCyg010chjSGok/4Q1VaQo/uIJ93lRAxGRDv2Rz9lAH8TMpzXy5yD/uLZh8n0EzHpOspn2DshnYOjsd4OGh2V5IrdXHbbgFyb9Icuf67V60HZY0efRVK9ffLtoiFJ3SRsfIIRvBxw9YfwFzySJ72i27C4s1KdfS+2L4i31pucpBUtm0z5XIwmoktaL8iOuGt3HZuvmeUGPJfiqfklNLrfXvqk1qWuJYbo2GbNKOI5FcqHfteU6qktaXE0t+W9B1NXJLgV7qhYGJ6DsTB76cvlp70iwFjfDsvoxy2tSQbFClE3I0ni31yCgOTGAdt7FgLjR8TUMqGuYWZgH0pI8hTJWEP6njzap5olEDDXayIHtJl2ArljafU= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Sep 2019 05:44:08.3837 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5be30028-82a8-4c96-2c62-08d731c41245 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0802MB2394 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v1] net/tap: fix blocked rx packets error X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" HI Marcin, > -----Original Message----- > From: dev On Behalf Of Marcin Smoczynski > Sent: Monday, September 2, 2019 7:43 PM > To: konstantin.ananyev@intel.com; keith.wiles@intel.com; > adrien.mazarguil@6wind.com > Cc: dev@dpdk.org; stable@dpdk.org; Marcin Smoczynski > ; Mariusz Drost > > Subject: [dpdk-dev] [PATCH v1] net/tap: fix blocked rx packets error > > When OS sends more packets than are beaing read with a single s/ beaing/being > 'rte_eth_rx_burst' call, rx packets are getting stucked in the tap pmd > and are unable to receive, because trigger_seen is getting updated > and consecutive calls are not getting any packets. > > Do not update trigger_seen unless less than a max number of packets were > received allowing next call to receive the rest. > > Fixes: a0d8e807d9 ("net/tap: add Rx trigger") > Cc: stable@dpdk.org > > Tested-by: Mariusz Drost > Signed-off-by: Marcin Smoczynski > --- > drivers/net/tap/rte_eth_tap.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.= c > index 64bd04911..60121ae56 100644 > --- a/drivers/net/tap/rte_eth_tap.c > +++ b/drivers/net/tap/rte_eth_tap.c > @@ -353,8 +353,7 @@ pmd_rx_burst(void *queue, struct rte_mbuf **bufs, > uint16_t nb_pkts) > > if (trigger =3D=3D rxq->trigger_seen) > return 0; > - if (trigger) > - rxq->trigger_seen =3D trigger; > + > process_private =3D rte_eth_devices[rxq->in_port].process_private; > rte_compiler_barrier(); I see this compiler barrier was added together with the above "rxq->trigger= _seen =3D trigger", should it be removed or moved together downwards? > for (num_rx =3D 0; num_rx < nb_pkts; ) { > @@ -433,6 +432,9 @@ pmd_rx_burst(void *queue, struct rte_mbuf **bufs, > uint16_t nb_pkts) > rxq->stats.ipackets +=3D num_rx; > rxq->stats.ibytes +=3D num_rx_bytes; > > + if (trigger && num_rx < nb_pkts) > + rxq->trigger_seen =3D trigger; > + > return num_rx; > } > > -- > 2.17.1 IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you.