From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 769E6A0528; Mon, 20 Jan 2020 20:16:38 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 980231C032; Mon, 20 Jan 2020 20:16:37 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 956191C032 for ; Mon, 20 Jan 2020 20:16:35 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from viacheslavo@mellanox.com) with ESMTPS (AES256-SHA encrypted); 20 Jan 2020 21:16:34 +0200 Received: from pegasus11.mtr.labs.mlnx (pegasus11.mtr.labs.mlnx [10.210.16.104]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 00KJGYGN018994; Mon, 20 Jan 2020 21:16:34 +0200 Received: from pegasus11.mtr.labs.mlnx (localhost [127.0.0.1]) by pegasus11.mtr.labs.mlnx (8.14.7/8.14.7) with ESMTP id 00KJGYGW007918; Mon, 20 Jan 2020 19:16:34 GMT Received: (from viacheslavo@localhost) by pegasus11.mtr.labs.mlnx (8.14.7/8.14.7/Submit) id 00KJGXlq007917; Mon, 20 Jan 2020 19:16:33 GMT X-Authentication-Warning: pegasus11.mtr.labs.mlnx: viacheslavo set sender to viacheslavo@mellanox.com using -f From: Viacheslav Ovsiienko To: dev@dpdk.org Cc: matan@mellanox.com, rasland@mellanox.com, orika@mellanox.com, shahafs@mellanox.com, olivier.matz@6wind.com, stephen@networkplumber.org, thomas@mellanox.net Date: Mon, 20 Jan 2020 19:16:22 +0000 Message-Id: <1579547786-7650-2-git-send-email-viacheslavo@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1579547786-7650-1-git-send-email-viacheslavo@mellanox.com> References: <20191118094938.192850-1-shahafs@mellanox.com> <1579547786-7650-1-git-send-email-viacheslavo@mellanox.com> Subject: [dpdk-dev] [PATCH v6 1/5] mbuf: introduce routine to get private mbuf pool flags 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The routine rte_pktmbuf_priv_flags is introduced to fetch the flags from the mbuf memory pool private structure in unified fashion. Signed-off-by: Viacheslav Ovsiienko Acked-by: Olivier Matz --- lib/librte_mbuf/rte_mbuf.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index 2d4bda2..9b0691d 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -306,6 +306,23 @@ struct rte_pktmbuf_pool_private { uint32_t flags; /**< reserved for future use. */ }; +/** + * Return the flags from private data in an mempool structure. + * + * @param mp + * A pointer to the mempool structure. + * @return + * The flags from the private data structure. + */ +static inline uint32_t +rte_pktmbuf_priv_flags(struct rte_mempool *mp) +{ + struct rte_pktmbuf_pool_private *mbp_priv; + + mbp_priv = (struct rte_pktmbuf_pool_private *)rte_mempool_get_priv(mp); + return mbp_priv->flags; +} + #ifdef RTE_LIBRTE_MBUF_DEBUG /** check mbuf type in debug mode */ -- 1.8.3.1