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 0866CA052A for ; Fri, 10 Jul 2020 17:19:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CF6E01DA19; Fri, 10 Jul 2020 17:19:20 +0200 (CEST) Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by dpdk.org (Postfix) with ESMTP id B60D01DA19 for ; Fri, 10 Jul 2020 17:19:19 +0200 (CEST) Received: by mail-pg1-f193.google.com with SMTP id e8so2665417pgc.5 for ; Fri, 10 Jul 2020 08:19:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZhiXI+IAAoehh5Qw53xEgjkn8Ep2NK6UunCTtBh7Fhs=; b=cU4z2zJIA/FAxHxa85pKueI19sn2CUJJOKNLAltb1XkI8RGmG2C4HRp7+L6l3/V4sS HQnYU3R8jN6e/RNSBdiswP4hMGWGHF+ghOyWeasRGZvdUZOlE1xb061VSg/0oLnEeUrf DqSbNqhphWPujtO4fpFxnXdDGIyj15GAI9MHGvMZqiVL0y9eOF3IFrfYwPbu3bgNgNEm R1SL+vmBDooaFNZ8dHmWKKwPcHbCi6Iurr91KzEg59k8myfiFcnXHoIZ7ImzwdQBbzXv gAi79pOgRF02Tw5mc66RCiqiA4gvUVfbcwIY/w0jzO0tZTxQWrzkEH9mF1rvkvAWVzTb L2kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZhiXI+IAAoehh5Qw53xEgjkn8Ep2NK6UunCTtBh7Fhs=; b=IL2NRqkTIJwkPzjT4o7Yij255BqNXxv6mtevhXpaL7km5umYLWe+mnyNYIWt31dzSZ ddjIz87zDQq+lql/d40/lHcPVO5K7+dP8vN8GffVpOgGJd8Al1W7TZirtRyluESC5dXD +xtvq+FdzNYI9S90AkOEe9AdTUhTfMaBhlVjKyVucnCWhyfQ8sDvuJ1PIvMebxGggUEX aqLM3Jb9+Feufy1gF8jdGlWEnZRUxIeGvt37Ep6MwusiLPWWrqMg+rY4A5/sKXdWPlmK HF0Tw4mdJ7mInFDrOHP9b2zgndjQ6WDyMzDtsqOa/bC26VHcd5lbUB8hVYj97E9JaZXn 1MZg== X-Gm-Message-State: AOAM530sEpGOsX6+lkDKUYF+PeZhbDTrPp0MXzMVL9EN5w3mz5agKx87 uuww2LPTOVannOB3AL1hmYU3cQ== X-Google-Smtp-Source: ABdhPJz4nHa8dj8oMZ+SGFgKvaunn9KQXEcetqsZ9BYu69jD6Qqp75IL6MgAC92MD0/lSmEl6+Qr7Q== X-Received: by 2002:aa7:934a:: with SMTP id 10mr26369180pfn.302.1594394358668; Fri, 10 Jul 2020 08:19:18 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id s12sm5865183pgp.54.2020.07.10.08.19.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2020 08:19:18 -0700 (PDT) Date: Fri, 10 Jul 2020 08:19:10 -0700 From: Stephen Hemminger To: Sarosh Arif Cc: rsanford@akamai.com, erik.g.carrillo@intel.com, dev@dpdk.org, stable@dpdk.org, h.mikita89@gmail.com Message-ID: <20200710081910.442d3248@hermes.lan> In-Reply-To: <20200710065954.4937-1-sarosh.arif@emumba.com> References: <20200707090320.2463-1-sarosh.arif@emumba.com> <20200710065954.4937-1-sarosh.arif@emumba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v3] lib/librte_timer:fix corruption with reset 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" On Fri, 10 Jul 2020 11:59:54 +0500 Sarosh Arif wrote: > If the user tries to reset/stop some other timer in it's callback > function, which is also about to expire, using > rte_timer_reset_sync/rte_timer_stop_sync the application goes into > an infinite loop. This happens because > rte_timer_reset_sync/rte_timer_stop_sync loop until the timer > resets/stops and there is check inside timer_set_config_state which > prevents a running timer from being reset/stopped by not it's own > timer_cb. Therefore timer_set_config_state returns -1 due to which > rte_timer_reset returns -1 and rte_timer_reset_sync goes into an > infinite loop. > > The soloution to this problem is to return -1 from > rte_timer_reset_sync/rte_timer_stop_sync in case the user tries to > reset/stop some other timer in it's callback function. > > Bugzilla ID: 491 > Fixes: 20d159f20543 ("timer: fix corruption with reset") > Cc: h.mikita89@gmail.com > Signed-off-by: Sarosh Arif > --- > v2: remove line continuations > v3: separate code and declarations If you want to change the return value, you need to go through the steps in the API/ABI policy. Maybe even symbol versioning. Sorry, I know it is painful but we committed to the rules. And changing the return value can never go to stable.