From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id E9CEA1B5E9 for ; Sun, 5 Aug 2018 14:59:33 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 637FA213D0; Sun, 5 Aug 2018 08:59:33 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 05 Aug 2018 08:59:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=sA8ADqoOgMlpnixDlIwCm/mHlq Byn0gUIfZA9qFRB9I=; b=ZpIMSu7Um/zNiIbuTMiDVgTOuOPivQu4Rr7szUcwbN Rtpqntv2yCT4JbBJpckuAoMJdN5ir9jEv3K5qbUJxqK5RlpJrpMLmBOqHYDM9KtB V7thgfC2xLhw2OGkbHS+qP42BQT5EdetlxRUcfuD6dqMKfWZ0qNc0gIOtLHfO6Sy s= 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-sender:x-me-sender:x-sasl-enc; s=fm3; bh=sA8ADq oOgMlpnixDlIwCm/mHlqByn0gUIfZA9qFRB9I=; b=UTn/ohQ25xfMkEhI+ijuqq 4O98UskClLQ2rqTNjMVko4CiVeTLSVmYcEXvcOs5zTHUnu9CWTh7SyPACFDFOkrZ YznccYln/vkr8fBtJFZ2hOY2bMgnnxaDQP7Z9yJAndQPTdTNfAhFGODljP+6ZSvt 7U8he11cYw4BF2+kJbQpGCrsPS5dn/PR2wEJWYzrQ/Wmg5/CvURrecAE/d1exwaI P165OARlh3XemQXUB/q3U2i1/S2PR8agfWNxxVIDd9aP1VkyrxUPdgEyOryZu/NW /DI2hoAGzCzggglmrf+74Wtq2vYU8d3P70dTKCkgYNAOE9TosHVZ1Av7vmnYPFnQ == X-ME-Proxy: X-ME-Sender: Received: from xps.localnet (221.87.136.77.rev.sfr.net [77.136.87.221]) by mail.messagingengine.com (Postfix) with ESMTPA id 81827E455E; Sun, 5 Aug 2018 08:59:30 -0400 (EDT) From: Thomas Monjalon To: konstantin.ananyev@intel.com Cc: dev@dpdk.org, Li Han Date: Sun, 05 Aug 2018 14:59:21 +0200 Message-ID: <4156592.vZpZK2Boq5@xps> In-Reply-To: <1533175263-4642-1-git-send-email-han.li1@zte.com.cn> References: <1533175263-4642-1-git-send-email-han.li1@zte.com.cn> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] lib/librte_ip_frag:fix ip_frag_key_cmp bug 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: , X-List-Received-Date: Sun, 05 Aug 2018 12:59:34 -0000 Konstantin, Is it candidate for last minute fix in 18.08? 02/08/2018 04:01, Li Han: > in struct ip_frag_key,src_dst[] type is uint64_t. > but "val" which to store the calc restult ,type is uint32_t. > we may lost high 32 bit key. and function return value is int, > but it won't return < 0. > > Signed-off-by: Li Han > --- > lib/librte_ip_frag/ip_frag_common.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/librte_ip_frag/ip_frag_common.h b/lib/librte_ip_frag/ip_frag_common.h > index 197acf8..ca69680 100644 > --- a/lib/librte_ip_frag/ip_frag_common.h > +++ b/lib/librte_ip_frag/ip_frag_common.h > @@ -69,10 +69,10 @@ struct ip_frag_pkt * ip_frag_lookup(struct rte_ip_frag_tbl *tbl, > } > > /* compare two keys */ > -static inline int > +static inline uint64_t > ip_frag_key_cmp(const struct ip_frag_key * k1, const struct ip_frag_key * k2) > { > - uint32_t i, val; > + uint64_t i, val; > val = k1->id ^ k2->id; > for (i = 0; i < k1->key_len; i++) > val |= k1->src_dst[i] ^ k2->src_dst[i]; >