From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f171.google.com (mail-qk0-f171.google.com [209.85.220.171]) by dpdk.org (Postfix) with ESMTP id AF34B2BEF for ; Fri, 11 Mar 2016 08:10:12 +0100 (CET) Received: by mail-qk0-f171.google.com with SMTP id o6so44606134qkc.2 for ; Thu, 10 Mar 2016 23:10:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=H+4f/exU2Rqdfuv9bejNTbPRJhZxuTd5TxN3TSmH3fQ=; b=MOGMKyOs0vh1MgOFaYCP6B3QI1Z/ZGonMMYpfv8qad7aq11guJldPL6S11pBKNjdti C7R7DHLDY4D+rCNryIjcTP/cnMKpHoWsZNawVOkvR3VetDM9LC+JJSlhEviFOiDxG10o HcIyY5Uw1ZYFkadlEFNKDGCjPtqVXRgqBLm5fAFNE6UIcVtYy4uJpbyvA7IU2ZbqXP+T yu3i2I2QhG6d7obtSUzrYgXpWJm5jmSr5ijztkIOzqiz0njXZ5hmG4jmqVG9WJMypr/D FjeE6d42YjPA1tTUUXG/+T48pO3XMvW6Mb6NUtiJlO0rx4GKb7uWQgtvtAEW3vFPTLAn I/xQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=H+4f/exU2Rqdfuv9bejNTbPRJhZxuTd5TxN3TSmH3fQ=; b=PMbSGvCh0aughxBcgy5w5FTcUIbY4aT+yYqWFldR6wrulqPF/kt/f6iIOe+DUGqdGM k2r7zb875oy+CIBdlG8LybE9RR5qa8/ZRc/KgifCo8F7T7AiBPtQVN1pc6LtmNn0aAmj coaKsImK8BER5kvG34XhSISQ8yrWAPGWgF5nptA5PvpaDp2gpX9ORMJZEOC+77iwiyc0 BpXZJlbBPEojmoDCloAEpt0mdZGThzqYTJkT+45Z5skm1oU67KiT/YQNuru7QcZQbkr7 Gcoo/E0UUtil6uqypO/wMHNSxJkqdxXTY5Tj9tYuFmgIjCH6yITEi83dyMx+NVRhGsxK wniQ== X-Gm-Message-State: AD7BkJJflsobvuSLQfAZeP4MlLBdGe+ztBAdIHM1AyoCWbbdyv2oqDE2mF9M/7LF0SITyAsN+989YNjkZ3WMh+Kd X-Received: by 10.55.80.68 with SMTP id e65mr9726424qkb.46.1457680212154; Thu, 10 Mar 2016 23:10:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.55.207.20 with HTTP; Thu, 10 Mar 2016 23:09:52 -0800 (PST) In-Reply-To: <1457075523-6869-1-git-send-email-christian.ehrhardt@canonical.com> References: <1457075523-6869-1-git-send-email-christian.ehrhardt@canonical.com> From: Christian Ehrhardt Date: Fri, 11 Mar 2016 08:09:52 +0100 Message-ID: To: Christian Ehrhardt , dev , Pablo de Lara Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] avoid testpmd only working in XEN 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, 11 Mar 2016 07:10:13 -0000 Hi, I realized I should be adding Pablo as the testpmd maintainer for acceptance / feedback. Christian Ehrhardt Software Engineer, Ubuntu Server Canonical Ltd On Fri, Mar 4, 2016 at 8:12 AM, Christian Ehrhardt < christian.ehrhardt@canonical.com> wrote: > With LIBRTE_PMD_XENVIRT enabled testpmd is built in a way to ONLY work > in XEN environments. > It will surface as: > PMD: gntalloc: ioctl error > EAL: Error - exiting with code: 1 > Cause: Creation of mbuf pool for socket 0 failed > > With LIBRTE_PMD_XENVIRT enabled this now tries the xen style grant > table allocation, but falls back gracefully for the normal allocation. > > The only thing left in the log will be the > PMD: gntalloc: ioctl error > --- > app/test-pmd/testpmd.c | 33 ++++++++++++++++----------------- > 1 file changed, 16 insertions(+), 17 deletions(-) > > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c > index 1319917..b008df3 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -410,7 +410,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned > nb_mbuf, > unsigned int socket_id) > { > char pool_name[RTE_MEMPOOL_NAMESIZE]; > - struct rte_mempool *rte_mp; > + struct rte_mempool *rte_mp = NULL; > uint32_t mb_size; > > mb_size = sizeof(struct rte_mbuf) + mbuf_seg_size; > @@ -423,24 +423,23 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned > nb_mbuf, > rte_pktmbuf_pool_init, NULL, > rte_pktmbuf_init, NULL, > socket_id, 0); > - > - > - > -#else > - if (mp_anon != 0) > - rte_mp = mempool_anon_create(pool_name, nb_mbuf, mb_size, > - (unsigned) mb_mempool_cache, > - sizeof(struct > rte_pktmbuf_pool_private), > - rte_pktmbuf_pool_init, NULL, > - rte_pktmbuf_init, NULL, > - socket_id, 0); > - else > - /* wrapper to rte_mempool_create() */ > - rte_mp = rte_pktmbuf_pool_create(pool_name, nb_mbuf, > - mb_mempool_cache, 0, mbuf_seg_size, socket_id); > - > #endif > > + /* if the former XEN allocation failed fall back to normal > allocation */ > + if (rte_mp == NULL) { > + if (mp_anon != 0) > + rte_mp = mempool_anon_create(pool_name, nb_mbuf, > + mb_size, (unsigned) > mb_mempool_cache, > + sizeof(struct > rte_pktmbuf_pool_private), > + rte_pktmbuf_pool_init, NULL, > + rte_pktmbuf_init, NULL, > + socket_id, 0); > + else > + /* wrapper to rte_mempool_create() */ > + rte_mp = rte_pktmbuf_pool_create(pool_name, > nb_mbuf, > + mb_mempool_cache, 0, mbuf_seg_size, > socket_id); > + } > + > if (rte_mp == NULL) { > rte_exit(EXIT_FAILURE, "Creation of mbuf pool for socket > %u " > "failed\n", socket_id); > -- > 2.7.0 > >