From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F3DF0A00C2; Thu, 16 Jun 2022 11:15:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A1F9D42BCA; Thu, 16 Jun 2022 11:15:00 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 8AEF64281E for ; Thu, 16 Jun 2022 11:14:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655370898; x=1686906898; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=E9/W+Ilym5VBK5DdEmLGbEotF1mO/M7NaPCr1QQMAgU=; b=NLezIFgEOrg4txmUIRfIUNiF6vBpEdrmwI1wKUGXWE09iGWSfzGO1RkX eFKm4dzmMkZaKIEWh7WIf5lrVYfKh+ehA1oCuwWgeL1783OVfAlVaI4dB WCVdGe83wSRneJA2KEAHSLsuMgs3u/w6mjE1qyYgLjE0TZh1qF0IYLF4X HnL72/NxdyrN8mo8JEQqoF2xOOY+edrZ6PxmUdZ3ZLj7YxuwkrnPAqeOY b5baVHuc+z/QTPjUFdvoBbcLx2hhvQZ9aHxyFWf1OIErZkA9E92C4wFUs KeKC8SYTJ6p/OIK3f0i7kmKhBnVGqMZtlFUS+Pf2TiDWqP1r/2X7OBjDB Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10379"; a="280239976" X-IronPort-AV: E=Sophos;i="5.91,304,1647327600"; d="scan'208";a="280239976" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jun 2022 02:14:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,304,1647327600"; d="scan'208";a="762798791" Received: from silpixa00400573.ir.intel.com (HELO silpixa00400573.ger.corp.intel.com) ([10.237.223.107]) by orsmga005.jf.intel.com with ESMTP; 16 Jun 2022 02:14:56 -0700 From: Cristian Dumitrescu To: dev@dpdk.org Cc: Harshad Narayane Subject: [PATCH V2] pipeline: fix check against max number of learner table timeouts Date: Thu, 16 Jun 2022 10:14:55 +0100 Message-Id: <20220616091455.25347-1-cristian.dumitrescu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220613115239.27838-1-cristian.dumitrescu@intel.com> References: <20220613115239.27838-1-cristian.dumitrescu@intel.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Harshad Narayane Fix comparison used to check against the maximum number of learner table timeouts. Fixes: e2ecc53582fb ("pipeline: improve learner table timers") Signed-off-by: Harshad Narayane Signed-off-by: Cristian Dumitrescu --- lib/pipeline/rte_swx_pipeline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pipeline/rte_swx_pipeline.c b/lib/pipeline/rte_swx_pipeline.c index b4b44ad897..659d8726d1 100644 --- a/lib/pipeline/rte_swx_pipeline.c +++ b/lib/pipeline/rte_swx_pipeline.c @@ -8848,7 +8848,7 @@ rte_swx_pipeline_learner_config(struct rte_swx_pipeline *p, /* Any other checks. */ CHECK(size, EINVAL); CHECK(timeout, EINVAL); - CHECK(n_timeouts && (n_timeouts < RTE_SWX_TABLE_LEARNER_N_KEY_TIMEOUTS_MAX), EINVAL); + CHECK(n_timeouts && (n_timeouts <= RTE_SWX_TABLE_LEARNER_N_KEY_TIMEOUTS_MAX), EINVAL); /* Memory allocation. */ l = calloc(1, sizeof(struct learner)); -- 2.17.1