From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by dpdk.org (Postfix) with ESMTP id 79A5F1286 for ; Fri, 9 Jan 2015 23:42:26 +0100 (CET) Received: by mail-pa0-f49.google.com with SMTP id eu11so20977544pac.8 for ; Fri, 09 Jan 2015 14:42:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=vv/35gLhf0XRG9/A0C1d2xv8GMt820c8TL8CA2tjZFA=; b=Z/5aUUSkC1ygf4SeSBCGPy4/LGYSbY6kkHDdweTKxzPFPbd39kzhYI7NNaYQSmhiJ9 hA/62AQhuerWa+nNwhS+y3S+duBvI03juvmQBURNHUS742zZNeCRVW2JZCmuLLeoyjKl L4U6kqy/mr2to5g34rLYoqjoI3EbSDrXNqVNaL/dppenVe8tqpF0SBkY8BJ10BI3g12t YiBmMrfdqyCL8x4xCgv/eNsuW+u1Bc7VHOuE/fjWkQjYF50BxEhqspzK7mJDnQkO73RN Jg6lkS+8D0y2zHtmQO1jNxOsWiRBN+nti1DYxRIpyF4bnASUniOl+dE7ztXRlztCX61U 3JUg== X-Gm-Message-State: ALoCoQkBdkiV91UcvXyScDBBfGrdqr464KLxRlpyGbDiKkhl23ZWRgvhMd064E9JuYqwS45Hmdm/ X-Received: by 10.68.138.229 with SMTP id qt5mr27137802pbb.62.1420843345699; Fri, 09 Jan 2015 14:42:25 -0800 (PST) Received: from urahara (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by mx.google.com with ESMTPSA id po5sm7925482pbb.95.2015.01.09.14.42.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Jan 2015 14:42:25 -0800 (PST) Date: Fri, 9 Jan 2015 14:42:16 -0800 From: Stephen Hemminger To: Alejandro Lucero Message-ID: <20150109144216.4e472e85@urahara> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev Subject: Re: [dpdk-dev] ret_pktmbuf_pool_init problem with opaque_arg 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, 09 Jan 2015 22:42:27 -0000 On Fri, 9 Jan 2015 14:12:10 +0000 Alejandro Lucero wrote: > Inside this function mbuf_data_room_size is set to a default value if > opaque_arg is null and it should be set to the value pointed by opaque_arg > if not null. Current implementation is using not the value but with the > pointer itself. I think this: > > roomsz = (uint16_t)(uintptr_t)opaque_arg; > > should be something like this: > > roomsz = *(uint16_t *)opaque_arg; That would require an extra value in persistent (not stack) for the size. The way that is implemented, the caller can just pass the value by casting to unsigned long.