From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by dpdk.org (Postfix) with ESMTP id 8ADFEC166 for ; Thu, 28 Jan 2016 03:48:03 +0100 (CET) Received: by mail-pa0-f47.google.com with SMTP id ho8so14878920pac.2 for ; Wed, 27 Jan 2016 18:48:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=igel-co-jp.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=Etky/5te2Ey+LmxGiBDp7YsXC5BnD5zjZq/edHT03D0=; b=ZF5+A/pJRRoTDVpZ2MH4jiLl8V86xHmB20zT43CS8mJXoG3KXDem9J9tQ7lvRVH8Qp /CzdizxqniZ9yT0dpWSJVvb6MoMgSWp85jDRlDN5C6q1PyzHqEgmah0YhPp5V+vF8v/P CrubE577olCpCNMj3E5+tjAPkEDWZYlLEMM8HEkEZZJIv4L8cMavemNXY/rbwJhRXIXj /M5yIKp/MO/tem0TxZjrIZjNhQP4I6tcmmDXILF7+KMTj/Q79QjOT4ECJVBl4j04W87i 3/3ODe+/1V/lxOSfG0xIN1Wx6z8sC+wE4GpqBjsqVEGcNRToUSXks4SMdRXXoc59wikb 5+wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=Etky/5te2Ey+LmxGiBDp7YsXC5BnD5zjZq/edHT03D0=; b=ZPQBl1os8xdCjNcnptRkqOWayi1FYY6uEBnlGpZ6ckntlRHOZq8XguvHcdr71lUCRx axl4VGdRtxVV5njjCUQcNRyW2tM/6/tc9nUAz8T3BRYwpbuWuQF+F0wJP7eYk0CfhXk8 qaJuGm3S2gJHIQvGkGVzI4n8mAyXWB91D0LGNd6diUvvjHSJNhlPOAoRaijwEpasOPV/ jv7suDxb2geFO0Jy9NJaVgHE/Uo/yjjypofrNMwrxJGYz9GsCNy7iT+KP1ryrkkcdvb7 ddS6wa8l5FlWmTvZKaGD1UbMf5FOMv4Rj0uihfZU7dKO7T4pg9gCa/F9RFP4zHtGfpAT 6Y5w== X-Gm-Message-State: AG10YOQ7afoEEPpdc7p3z+m3BDdS+soHDc+H1IgXPGPClACbcXWSAHJKxQE0IlSsNfdoPQ== X-Received: by 10.67.7.200 with SMTP id de8mr1043869pad.28.1453949282988; Wed, 27 Jan 2016 18:48:02 -0800 (PST) Received: from [10.16.129.101] (napt.igel.co.jp. [219.106.231.132]) by smtp.googlemail.com with ESMTPSA id t67sm11988790pfa.14.2016.01.27.18.48.01 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 27 Jan 2016 18:48:02 -0800 (PST) To: "Xie, Huawei" , "dev@dpdk.org" , "yuanhan.liu@linux.intel.com" , "Tan, Jianfeng" References: <1453108389-21006-2-git-send-email-mukawa@igel.co.jp> <1453374478-30996-6-git-send-email-mukawa@igel.co.jp> From: Tetsuya Mukawa X-Enigmail-Draft-Status: N1110 Message-ID: <56A9815F.6040205@igel.co.jp> Date: Thu, 28 Jan 2016 11:47:59 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [RFC PATCH 5/5] virtio: Extend virtio-net PMD to support container environment 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, 28 Jan 2016 02:48:04 -0000 On 2016/01/28 1:45, Xie, Huawei wrote: > On 1/21/2016 7:09 PM, Tetsuya Mukawa wrote: >> +qtest_find_pci_device(struct qtest_session *s, uint16_t bus, uint8_t device) >> +{ >> + struct qtest_pci_device *dev; >> + uint32_t val; >> + >> + val = qtest_pci_inl(s, bus, device, 0, 0); >> + TAILQ_FOREACH(dev, &s->head, next) { >> + if (val == ((uint32_t)dev->device_id << 16 | dev->vendor_id)) { >> + dev->bus_addr = bus; >> + dev->device_addr = device; >> + return; >> + } >> + >> + } >> +} >> + >> +static int >> +qtest_init_pci_devices(struct qtest_session *s) >> +{ >> + struct qtest_pci_device *dev; >> + uint16_t bus; >> + uint8_t device; >> + int ret; >> + >> + /* Find devices */ >> + bus = 0; >> + do { >> + device = 0; >> + do { >> + qtest_find_pci_device(s, bus, device); >> + } while (device++ != NB_DEVICE - 1); >> + } while (bus++ != NB_BUS - 1); > Seems this scan of all the pci devices is very time consuming operation, > and each scan involves socket communication. > Do you measure how long it takes to do the pci devices initialization? I measured it, and seems it takes 0.35 seconds in my environment. This will be done only once when the port is initialized. Probably it's not so heady. Tetsuya