From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-f66.google.com (mail-vs1-f66.google.com [209.85.217.66]) by dpdk.org (Postfix) with ESMTP id A3F531B8C9 for ; Fri, 11 Jan 2019 09:33:04 +0100 (CET) Received: by mail-vs1-f66.google.com with SMTP id b74so8725849vsd.9 for ; Fri, 11 Jan 2019 00:33:04 -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=vZ6x7rh9DiBModV3YcrQ2I6u4A33WtEAfLt3ouTNw8Y=; b=CFaI8h+ZHuWdBvkzMsdVZWOmn7wPAptqQRZll3sr5e+h1mA1Zz1oqxQGeSmE5y7lOG JSk/A8/K5rq2e2aq/MWmyPix+pwLfWN4igwAIQxbi0OTVzTbuRmqFIvA4NIkLwVcON9S lAres0pTpERUOWRW9ooJstKWk0UWfUaIJ88/aMJjyx6TVPd11LjxmC6twHwfU56BZYC6 yAoLVBZ6HZIec5v9RkfX6UeKjfqH5dtjMVWv/0nwvcvzU3G9TAajAFO8SeaLOMQjTxs8 eJsIVzpjtqUtpbFDy6Y+6FysfRnzxr9MAn2RH1Z4bzjZNf0E5Ukw65CKzTcLygD3bZT6 LlSg== X-Gm-Message-State: AJcUukcuS6QyU9KMZQXodOPj+4/irX0JyD4Aqu0Xc0RxyRTYsYWmYTsQ lIK/fekX6SIGoHP6HUoya+BbT/EGsZkebw7ZTnIwiQ== X-Google-Smtp-Source: ALg8bN48LqIQMfAf7iSiyvmRfDebkBxk3YU9rA5F5bmbkaRCvFeecY5+mNfw02Kz4lakW76G8HQO5iina5MZbvuR4eY= X-Received: by 2002:a67:1b04:: with SMTP id b4mr5597014vsb.141.1547195583999; Fri, 11 Jan 2019 00:33:03 -0800 (PST) MIME-Version: 1.0 References: <20190109085426.39965-1-yskoh@mellanox.com> <20190110224030.2671-1-yskoh@mellanox.com> In-Reply-To: From: David Marchand Date: Fri, 11 Jan 2019 09:32:52 +0100 Message-ID: To: Yongseok Koh , Thomas Monjalon Cc: Olivier Matz , Shahaf Shuler , dev@dpdk.org, roszenrami@gmail.com Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v4 1/2] mbuf: add function returning default buffer address 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: Fri, 11 Jan 2019 08:33:04 -0000 On Fri, Jan 11, 2019 at 9:11 AM David Marchand wrote: > On Thu, Jan 10, 2019 at 11:40 PM Yongseok Koh wrote: > diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h > >> index bc562dc8a9..5787616999 100644 >> --- a/lib/librte_mbuf/rte_mbuf.h >> +++ b/lib/librte_mbuf/rte_mbuf.h >> @@ -788,8 +788,54 @@ rte_mbuf_from_indirect(struct rte_mbuf *mi) >> } >> >> /** >> + * Return the default buffer address of the mbuf. >> > > Nit: missed it... s/default // > > + * >> + * @warning >> + * @b EXPERIMENTAL: This API may change without prior notice. >> + * This will be used by rte_mbuf_to_baddr() which has redundant code once >> + * experimental tag is removed. >> > > Good point. > I wonder if we have a "todolist" for release n+2 so that we don't forget > about such things to do. > Thomas ? > Maybe we could have something explicit in rte_mbuf_to_baddr that would avoid it "inherits" the experimental tag. @@ -844,9 +844,13 @@ struct rte_mbuf_ext_shared_info { static inline char * rte_mbuf_to_baddr(struct rte_mbuf *md) { +#ifdef ALLOW_EXPERIMENTAL_API + return rte_mbuf_buf_addr(md, md->pool); +#else char *buffer_addr; buffer_addr = (char *)md + sizeof(*md) + rte_pktmbuf_priv_size(md->pool); return buffer_addr; +#endif } /** -- David Marchand