From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qg0-f49.google.com (mail-qg0-f49.google.com [209.85.192.49]) by dpdk.org (Postfix) with ESMTP id 69F8E2BDD for ; Mon, 13 Jun 2016 11:10:41 +0200 (CEST) Received: by mail-qg0-f49.google.com with SMTP id v48so46358194qgd.2 for ; Mon, 13 Jun 2016 02:10:41 -0700 (PDT) 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 :cc; bh=RFb9Abi/0xepuY2Z6rFLGPUHb+FfCjE5AC7InU4j8ro=; b=0t9fylu6UQ9AT0ruociSSjpgkA/ewv0b616Us1IJcB/PqvJuEE0XdYi1qNSgg27kjA bTmT686Wgo10wvmRXPF/ypYnqjYCsjSq7XTF1Vy+zITlz9qE3wFGSNc95H7P6o1mNKw9 51o/q7ovh35yqfzytKxiS6VotksbVIOXqO1qNjIvF8eYti3zPPXvDFeMigCZJnAisN90 23bYhgFdjUMjsi2BQyMhJslIs3771XBWUEWCbxEwnrry+V5MNwuMns0mrR5mserqSYr6 GiZKPk3QaKrRk4Ro4hRtxyCuaRnoQuBy2sfn2GixVrgvhpXNYxuzwurmS9Kb221SYT8h yq4A== 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:cc; bh=RFb9Abi/0xepuY2Z6rFLGPUHb+FfCjE5AC7InU4j8ro=; b=awwQweqzNxDRv9lO6APmaBI9LZcSyCM+m8tFFKW6LApdsBe8SNMwoeASqKBO1apZOP IuNU3PVjRbtjx2biK+oxU4VVgNhnWUsZfJ+sX8JLuahE4j1kYZcrCwhy4ROxE3GYRvr0 tq6KscDCa8YtSSqQ2c7aGFsoDSnBfT8DhIme76MmQRd+foTYeUwAr390sdEffhnlDkIa ADDq6hGTa5tY8dE3nP35PduoIUSjEP48Ruwoxhw/aYaks0OukeFmZ798OMuTGIVIBenZ kuI+5CcBUpO4cJYsLo/xNphzu70AMMLPxVYOICrx2kOc/PHHO3RcUbk3GSQSrE2zd+9o CmHA== X-Gm-Message-State: ALyK8tKzC24JzkURU6J54OHU/YZevm3TAsTGW5CiwOOJwL+AbBBllMLImqxBynmhQwG9H/FvsBr3fNfAoSQ6IgM7 X-Received: by 10.140.40.239 with SMTP id x102mr12158094qgx.93.1465809040833; Mon, 13 Jun 2016 02:10:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.55.162.9 with HTTP; Mon, 13 Jun 2016 02:10:21 -0700 (PDT) In-Reply-To: References: <575E6B60.3030403@6wind.com> <1465806137-32619-1-git-send-email-olivier.matz@6wind.com> From: Christian Ehrhardt Date: Mon, 13 Jun 2016 11:10:21 +0200 Message-ID: To: Olivier Matz Cc: David Marchand , dev Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] xenvirt: fix compilation after mempool changes 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: Mon, 13 Jun 2016 09:10:41 -0000 Hmm, Hi again Oliver. I was too fast saying yes. I don't know what is different now but I clearly tested it wrong the first time. Now I get: CC rte_xen_lib.o /mnt/nvme/dpdk-16-07-pre-linking/drivers/net/xenvirt/rte_xen_lib.c: In function =E2=80=98grant_gntalloc_mbuf_pool=E2=80=99: /mnt/nvme/dpdk-16-07-pre-linking/drivers/net/xenvirt/rte_xen_lib.c:441:6: error: =E2=80=98mp=E2=80=99 undeclared (first use in this function) if (mp->nb_mem_chunks !=3D 1) { ^ /mnt/nvme/dpdk-16-07-pre-linking/drivers/net/xenvirt/rte_xen_lib.c:441:6: n= ote: each undeclared identifier is reported only once for each function it appears in /mnt/nvme/dpdk-16-07-pre-linking/drivers/net/xenvirt/rte_xen_lib.c:422:46: error: unused parameter =E2=80=98mpool=E2=80=99 [-Werror=3Dunused-parameter] grant_gntalloc_mbuf_pool(struct rte_mempool *mpool, uint32_t pg_num, uint32_t *gref_arr, phys_addr_t *pa_arr, int mempool_idx) ^ cc1: all warnings being treated as errors Not too hard, changing the mp to mpool on the two places the patch has inserted it gets it working. Christian Ehrhardt Software Engineer, Ubuntu Server Canonical Ltd On Mon, Jun 13, 2016 at 10:51 AM, Christian Ehrhardt < christian.ehrhardt@canonical.com> wrote: > Hi Oliver, > thanks for the fast response! > > It fixes the compilation issue and I totally agree to your argument of th= e > multi-chunk issues being out of scope for this as they never worked. > Unfortunately I lack an environment to actually test this in real-life if > we need any more follow up than this. > > Acked-by: Christian Ehrhardt > > > > Christian Ehrhardt > Software Engineer, Ubuntu Server > Canonical Ltd > > On Mon, Jun 13, 2016 at 10:22 AM, Olivier Matz > wrote: > >> The field elt_va_start has been removed from the mempool structure, >> and it was not replaced in xenvirt. >> >> Fix this by getting the mempool objects address by using the address of >> the first memory chunk list. >> >> Note that it won't work with mempool composed of several chunks, >> but it was already the case before. >> >> Fixes: 84121f197187 ("mempool: store memory chunks in a list") >> Reported-by: Christian Ehrhard >> Signed-off-by: Olivier Matz >> --- >> drivers/net/xenvirt/rte_xen_lib.c | 10 +++++++++- >> 1 file changed, 9 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/net/xenvirt/rte_xen_lib.c >> b/drivers/net/xenvirt/rte_xen_lib.c >> index de63cd3..997e56e 100644 >> --- a/drivers/net/xenvirt/rte_xen_lib.c >> +++ b/drivers/net/xenvirt/rte_xen_lib.c >> @@ -423,6 +423,7 @@ grant_gntalloc_mbuf_pool(struct rte_mempool *mpool, >> uint32_t pg_num, uint32_t *g >> { >> char key_str[PATH_MAX] =3D {0}; >> char val_str[PATH_MAX] =3D {0}; >> + void *mempool_obj_va; >> >> if (grant_node_create(pg_num, gref_arr, pa_arr, val_str, >> sizeof(val_str))) { >> return -1; >> @@ -437,7 +438,14 @@ grant_gntalloc_mbuf_pool(struct rte_mempool *mpool, >> uint32_t pg_num, uint32_t *g >> if (snprintf(key_str, sizeof(key_str), >> DPDK_XENSTORE_PATH"%d"MEMPOOL_VA_XENSTORE_STR, >> mempool_idx) =3D=3D -1) >> return -1; >> - if (snprintf(val_str, sizeof(val_str), "%"PRIxPTR, >> (uintptr_t)mpool->elt_va_start) =3D=3D -1) >> + if (mp->nb_mem_chunks !=3D 1) { >> + RTE_LOG(ERR, PMD, >> + "mempool with more than 1 chunk is not >> supported\n"); >> + return -1; >> + } >> + mempool_obj_va =3D STAILQ_FIRST(&mp->mem_list)->addr; >> + if (snprintf(val_str, sizeof(val_str), "%"PRIxPTR, >> + (uintptr_t)mempool_obj_va) =3D=3D -1) >> return -1; >> if (xenstore_write(key_str, val_str) =3D=3D -1) >> return -1; >> -- >> 2.8.0.rc3 >> >> >