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 53694A0093; Mon, 13 Jun 2022 13:52:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 319FC40150; Mon, 13 Jun 2022 13:52:45 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 75538400EF for ; Mon, 13 Jun 2022 13:52:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655121164; x=1686657164; h=from:to:cc:subject:date:message-id; bh=E9/W+Ilym5VBK5DdEmLGbEotF1mO/M7NaPCr1QQMAgU=; b=dWysG3lC4U03hJxO+WSOhVxid0jPDV+Wd9o4B/BSgLgY6OtrBUtutlSD ADmzwB7B2+J8GnTT3riNlalD23qrqyf4We+XB9gUh2VU6QYEX8V9YGnLy CisylgRwxkPG1Ff/KVMihvZE73Xj/knZ6l6+87WCZkEDh7lDmRHw56txm RyH7wMp7umXM6ylgzGKE5AYhxb+UKlhU9Z+DHoRw9+CSnY+ff7lBpCMFE glD06grBIM3FzM2sQ/UV2GHN9pSflJ6BoVEdVMgyOtT1UZ9+Fk6OvoC/R O9sHihx/EdG0PJYnJwVPrKv04M/HQsE1gxrFGFZrNgjIUTw2XX4JAC63F g==; X-IronPort-AV: E=McAfee;i="6400,9594,10376"; a="303653652" X-IronPort-AV: E=Sophos;i="5.91,297,1647327600"; d="scan'208";a="303653652" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jun 2022 04:52:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,297,1647327600"; d="scan'208";a="686006615" Received: from silpixa00400573.ir.intel.com (HELO silpixa00400573.ger.corp.intel.com) ([10.237.223.107]) by fmsmga002.fm.intel.com with ESMTP; 13 Jun 2022 04:52:40 -0700 From: Cristian Dumitrescu To: dev@dpdk.org Cc: Harshad Narayane Subject: [PATCH] pipeline: fix comparison Date: Mon, 13 Jun 2022 12:52:39 +0100 Message-Id: <20220613115239.27838-1-cristian.dumitrescu@intel.com> X-Mailer: git-send-email 2.17.1 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