From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f51.google.com (mail-wg0-f51.google.com [74.125.82.51]) by dpdk.org (Postfix) with ESMTP id 2AB81B3D6 for ; Fri, 29 May 2015 20:41:37 +0200 (CEST) Received: by wgbgq6 with SMTP id gq6so69940175wgb.3 for ; Fri, 29 May 2015 11:41:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=7MKHliD86FcqDlan2jNRDUI96WJv6dbOUg+16yjOOIo=; b=g1s8O3P65fSdIeFAAKLgrl8Ff1OjXGssA1AHoPrQ6Bb3AMMUgd0xbpVCk5sU/JIRp1 X5BCBizl/uZiQx6wnckrFBfjEHeaWq87jEyJzX2oSLcewCCfDqaMl/nKeUyp3FjO96Tz HLZ3gToGNz3eZbU1ELi5bVleGzRt0Ch7jnDhPErQM14E3DmLeSj8h2xVPnzUXjGhzOL/ qjGhG2Miuc7X0Ivzc9E7ola1suSAmA4sEmeiKMLQ58sEMmXYD5yiMjcWATtk2mBuGLhy E3uxV7wLmJijScOsySuxJJs1Gt6ZkmYGijRUHWiCIvvsWiQnw7D4yhTt87+YgoL40Jdy vo6A== X-Gm-Message-State: ALoCoQly3c/2PKJ/YkZKn2N0w886jYn5vu7t3ZIs0lA8UN/oFzq221oAvqnEu7FujfqF5/lkOu7E X-Received: by 10.180.198.10 with SMTP id iy10mr9170474wic.16.1432924897062; Fri, 29 May 2015 11:41:37 -0700 (PDT) Received: from xps13.localnet (166.16.90.92.rev.sfr.net. [92.90.16.166]) by mx.google.com with ESMTPSA id xy5sm9498993wjc.35.2015.05.29.11.41.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 May 2015 11:41:36 -0700 (PDT) From: Thomas Monjalon To: Adrien Mazarguil Date: Fri, 29 May 2015 17:57:29 +0200 Message-ID: <1652788.pJy0Kp4cx7@xps13> Organization: 6WIND User-Agent: KMail/4.14.7 (Linux/4.0.1-1-ARCH; KDE/4.14.7; x86_64; ; ) In-Reply-To: <2601191342CEEE43887BDE71AB97725821431E1D@irsmsx105.ger.corp.intel.com> References: <1432571266-25840-1-git-send-email-adrien.mazarguil@6wind.com> <2601191342CEEE43887BDE71AB97725821431E1D@irsmsx105.ger.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 1/2] mempool: fix returned value on 64 bit after counting objects X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2015 18:41:37 -0000 2015-05-27 00:43, Ananyev, Konstantin: > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Adrien Mazarguil > > rte_mempool_xmem_usage()'s return type is ssize_t which has the same > > architecture-dependent width as size_t but is signed. > > > > On 64-bit architectures, returning a negative uint32_t value without casting > > to ssize_t first does not work as intended, the sign bit is lost and the > > returned value is garbage. > > > > This commit fixes an assertion failure in testpmd on 64 bit architectures > > when combining --no-huge and --mp-anon outside of Xen Dom0: > > > > PANIC in mempool_anon_create(): > > line 170 assert "elt_num == mp->size" failed > > > > Fixes: 148f963fb532 ("xen: core library changes") > > > > Signed-off-by: Adrien Mazarguil > > Acked-by: Konstantin Ananyev Applied, thanks