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 4E063A04C2; Mon, 25 Nov 2019 18:54:10 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AF67E2952; Mon, 25 Nov 2019 18:54:09 +0100 (CET) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id B656DCF3 for ; Mon, 25 Nov 2019 18:54:07 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 885BE22681; Mon, 25 Nov 2019 12:54:06 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 25 Nov 2019 12:54:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=Y0DOVNLWvQnf9pEQuQUFPwJHboaONX4WFiMQo4y6bKc=; b=laEczGNPtNRP Sash/FLe0HJOrhHa2l55CmQj1yerDvMxuTisQlbIT6KrRgNBszvwfiCXnIhy+fME F7IX4wbkRhRV0RfurbfmrwgQ4bUdzAMue8+iCjWplN5UfvXSA6LTwQkluJ4rPijx Se5pE+Le2UT0sgUFcYrHbeKFrm/jJTY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=Y0DOVNLWvQnf9pEQuQUFPwJHboaONX4WFiMQo4y6b Kc=; b=Wwt15aexLQ1IrPdQ0qOFilcFHW0Cz4eM3S/mukjGHLHIvZ4c0+D/OYfp5 bfwZMl2I8KQaMZ6Oh5th8s2S35CTs0rGYQK5WFDihuwXD+ggp2FeFFSSM21nh1Ip ykopeg+8GGHeDPVzzu/DrXuh+GCjaqtRchO1pOOiMjqD0qTaPjS2cQX6fLXXyW/d iunw/GSTh0Q9+zGZFNQNtG+35DigmWiv9S20RmnQhTmXwWYaXf3mSnAC+XRLT3e2 pAG/VmMm05jAZA8CUzkHHxF8ZH2Qo/kP0p1FswSTVXaKtZQ7LTl6TrliEHMczIBA ELmn0jD8GXpxA3meJZ7lEzn9Lq3LQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudeiuddguddtjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc fkphepjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpeht hhhomhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id C40E180062; Mon, 25 Nov 2019 12:54:04 -0500 (EST) From: Thomas Monjalon To: "Van Haaren, Harry" , Aaron Conole Cc: "Amber, Kumar" , "dev@dpdk.org" , "Wang, Yipeng1" , "Yigit, Ferruh" , "Thakur, Sham Singh" , David Marchand Date: Mon, 25 Nov 2019 18:54:02 +0100 Message-ID: <2900799.QLPOietlla@xps> In-Reply-To: References: <20191122182100.15631-1-kumar.amber@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3] hash: added a new API to hash to query key id 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" > From: Aaron Conole > > - if (!service_valid(id)) > > + if (id >= RTE_SERVICE_NUM_MAX || !service_valid(id)) Why not adding this check in service_valid()?