From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8CBA5A04FC; Fri, 27 Dec 2019 02:00:15 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 981561BFD3; Fri, 27 Dec 2019 02:00:14 +0100 (CET) Received: from mail-yb1-f178.google.com (mail-yb1-f178.google.com [209.85.219.178]) by dpdk.org (Postfix) with ESMTP id 21C5D1BFB7 for ; Fri, 27 Dec 2019 02:00:13 +0100 (CET) Received: by mail-yb1-f178.google.com with SMTP id a2so10762297ybr.7 for ; Thu, 26 Dec 2019 17:00:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=MLn+Tg3hk5mSkSZZCRZSwAsGzzRG1KMJWiuIg+zXigM=; b=EHgWbiEsO9IYfi/NvFB/kgc649qOmw7rbpAxWkw4n7tzAP9ZzCDpQlIwDoc0a0wvVc c83MynkCVqhUP+/7PBNpoKhKr5yqVV8t9ahdnN59tdVf8ppAgi0tXkd1HUuO0i20vOpa P63f2n0J8bOr24NUlubW/OaOJU2wuZijSlV00GhQ+Tqo8Y2DMDyeYhKITh5WLpkSDely rULHbJOJEWBvGj1fB0CsnRUXwuJd2kOGT7n7WXSKlR6ppTPCNhReE1O9H/NdHr3IWSGx UUcy+buxfIAsXi1mMHaVpKFfPrK/bmdhk8+x+5Lph7Z9P29oOe10CHna+SGWjoNL7j7V n6gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=MLn+Tg3hk5mSkSZZCRZSwAsGzzRG1KMJWiuIg+zXigM=; b=KpHduSsGuSzX+vTkgtheZNeWtIXKhbOnwMldR46bvxBvSiTJ1U1hWGlRs5a3N5v6xM hdrTu0PsFK1zeUdaq5kBCw8SW4RmBp7n4sa1A32oyaz8UMPGtr+xeiL2M/MehfI8Lvn/ GdT0QoOt4kjrwHKRvgWoQQq9IVx7p7n4eAfAciMusxqSjsiAjw3t/H4fdOFcu5O31gEW ST/fKrz4LGOpPfQ/vCqLqUoc8vZrIIi5bgYTxwhHEGPq6IpIE1smBKKsUkqOWMUNypFN YMGTHKlm6bVnAm+opQsmj9zWYFF7f+N/2gLW+ZLHLBHyea+i51I0s7oq5A1veRdVKWf6 jzDg== X-Gm-Message-State: APjAAAUAKqMvuVD2Qy/9cY7krCwYTRibaM6JvG4dxDNVrVThFufvMn/c vrMNqB67/8jT3B7Ry8spGes+cuY0nlyDZWgwp1UK4C6Q X-Google-Smtp-Source: APXvYqyyeSTFBhAgSmpJeyBRx+dCxnpJHYWEG8SdTk9FjwuwVXpwBJ6KMx11bEDkSRvfn9TcfshUOwrZQrqpALiq0NU= X-Received: by 2002:a05:6830:4d5:: with SMTP id s21mr36704441otd.294.1577408411114; Thu, 26 Dec 2019 17:00:11 -0800 (PST) MIME-Version: 1.0 From: vijay mohan Date: Thu, 26 Dec 2019 16:58:39 -0800 Message-ID: To: dev@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] pci device access from dpdk secondary process with igb_uio X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi All, I am trying to use pci vf device with secondary process in a multiple process mode and finding pci_dev->mem_resource[0].addr to be NULL. This happens when the pci device is attached to igb_uio.ko but with vfio_pci it works fine. Looking at the pci device initialization part for secondary process, when device is presented through igb_uio, (in pci_uio_map_secondary), it doesn't seems to update pci_dev->mem_resource[X].addr. For vfio-pci, it updates the addresses in pci_vfio_map_resource_secondary. With the following patch, i am able to use the device from secondary process but would like to know if I am missing something. diff --git a/drivers/bus/pci/pci_common_uio.c b/drivers/bus/pci/pci_common_uio.c index 7ea73db..f4dca9d 100644 --- a/drivers/bus/pci/pci_common_uio.c +++ b/drivers/bus/pci/pci_common_uio.c @@ -70,6 +70,7 @@ } return -1; } + dev->mem_resource[i].addr = mapaddr; } return 0; }