From patchwork Mon Aug 3 11:20:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sarosh Arif X-Patchwork-Id: 75142 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8445BA052A; Mon, 3 Aug 2020 13:22:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BF0F91C025; Mon, 3 Aug 2020 13:22:08 +0200 (CEST) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by dpdk.org (Postfix) with ESMTP id E26B02952 for ; Mon, 3 Aug 2020 13:22:07 +0200 (CEST) Received: by mail-wm1-f68.google.com with SMTP id p14so14010925wmg.1 for ; Mon, 03 Aug 2020 04:22:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emumba-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=Dawzn8dYWiZL4HwdHooDqRwzS0ZqzAbVV5s+Ta8Sq5w=; b=KzhWfNbVrjZ6PbJSMIN2rQroWgbTtHFg03S2IRLlSSkA0COhnrt62vM8iR+X/vtDDK jYjq9hfkxpmXj1VthFrpj9R1l+mJZ/2HtUaAUOt7sI/OpOlPExLFxhF6/z927n0LU6ZQ FvHTqGcKLn41RuHwQ4tQqM59b28ZF5sXg7RoMYIw+MVw6ZhJR+jG7Dn+tPdEQmu0RKza 3Vc4CPgECxODdX9Ldi0mMvOg0iS3FswgyhFVo3LNLPlB+lTF24GOvDNDCYrDgVBQlKHZ h0Zqu96hh40z3SSvVhYUV+uEzMwBjIT3EkowUpATOvGjehV6ZwbHu6c6FythoryrvSS8 xcrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Dawzn8dYWiZL4HwdHooDqRwzS0ZqzAbVV5s+Ta8Sq5w=; b=gaPDmDAPOcaGx5zgzWD+F+wC/8Pm8m29SwxkORiO/1an9+Mux8GUZYE11AoGpPj6XE SIb6dadrfamYPKpF4BhmKT+risw2fkAVYA8dD3NaCRI0qrg4WKttpXag1fHJZxb1hCc9 SHh0rFfxC5BP+g7JrLSP1ArsH/bH1JmKitBFAWHopNaSrsDIeEd4yJd0qJHh/4OZnKz8 J3xl8Jd2FgL9kao28GxZDUNGxSO759XHo8lAgcDrwCes+oZHqj3T/rDLjz4Wh5p4fEpN 5WoMNFMVXznVe35jfvxym+Wxxxi98fvKP1ZHJGMfALOHaF+FjNkMCp/iBFCQ5QC99ESN dLfA== X-Gm-Message-State: AOAM533kFVPF3Y3c41qk4PFFm5BuqAfVfue0mKTx0sVBw28FLcE7+ew0 /pmcZpJjepnnI7CaIqeAx3kxwQ== X-Google-Smtp-Source: ABdhPJzIOn7vf6tSiFK1oSXNZZO9JQhAXeF/WqhrIZLm8eJwzug9Lsnr6wl7NtjvIev85QQ8PS91ew== X-Received: by 2002:a1c:2041:: with SMTP id g62mr15320958wmg.172.1596453727540; Mon, 03 Aug 2020 04:22:07 -0700 (PDT) Received: from localhost.localdomain ([101.50.93.133]) by smtp.gmail.com with ESMTPSA id j5sm24741903wma.45.2020.08.03.04.22.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2020 04:22:06 -0700 (PDT) From: Sarosh Arif To: erik.g.carrillo@intel.com, rsanford@akamai.com Cc: dev@dpdk.org, Sarosh Arif Date: Mon, 3 Aug 2020 16:20:59 +0500 Message-Id: <20200803112059.23328-1-sarosh.arif@emumba.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] doc: announce API change in timer 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" 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 To to prevent this rte_timer_reset_sync and rte_timer_stop_sync should have int return types, so that -1 can be returned if the above condition occurs Signed-off-by: Sarosh Arif --- doc/guides/rel_notes/deprecation.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index ea4cfa7a4..ed93a707d 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -151,3 +151,9 @@ Deprecation Notices Python 2 support will be completely removed in 20.11. In 20.08, explicit deprecation warnings will be displayed when running scripts with Python 2. + +* timer: Since timer can get stuck in an infinite loop if the application tries to + reset/stop some other timer in it's callback function, which is also about to + expire. The function ``rte_timer_stop_sync`` and ``rte_timer_stop_sync`` will + have a int return type in order to return with -1 in when this condition + occures.