From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by dpdk.org (Postfix) with ESMTP id 8C247C134 for ; Thu, 7 Jan 2016 19:53:16 +0100 (CET) Received: by mail-pa0-f54.google.com with SMTP id ho8so4363694pac.2 for ; Thu, 07 Jan 2016 10:53:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=LCOHgP9jOlJNOOPsrlErFMhOAPFzZGTBeSrYU1EannM=; b=YmSQnF2WpgnRGxkF+H1gC+AZkqnBwhKRv9KjFcj6KCPuJHS7XZy5z3f+8efDAbJy9F Qd14xGs+09012YPiDyZymau0RFVGY6EJjxR1cNPN/b3l/ahUYwa/MEyLryfuliavcA3z JsPjwOKiPf01GA7zXY8c2vZfD4ac7n8b2mR76lWXNo3qJ1eU2RzS8jwM5z0ibK5KlDZB J6WwopQqpLFdO0r1YRL5K6Lnnha4LVk4OpQdyzm4LBggX/mQKTL43voH9CMeCG7INwoa VbcODLmnaqjROVa/r21leLVI9TvDDgbEUZyrmkeI+MlhtdB+zFbrWJkoj1uNc0eTDJkZ YEcQ== 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=LCOHgP9jOlJNOOPsrlErFMhOAPFzZGTBeSrYU1EannM=; b=ZlGFqpoMTiFG+1T+pdFIPn7cu2eguiQx9jIwYFpVKaqPh+LqzltShYGileaTL95Jg7 kvBvHG1SxjXefa+h57qZc/u2/fnLjTie++qPHUp8LimfvPu4JyN+VfRm4zzxVf4NEnIo bBc9eNCUU8+gPXo7+gfLGa6m5RwhdU+j8dsk08/MvQVhd+WJ7Xz7jBaBrWzZmRlLboZN lMTVSrbBMiZ2sZLrRvcsqz7HpVSPJ7xwlzc4lRPcvoAvXXJnY/NYCFCop33LYB5tvpeN xH+NLDOHykQK21UDUeXgN1rU93JVxJJRRtzSy9UuWQCATY2Xe5El6MHvw9EpV+oWBtA9 oZMA== X-Gm-Message-State: ALoCoQmnq9dVAV67mB8MJWgKjPz1HHI0lSEx8l1HNhmyRyztfQzpRO2x20tC3WZihEKupP7ualixmCm3KNwGyJyMd+bbsl2kfK5nc37k8WyKaO6z+y6MVFo= MIME-Version: 1.0 X-Received: by 10.66.182.202 with SMTP id eg10mr153397106pac.50.1452192795439; Thu, 07 Jan 2016 10:53:15 -0800 (PST) Received: by 10.66.196.81 with HTTP; Thu, 7 Jan 2016 10:53:15 -0800 (PST) In-Reply-To: <20160107101649.3a0384d2@xeon-e3> References: <1452184390-5994-1-git-send-email-sshukla@mvista.com> <1452184390-5994-5-git-send-email-sshukla@mvista.com> <20160107101649.3a0384d2@xeon-e3> Date: Fri, 8 Jan 2016 00:23:15 +0530 Message-ID: From: Santosh Shukla To: Stephen Hemminger Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v3 04/12] linuxapp/vfio: ignore mapping for ioport region 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: Thu, 07 Jan 2016 18:53:17 -0000 On Thu, Jan 7, 2016 at 11:46 PM, Stephen Hemminger < stephen@networkplumber.org> wrote: > This looks like the right thing to do. Minor nits. > > > diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c > b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c > > index 74f91ba..4077eb6 100644 > > --- a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c > > +++ b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c > > @@ -760,6 +760,26 @@ pci_vfio_map_resource(struct rte_pci_device *dev) > > return -1; > > } > > > > + /* chk for io port region */ > > + uint32_t ioport_bar; > > In general DPDK has followed the kernel practice of putting declarations > at the start of function/basic block. It is ok by me, but just noting that > the rest of the code doesn't do it. > > My bad, Thanks! > > + ret = pread64(vfio_dev_fd, &ioport_bar, sizeof(ioport_bar), > > + > VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) > > + + PCI_BASE_ADDRESS_0 + i*4); > > + > > + if (ret != sizeof(ioport_bar)) { > > + RTE_LOG(ERR, EAL, > > + "Cannot read command (%x) from PCI config" > > + "space!\n", PCI_BASE_ADDRESS_0 + i*4); > > Please dont split the line of a log message string in mid sentence. > > me to don't like splitting, This was deliberate to keep checkpatch happy, If we are ok with debug message > 80 line warning I guess it will improve code readability. > + return -1; > > + } > > + > > + if (ioport_bar & PCI_BASE_ADDRESS_SPACE_IO) { > > + RTE_LOG(INFO, EAL, "\tIgnore mapping since Its a > i/o" > > + "port bar (%d) addr : %x\n", i, > same here > > Agreed. > > + ioport_bar); > > + continue; > > + } > > + >