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 293D9A04F9; Fri, 10 Jan 2020 19:24:11 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6309F1EB7E; Fri, 10 Jan 2020 19:24:10 +0100 (CET) Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by dpdk.org (Postfix) with ESMTP id 093D51EB7D for ; Fri, 10 Jan 2020 19:24:08 +0100 (CET) Received: by mail-pg1-f193.google.com with SMTP id k3so1374406pgc.3 for ; Fri, 10 Jan 2020 10:24:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zraOr0f0l+epOw76UJvk+yqXcgE6M8ur2hA2pz0gLb0=; b=bDaRajbK/o8cHndnE15bZlxFkegPCIu9Y61Km7VZFOYwwkIGV0fZoyO150Kipl+hRD u5uWgPSeRBw4mhpaG1wmWeKB2AR2O77/8lSzQpIsOclvTMbLVcDjfneYEyUTr+HHKPge 4EWQ6DVRYN0UsnVq68HWkRySxNsUaSy8U/23v9mtgYfZqywZncYPuJ2H2f7zld2U62IC U3OPGoTCSihBW+lUaob0o04gjxpzuWPKZ2jIsRaQ+hBGVg9qBXorr2+wYg0dEDBRI8gl KVJu6Vb8MjdCV4QqIxzkjqzFY5JAL3OYhG/FbYr3OSLzWqyBTuTyQEKJiH7SdPXsxXdi /4CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zraOr0f0l+epOw76UJvk+yqXcgE6M8ur2hA2pz0gLb0=; b=iKeMtTmZkXlaDTClYjp1fhk4ZFLu6fzCs36rTAK63tbE/B3qOd3c7c4ouj42jqbY0C rfruOyHiaLF3qd1lCsEOS6WWe5lhZqrGipWCCVdTu2KU/5Sj5Je6vSqz6PcZTp/dTcuk tzT3eMxwx4JvJ4cviY+aIIPHiYKqJNrlshNV/wzJe7Cf4iH6F8QBr+SDSd/QGmWk4OA/ weEWeb/P2rEkxFePhYvok2lWT5PBQfD/RO8EyLgHJGX+xftRDPmH3+8OQ88CWUYpvXtO Wj+nR8VHCaZWCBs3HLeayAqsgsSeI1HEg5B8YEnnWMH2O1CWhOhGrxkHX+WOWPMoMpXn 0xEw== X-Gm-Message-State: APjAAAW0ssHaMHImpDRDfYU/Lwe61jXu55ezLUTEOkLeELsuBtx2R1WL lpV8brS+w1zWpKhBsQWC5hs3FA== X-Google-Smtp-Source: APXvYqyDmPZ1ZOMoCJHiGyOwq010CcqV6Q/RAQ/K57naXMdIcItYAINUGMQlrm0Uhc8ry8r6++2JuQ== X-Received: by 2002:a63:d906:: with SMTP id r6mr6019468pgg.440.1578680648065; Fri, 10 Jan 2020 10:24:08 -0800 (PST) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id b19sm3518540pjq.8.2020.01.10.10.24.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2020 10:24:07 -0800 (PST) Date: Fri, 10 Jan 2020 10:23:59 -0800 From: Stephen Hemminger To: Viacheslav Ovsiienko Cc: dev@dpdk.org, matan@mellanox.com, rasland@mellanox.com, orika@mellanox.com, Shahaf Shuler Message-ID: <20200110102359.680cdcdb@hermes.lan> In-Reply-To: <1578679022-25344-2-git-send-email-viacheslavo@mellanox.com> References: <20191118094938.192850-1-shahafs@mellanox.com> <1578679022-25344-1-git-send-email-viacheslavo@mellanox.com> <1578679022-25344-2-git-send-email-viacheslavo@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 1/4] mbuf: detach mbuf with pinned external buffer 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" On Fri, 10 Jan 2020 17:56:59 +0000 Viacheslav Ovsiienko wrote: > + > +static inline uint64_t > +rte_mbuf_has_pinned_extbuf(const struct rte_mbuf *m) > +{ > + if (RTE_MBUF_HAS_EXTBUF(m)) { > + /* > + * The mbuf has the external attached buffer, > + * we should check the type of the memory pool where > + * the mbuf was allocated from. > + */ > + struct rte_pktmbuf_pool_private *priv = > + (struct rte_pktmbuf_pool_private *) > + rte_mempool_get_priv(m->pool); > + > + return priv->flags & RTE_PKTMBUF_POOL_F_PINNED_EXT_BUF; > + } > + return 0; > +} New functions need to be marked experimental. The return value should be boolean not uint64_t Why does this need to be inlined (and thereby create new ABI burden)? Also having it inline makes making pktmbuf_pool_private really private in future.