From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-f65.google.com (mail-ua1-f65.google.com [209.85.222.65]) by dpdk.org (Postfix) with ESMTP id 3114E2BA3 for ; Tue, 5 Mar 2019 09:30:30 +0100 (CET) Received: by mail-ua1-f65.google.com with SMTP id q17so7017570uam.0 for ; Tue, 05 Mar 2019 00:30:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=L06AIF9ixTs7h4K9MKpOktPTeXOC9t/E7MTcfpIsSDs=; b=jaTSgbwcT13CSEecjTiVJodOJx3rDrOL7p4qsdy2eB6R7jRvX9n9Q5OCUP4sbmELtw lKpERRV/Co4Xhlg4RExm3i6YHaT3OtftKE1+MSEwuoHZT17o48yMAizUC6Z8uUrZcqdq aqO7Nlop4L3epkx8jB4St/hDj9CoczprE51fpE81bRPz6aglo6GjIF+Uw7eYl+Vrwji+ KPezLG8ODYw+X7oUBgYbnIYd+Bb10bHeP+nfsBtXzqM3LDrb/DWgH536Bq7FqBmyFYh0 qelid5rYQ5pkWB580YtOTM/gc3sfBZJb0MtarlmTFNCJMR6g4Eauo6xPjG7hRqml69DV uMzg== X-Gm-Message-State: APjAAAUVFBZVVfOaibwQSp60LWFrCrOOrINTOaPlz3x8XOXlq2bLBJQJ kDu2qWzvF6fWq/IodNlHaN7zqrHByiztUDxoxVZZ/BcEyNg= X-Google-Smtp-Source: APXvYqz0lGxyBh5Jeh90GvKKmaeX98SLq8kuwqe/tpBe2ro7DEgEXQPa9+xn+Pqa6/XTjcecdOUKdTJ159foMVjB664= X-Received: by 2002:ab0:3445:: with SMTP id a5mr574567uaq.130.1551774629076; Tue, 05 Mar 2019 00:30:29 -0800 (PST) MIME-Version: 1.0 References: <20190301080947.91086-1-xiaolong.ye@intel.com> <20190301080947.91086-3-xiaolong.ye@intel.com> In-Reply-To: <20190301080947.91086-3-xiaolong.ye@intel.com> From: David Marchand Date: Tue, 5 Mar 2019 09:30:18 +0100 Message-ID: To: Xiaolong Ye Cc: dev , Qi Zhang , Olivier Matz Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v1 2/6] lib/mbuf: enable parse flags when create mempool 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: Tue, 05 Mar 2019 08:30:30 -0000 On Fri, Mar 1, 2019 at 9:13 AM Xiaolong Ye wrote: > This give the option that applicaiton can configure each > memory chunk's size precisely. (by MEMPOOL_F_NO_SPREAD). > > Signed-off-by: Qi Zhang > Signed-off-by: Xiaolong Ye > Cc: maintainer --- > lib/librte_mbuf/rte_mbuf.c | 15 ++++++++++++--- > lib/librte_mbuf/rte_mbuf.h | 8 +++++++- > 2 files changed, 19 insertions(+), 4 deletions(-) > > diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c > index 21f6f7404..0f6fcff28 100644 > --- a/lib/librte_mbuf/rte_mbuf.c > +++ b/lib/librte_mbuf/rte_mbuf.c > @@ -110,7 +110,7 @@ rte_pktmbuf_init(struct rte_mempool *mp, > struct rte_mempool * > rte_pktmbuf_pool_create_by_ops(const char *name, unsigned int n, > unsigned int cache_size, uint16_t priv_size, uint16_t > data_room_size, > - int socket_id, const char *ops_name) > + unsigned int flags, int socket_id, const char *ops_name) > { > struct rte_mempool *mp; > struct rte_pktmbuf_pool_private mbp_priv; > You can't do that, rte_pktmbuf_pool_create_by_ops is exposed to the user apps and part of the ABI. You must define a new internal fonction that takes this flag, keeps the existing interface and add your new experimental api. -- David Marchand