From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f54.google.com (mail-oi0-f54.google.com [209.85.218.54]) by dpdk.org (Postfix) with ESMTP id DFE2D80BA for ; Mon, 24 Nov 2014 17:04:34 +0100 (CET) Received: by mail-oi0-f54.google.com with SMTP id u20so6732769oif.41 for ; Mon, 24 Nov 2014 08:15:22 -0800 (PST) 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:date :message-id:subject:from:to:cc:content-type; bh=QdI1WpQZ7UxaZW9XUaqarqMAwjXwFYmn/FYRmxrrkkY=; b=juygpm4DcjiHykRi9XOCPwxNL+pxJ1WFciDQLHAH3cj3mCjMQygZqhGKKmEwk2j7dt 330mNRT0tBc4DjyEDiQUXV+QNZgcSi0IdBKE4gm2X6bhr3X+nmx3oLToHKetJGLde0XE 1mYXQC4kO/d/cB3oBYrwQ1Sid/KC2vEB35U3CuBA5eKChCSTQA+HJFUchQbgWP9cfTsk KUi5vG4Ka8Kf5jT9aUSfNywkKb1BS0Z1go5Ny08CpOvComjKqebalcTmAz+fdPeKQSzU ZeEl+fEBT0zACaKJ4DHt8+CMApdSniIfrwSY3VStglA4gqGGB5b9mBneh6n3gkfjnUd9 itog== X-Gm-Message-State: ALoCoQnP7q+5lO2C14a2iuhbuHYIEgvMPtU6DEkNFmYCezH3jwPhqdPvD29BudKaqSFt99RXf02K MIME-Version: 1.0 X-Received: by 10.182.120.10 with SMTP id ky10mr11929792obb.68.1416845722814; Mon, 24 Nov 2014 08:15:22 -0800 (PST) Received: by 10.202.60.197 with HTTP; Mon, 24 Nov 2014 08:15:22 -0800 (PST) In-Reply-To: References: <1416758899-1351-1-git-send-email-ssujith@cisco.com> <1416758899-1351-7-git-send-email-ssujith@cisco.com> Date: Mon, 24 Nov 2014 17:15:22 +0100 Message-ID: From: David Marchand To: "Sujith Sankar (ssujith)" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" , "Prasad Rao \(prrao\)" Subject: Re: [dpdk-dev] [PATCH v3 6/6] DPDK changes for accommodating ENIC PMD 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, 24 Nov 2014 16:04:35 -0000 Mmm, I am not that familiar with vfio code, but I would say that there is something buggy in pci_vfio_map_resource() when compared to pci_uio_map_resource(). Is not there a problem with finding the right index of dev->mem_resource[] array ? -- David Marchand On Mon, Nov 24, 2014 at 4:51 PM, Sujith Sankar (ssujith) wrote: > Hi David, > > During the testing, I saw that the length field was 0. ENIC PMD > validates the length of the BAR against a max value. > In order to get the length in the resource structure, I added this > statement. > > Thanks, > -Sujith > > From: David Marchand > Date: Monday, 24 November 2014 4:33 pm > To: "Sujith Sankar (ssujith)" > Cc: "dev@dpdk.org" , "Prasad Rao (prrao)" > Subject: Re: [dpdk-dev] [PATCH v3 6/6] DPDK changes for accommodating > ENIC PMD > > Hello Sujith, > > On Sun, Nov 23, 2014 at 5:08 PM, Sujith Sankar wrote: > >> diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c >> b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c >> index c776ddc..6bf8f2e 100644 >> --- a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c >> +++ b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c >> @@ -736,6 +736,7 @@ pci_vfio_map_resource(struct rte_pci_device *dev) >> maps[i].offset = reg.offset; >> maps[i].size = reg.size; >> dev->mem_resource[i].addr = bar_addr; >> + dev->mem_resource[i].len = reg.size; >> } >> >> /* if secondary process, do not set up interrupts */ >> > > Not sure I understand why you need to overwrite the length value. > This is supposed to be initialised before by "generic" code. > This looks like a hack or a workaround. > > Can you elaborate on this change ? > Thanks. > > > -- > David Marchand > >