From patchwork Tue Nov 25 10:46:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sujith Sankar X-Patchwork-Id: 1543 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 3B07258D9; Tue, 25 Nov 2014 11:35:29 +0100 (CET) Received: from rcdn-iport-2.cisco.com (rcdn-iport-2.cisco.com [173.37.86.73]) by dpdk.org (Postfix) with ESMTP id 700C63975 for ; Tue, 25 Nov 2014 11:35:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1601; q=dns/txt; s=iport; t=1416912379; x=1418121979; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=7u9Ya42fSWxiCU7aCNsyKCn/jXoLEhA4WErVU25O8sg=; b=BkD8tUnFt4922D3g8tax6vJky69m9Fizn6yTH9E54BZvqIDUAs2077rr IjwP9PPwW3IKwS35Ies6z+P4J8sDwwOA6OzQiGElQSODxSfDYjW5Gppf2 ia0Vfq0JmbBwZ+cflec76tuxEuHN9u332aYr1fcO4AnL684U91irRsG8V A=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ah4FAD1ddFStJV2R/2dsb2JhbABbgwaBKQTPcAKBExYBAQEBAX2EAgEBAQQnEz8QAgEIEQMBAh8QMh0IAgQOBYhA0QoBAQEBAQEBAQEBAQEBAQEBAQEBAQEXkHoHhE0BBJA3giyMF5cYg3x3gUiBAgEBAQ X-IronPort-AV: E=Sophos;i="5.07,455,1413244800"; d="scan'208";a="375426291" Received: from rcdn-core-9.cisco.com ([173.37.93.145]) by rcdn-iport-2.cisco.com with ESMTP; 25 Nov 2014 10:46:18 +0000 Received: from xhc-rcd-x13.cisco.com (xhc-rcd-x13.cisco.com [173.37.183.87]) by rcdn-core-9.cisco.com (8.14.5/8.14.5) with ESMTP id sAPAkIWe031541 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 25 Nov 2014 10:46:18 GMT Received: from xmb-aln-x07.cisco.com ([169.254.2.173]) by xhc-rcd-x13.cisco.com ([173.37.183.87]) with mapi id 14.03.0195.001; Tue, 25 Nov 2014 04:46:17 -0600 From: "Sujith Sankar (ssujith)" To: David Marchand Thread-Topic: [dpdk-dev] [PATCH v4 6/6] DPDK changes for accommodating ENIC PMD Thread-Index: AQHQCH3UVeqqNldGa0GuGqbrx7+8RJxxgVMAgABojwA= Date: Tue, 25 Nov 2014 10:46:17 +0000 Message-ID: References: <1416933018-23415-1-git-send-email-ssujith@cisco.com> <1416933018-23415-7-git-send-email-ssujith@cisco.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.3.9.131030 x-originating-ip: [10.127.149.201] Content-ID: <064A4C398FFC8C4AB54BB66E314E7AC4@emea.cisco.com> MIME-Version: 1.0 Cc: "dev@dpdk.org" , "Prasad Rao \(prrao\)" Subject: Re: [dpdk-dev] [PATCH v4 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" David, I tested it now, and it looks like the length is proper in dev->men_resource[0].len without this change. Not sure what changed in my workspace as I clearly remember seeing it wrong and hence added the extra statement in the lib. I shall remove it in v5. Thanks for pointing it out, David. Regards, -Sujith From: David Marchand Date: Tuesday, 25 November 2014 3:32 pm To: "Sujith Sankar (ssujith)" Cc: "dev@dpdk.org" , "Prasad Rao (prrao)" Subject: Re: [dpdk-dev] [PATCH v4 6/6] DPDK changes for accommodating ENIC PMD Hello Sujith, On Tue, Nov 25, 2014 at 5:30 PM, Sujith Sankar wrote: I still think this part is wrong. The length should have been populated by pci_parse_sysfs_resource(). Are you sure this length is 0 ? Can you do give me the result of cat /sys/bus/pci/devices/$your_device_pci_address/resource ? Thanks. diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c index c776ddc..87e7862 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 */