From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0058.outbound.protection.outlook.com [104.47.38.58]) by dpdk.org (Postfix) with ESMTP id 737EF1E240; Mon, 11 Jun 2018 14:19:51 +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=jMjbcjR3XZhg/yNgb8BEudmbSUffYwWGxumReSuJTQU=; b=e+qtzbRrpjIhIisgHvfgRFEATP/NoY+s/NgvKU1SAdsThoqwc2zBgaptW+cONOQlonxBfRE6yHEmwaaAAzIc5nnWtiDnv6twfxtqqO3Vk2jjVoMGRq7odiOpvAoFgRw9Xq3PefOT0+B57PJnXiYQP5hes2dwxsKTk7IirQbAjOQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (115.113.156.3) by BN3PR07MB2515.namprd07.prod.outlook.com (2a01:111:e400:7bbf::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.841.14; Mon, 11 Jun 2018 12:19:47 +0000 Date: Mon, 11 Jun 2018 17:49:30 +0530 From: Jerin Jacob To: Nikhil Rao Cc: dev@dpdk.org, stable@dpdk.org Message-ID: <20180611121929.GD8358@jerin> References: <1528116917-156214-1-git-send-email-nikhil.rao@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1528116917-156214-1-git-send-email-nikhil.rao@intel.com> User-Agent: Mutt/1.10.0 (2018-05-17) X-Originating-IP: [115.113.156.3] X-ClientProxiedBy: BMXPR01CA0012.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:d::22) To BN3PR07MB2515.namprd07.prod.outlook.com (2a01:111:e400:7bbf::12) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:BN3PR07MB2515; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2515; 3:dsZnUXw0tr6zGMCP4L45K1rVlp6or8swVGbWk/H0Ealczxj1dk5B/H9MhMhkN9ZzNor8sHRjYJ3M/vDezdCzbys36Pg+G4+lCmTTfATE1AVnP+3xWMc1PJ9AdsODbnGWKGmi4KReKZBjcdnCnqW/bMlbrPYRgvZUt0REUNh8wIp5NmRt1re3qsWUR+3tIfNCEolOdn90K8tRd8h3+2RxPwWGkKMhKRscOgvH0GMBXV/O8YyIxF38fXT5iCgJO+dc; 25:78JfUI/6WzWJQ7lzxd3Z333ZdPXhpGVFh8Vba1hmDX+3W6ZhsirK4K0T5vlKy8NApc42zh9ysfflCO1uQvxm2o0f8PU9NemMg3dKUcLvgsU/43HJcTBO2UL5kS6wyGqrdwrsRy2FRXAeiY18MaPADINZUZSXHuPTlgN9n7qzl6azgybqtlYQb9LgaA1CJNp2dN2JN6bbmnfU79Mh1b/vWl/0VVl7zsVZNFKkaudFHZpyURNQFLmHLBFm3hoeajdrEOuhpbpvhG5im+oJg2queXHTLgIaKCaY/GaCzcFlDLWoHD+4NRwtqDZyEVMc/HSljHV5Yt1B4eNA1nlaWoV3Gw==; 31:1hT+R239Gsy+s3AFr8rxfwWg8GN0odEJuWaHFAZkfGOEfGjp5TzaCbdG84T7vZF/ofugAylWk6zGi4tN300UG/4NlRPrmS/d9i94zfyTOMNsZth0E4paidkExzNUuIwuUhsOQ2NxUXdVP47BNt96Jt4wDDZNw018KR1XvqqtOltswU+SbhUNq3Zi44YXDNHAoInFMrVXmPrsVxWRR7PirJ2xvA+PbU03VOf/ro34+8M= X-MS-TrafficTypeDiagnostic: BN3PR07MB2515: X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2515; 20:c9rEGXEt0/bWuf4kif8j0jLAdfH/nUUEoZ15S9EbKAFIWLr44HlgHBIBPVkjqWUHbxx6mm2H46+a+hKNWh/GomwBJTT8ExoPkJi9AMyDvdRxHGFOqaegJJBMvTXwOcilxqTxGhSkqkLjyG88pjnvDxtbhXD/AWkj11KKm57COsqOzXSFfnKU8mc3QcZshgZ9GQ+dbPrIsCVuOgcKs/lFXR3B3gRpQcFepwdlVMt5SRRSN6dlm7sA+ZSVW2c0N7qzKE6nn4iNNVnkTsh4t5RJDMdRiwiI85SBQqE2V0lTv8Z6b1+5c7ZnGuFRU/yLfq1Z2vsXGHmZJMS9B4+3ihdJZjAUD4AbR7X8hnMHAm7ulDdJiEKWJmHPPBxDYOwVfe/TjqaIEw1zb6BC6LGihD21ufZ0rjGyMkOVywFlXLOxhD/6p8iLZ7/DRLqq0qA19xVjiTCoZo2j3Hs5ZC9d9x7NJN7oG7wsJAQsveL3wcUsKa5HnBTZbXvxuthEQVkIpV3iWMQzl+xl+idWcz5bymBHMXrcBAmUOkMtlFed6t2RRaWqlNCQoaP7aF8lsT5hqayIVW95XJS3xyX2lPAD4SFWFgIN7PVSQ/e3276tIwBS2/U=; 4:BXPitzrmgm43cptt6qx600kCyS+lSkFAa9WQHF6guGe9NabVoiTKdtd9yYVugl0SYR87/wKmQTXIDYoxjEaxkUQGylYgi8YFzUD3dih/9v+jvooOouXNd5VfERYWz3bfVqd1mwSfdhlYhYdH6VcvsLIIzVCK2GBUZzcHigxA651UpYd91cCmGGkWVBxH34+iuoqgqF/KdGx+b/vlP5g4UBU/4QuDp7MixBaKVadqa4aoQNDPPgFGnQcFzpbEba/Uv7yv+4arhIFGdPIaOzmuJlQXImr9/7y/KkXgciycjCoTJQZcmcZYnVJ+nbdb5XeY X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(10201501046)(3002001)(3231254)(944501410)(52105095)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:BN3PR07MB2515; BCL:0; PCL:0; RULEID:; SRVR:BN3PR07MB2515; X-Forefront-PRVS: 070092A9D3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(346002)(39850400004)(366004)(396003)(376002)(13464003)(189003)(199004)(186003)(7736002)(6496006)(316002)(105586002)(33896004)(33716001)(16586007)(42882007)(6916009)(52116002)(76176011)(55016002)(33656002)(53936002)(9686003)(6246003)(25786009)(68736007)(4326008)(305945005)(97736004)(229853002)(58126008)(5660300001)(106356001)(6666003)(50466002)(44832011)(8936002)(66066001)(476003)(81166006)(386003)(55236004)(486006)(81156014)(3846002)(1076002)(72206003)(6116002)(23726003)(446003)(47776003)(26005)(59450400001)(2906002)(11346002)(478600001)(956004)(8676002)(16526019)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR07MB2515; H:jerin; 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-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR07MB2515; 23:516Fg4+0pH4XxovJSjoEPRYmtctTHlfwXsQfYAi1K?= =?us-ascii?Q?OcW2bVVebLYhN1wx+Nx/91r6BI0E5CouhJvjZFb1HWB4HHApOqmuvynzWl1c?= =?us-ascii?Q?DWOurFl9WVvOF3Vs/clYa9rWcDix0DZT9kN7Hd+Kr13UUrwwAP12zQYpGVbN?= =?us-ascii?Q?gQxKCdqbRVEH5h1Ttz3VHbNnwKTgRjq1aOQcBJdPgDNYCIs2lX0N1zYpeV0F?= =?us-ascii?Q?Eut4mO3sOhq8cp9Gt2JqetwF5AMPnP/PV5xMv+T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q?1nwOTDVqkUUstrbPJZO78NKhLN3emTiq3KpP3qFulyEBhitE79yIov8VDZsK?= =?us-ascii?Q?j4mHUlIoHfOfxbeqAeqGSNazNZcXwrZXzYlNhEgHYhizZkyfmNx30oRFZDUK?= =?us-ascii?Q?RdEEqQv4LXB66JvSgO8SMb/zcb/PXX+1Xhu/Lmhv674gYepj7TyyszqpxI0z?= =?us-ascii?Q?IGrqvQt8fBKqVkkOpMpQT5L+HjnKmfa/JFDgPzsVXfiOXgawL9S6M/0JFfZt?= =?us-ascii?Q?gDVImL46MgjfBFkvxmIdyugtik=3D?= X-Microsoft-Antispam-Message-Info: 1T+xwLxgWDe1V6ftJlefdfaD5yKSsumyRNJ4OL3Lj5wLCMUaJPxPjNxrn6M0awVix2Sf2mDbcGjFQE5hA8pSTThFmCrYoQzkT5U0CIenZGoPOfwQ55yj1RT25A+UvVw0zbIk/0cCpMrcofwq4Y9hMYPeRPZMia13o9MM1y01RZ/1D2KpdXv7ucO+XVIRbI+S X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2515; 6:GLC+4E5+nKfAWMDA8crvccdP7ISX9A2rn94bl4+ioFiSWxypgW8QmNePjjSU9YhOd2J1jIwLwkUybUwlya7Tr+8SlEzhPegaAp3/fTJGIMa3J9LjqG8v52oZf8068g5ami09/0+jAAd+0hfM7qsNXRs/sxvHA+IS6/TGQCOSlNaqRQJb78uKb0TmVrtJY/1xrSJfxo660VFbphI7KNnOUfUvmhqquzsxZcEC/nOVuqLSVqexVJkOCh2+kK3MwqFBlXLTI95TynyxU0sR+zjzoncNUsw164WHnM3EnQry3/QvFxOAyYIY+HDmqXhERtDe3ammwScF9RSXHNkOn0HPVYCkuyQUopTyDoeo9LzWCtBu8f0NRrhw/ygqCcxufLdw4RwqNvWGigvFrCvDDdMBcm7iTMfsDJMFxskKSsw6ENsLFw7T1oGuQyWiBQ7j3geoCFitRR7xGe2AJI1d1YLbcw==; 5:JgB6iKRVcWpNfn7Is9CKtlTx64Cft4KF8xxLjSw1YyWHzpEjPA8wJkIuYkjX+Jt2JZO5btlr3x1mdJRZBVM9HNg2Nzy/MHIMCR/bMzFBYNjwrROs2QW/mOdJK2ufdHiSnMSHai+lFjYfHw2vR7/9hp9UC1hFfeRC63FyeZTb3o0=; 24:E8iFwJMqu+6PDNvo5qD/f+F0FjZHeZKBK6RlmA+quy5wBZLLixWV7kSfrnHpYr5WvRxgk09HhBhqRkDYsqLKvxkTchym8TUi84ET6wrExpo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2515; 7:h/7eJWl1YgkJPpDyXEQuI3fU4CmKdf/37FxV+c5ZrIKvdupuXojoNspknGuQqDLbQbQ/osXv7Dh6biaqL1E5nkFhxcCSwc/UHJ73O5KVzY+2Is6SH8PQJHhEF1Tc960/coyOFkvFOUXYhhV1DrRUI7O1oXrBulJrqjF9IkwOIwtESSOO9WgHgK30kSkw2IiUh0hQWcKWRLnEeSMtt7LLcU2/QV4jsq693T7q8Z/fz3PXynvnnQo77tif4O/X3bgu X-MS-Office365-Filtering-Correlation-Id: 70ccec41-0ab6-4dd8-2ed0-08d5cf95a08e X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2018 12:19:47.7819 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 70ccec41-0ab6-4dd8-2ed0-08d5cf95a08e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR07MB2515 Subject: Re: [dpdk-stable] [PATCH] eventdev: fix Rx SW adapter stop 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: , X-List-Received-Date: Mon, 11 Jun 2018 12:19:51 -0000 -----Original Message----- > Date: Mon, 4 Jun 2018 18:25:17 +0530 > From: Nikhil Rao > To: jerin.jacob@caviumnetworks.com > CC: dev@dpdk.org, Nikhil Rao , stable@dpdk.org > Subject: [PATCH] eventdev: fix Rx SW adapter stop > X-Mailer: git-send-email 1.8.3.1 > > The Rx adapter stop call does not guarantee that the > SW service function will not execute after the > rte_event_eth_rx_adapter_stop() call. > > Add a "started" flag to prevent the adapter from executing > if stop has been called. > > Fixes: 9c38b704d280 ("eventdev: add eth Rx adapter implementation") > Signed-off-by: Nikhil Rao > CC: stable@dpdk.org Applied to dpdk-next-eventdev/master. Thanks. > --- > lib/librte_eventdev/rte_event_eth_rx_adapter.c | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c > index d03f870..7b39e39 100644 > --- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c > +++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c > @@ -91,6 +91,8 @@ struct rte_event_eth_rx_adapter { > int socket_id; > /* Per adapter EAL service */ > uint32_t service_id; > + /* Adapter started flag */ > + uint8_t rxa_started; > } __rte_cache_aligned; > > /* Per eth device */ > @@ -556,6 +558,10 @@ static uint16_t gcd_u16(uint16_t a, uint16_t b) > > if (rte_spinlock_trylock(&rx_adapter->rx_lock) == 0) > return 0; > + if (!rx_adapter->rxa_started) { > + return 0; > + rte_spinlock_unlock(&rx_adapter->rx_lock); > + } > eth_rx_poll(rx_adapter); > rte_spinlock_unlock(&rx_adapter->rx_lock); > return 0; > @@ -847,8 +853,12 @@ static int add_rx_queue(struct rte_event_eth_rx_adapter *rx_adapter, > &rte_eth_devices[i]); > } > > - if (use_service) > + if (use_service) { > + rte_spinlock_lock(&rx_adapter->rx_lock); > + rx_adapter->rxa_started = start; > rte_service_runstate_set(rx_adapter->service_id, start); > + rte_spinlock_unlock(&rx_adapter->rx_lock); > + } > > return 0; > } > -- > 1.8.3.1 >