From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 5598458D8 for ; Fri, 16 Sep 2016 10:29:35 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 16 Sep 2016 01:29:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,343,1470726000"; d="scan'208";a="761852079" Received: from dhunt5-mobl.ger.corp.intel.com (HELO [10.237.220.48]) ([10.237.220.48]) by FMSMGA003.fm.intel.com with ESMTP; 16 Sep 2016 01:29:34 -0700 To: Hemant Agrawal , olivier.matz@6wind.com References: <1473346213-6038-1-git-send-email-hemant.agrawal@nxp.com> <1473959607-1951-1-git-send-email-hemant.agrawal@nxp.com> <1473959607-1951-2-git-send-email-hemant.agrawal@nxp.com> Cc: dev@dpdk.org, jerin.jacob@caviumnetworks.com From: "Hunt, David" Message-ID: Date: Fri, 16 Sep 2016 09:29:32 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <1473959607-1951-2-git-send-email-hemant.agrawal@nxp.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 2/2] mempool:pktmbuf pool default fallback for mempool ops error 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, 16 Sep 2016 08:29:35 -0000 Hi Hemant, On 15/9/2016 6:13 PM, Hemant Agrawal wrote: > In the rte_pktmbuf_pool_create, if the default external mempool is > not available, the implementation can default to "ring_mp_mc", which > is an software implementation. > > Signed-off-by: Hemant Agrawal > --- > lib/librte_mbuf/rte_mbuf.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c > index 4846b89..4adb4f5 100644 > --- a/lib/librte_mbuf/rte_mbuf.c > +++ b/lib/librte_mbuf/rte_mbuf.c > @@ -176,6 +176,11 @@ rte_pktmbuf_pool_create(const char *name, unsigned n, > > rte_errno = rte_mempool_set_ops_byname(mp, > RTE_MBUF_DEFAULT_MEMPOOL_OPS, NULL); > + > + /* on error, try falling back to the software based default pool */ > + if (rte_errno == -EOPNOTSUPP) > + rte_errno = rte_mempool_set_ops_byname(mp, "ring_mp_mc", NULL); Should we log a warning message here saying that we're falling back to the mp/mc handler? > + > if (rte_errno != 0) { > RTE_LOG(ERR, MBUF, "error setting mempool handler\n"); > return NULL;