From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH v3 04/12] linuxapp/vfio: ignore mapping for ioport region Date: Fri, 8 Jan 2016 15:29:27 +0800 Message-ID: <20160108072927.GK26062@yliu-dev.sh.intel.com> References: <1452184390-5994-1-git-send-email-sshukla@mvista.com> <1452184390-5994-5-git-send-email-sshukla@mvista.com> <20160107101649.3a0384d2@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org To: Santosh Shukla Return-path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id CD0419A92 for ; Fri, 8 Jan 2016 08:29:13 +0100 (CET) Content-Disposition: inline In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Jan 08, 2016 at 12:23:15AM +0530, Santosh Shukla wrote: >=20 >=20 > On Thu, Jan 7, 2016 at 11:46 PM, Stephen Hemminger > wrote: > =A0 >=20 > > +=A0 =A0 =A0 =A0 =A0 =A0 =A0ret =3D pread64(vfio_dev_fd, &ioport_= bar, sizeof(ioport_bar), > > +=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0VFIO_GET_= REGION_ADDR > (VFIO_PCI_CONFIG_REGION_INDEX) > > +=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0+ PCI_BAS= E_ADDRESS_0 + i*4); > > + > > +=A0 =A0 =A0 =A0 =A0 =A0 =A0if (ret !=3D sizeof(ioport_bar)) { > > +=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0RTE_LOG(ERR, EAL, > > +=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"Cann= ot read command (%x) from PCI config" > > +=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"spac= e!\n", PCI_BASE_ADDRESS_0 + i*4); >=20 > Please dont split the line of a log message string in mid sentence. > =20 First of all, it'd be good if you can fix your email client to reply emails in a way open source world prefer, such as prefixing last email with leading '> ', and do not auto fold lines. > me to don't like splitting, This was deliberate to keep checkpatch happ= y, If we > are ok with debug message > 80 line warning I guess =A0it will improve = code > readability. You may try to shorten your message to "Cannot read cmd %x from config space!" :) >=20 >=20 > > +=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return -1; > > +=A0 =A0 =A0 =A0 =A0 =A0 =A0} > > + > > +=A0 =A0 =A0 =A0 =A0 =A0 =A0if (ioport_bar & PCI_BASE_ADDRESS_SPA= CE_IO) { > > +=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0RTE_LOG(INFO, EAL, "\= tIgnore mapping since Its a i/ > o" > > +=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 "port bar (%d) addr : %x\n", i, > same here >=20 >=20 > Agreed. Ditto, maybe following is better "Ignore mapping IO port bar %d, addr: %x\n". --yliu