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 10044A04F3; Thu, 2 Jan 2020 19:59:52 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5B14E1C1D0; Thu, 2 Jan 2020 19:59:51 +0100 (CET) Received: from mail-ot1-f67.google.com (mail-ot1-f67.google.com [209.85.210.67]) by dpdk.org (Postfix) with ESMTP id 3E1901C1CD for ; Thu, 2 Jan 2020 19:59:50 +0100 (CET) Received: by mail-ot1-f67.google.com with SMTP id b18so36419696otp.0 for ; Thu, 02 Jan 2020 10:59:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=o0pWRFIItZbVEN2nIp8ydmO27r0ebtulFLdSGKPJ+S8=; b=TGAp8HA5nTk6Yc6SlIKii8xw/08q0fj+X2/NASvo6zRxRBG6UFwghqaFVycfQEVOIj 3ai0fsyJS45Lnj8/HLWYCmGRyGLCpTbO5uWIQmTIyW3q6YzF4CHIhYnXbkH+LYTIIL1c apy4DnuZcJJP8Avj6Sezg7JFC2Gr7JIsBocRfRr/30lpI3Ot9yQV9mqinM6ILed6XTZ+ KUaQHhf8kYU5i4EOtOmfWKWOFaB7uxDXq+zQYRUt5FVfhVubJnyEqE4nIOQOkoYrrvKx iO/EwQ3r3QlhEdwEzNuz+BgJ3ph9dXV46D9jFsK6/rEiBTa5nZk2QtqGbxAJptooYDrt vTfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=o0pWRFIItZbVEN2nIp8ydmO27r0ebtulFLdSGKPJ+S8=; b=EHC6DcyRhjGXdVxFyxCgBMDT8djsMD1MQZ6tVWEO7TP9G9T2Ir5bw6RiBQTv/t4e3y TgUqgILkL/rplk7OCo1dog4g8VPjMAxoOvd82Oz33nYgrcO0AjgZ9BcgTpm6fpPSDb7g tqeDQ5ira8taGz0PwpqYa6NBemZjOAAWNyWAXpuq/7mFmUAJ6E8BxeowlGw1xp0G8cA8 EHN70e3MDc/XSOhFhEANAelL7Tb1Z6njztIoN6cXtjuGi4Y20VU0OuzBO5M9ESXzMPIR al6sV7L0II34GK8L27oj5IKoxxtCLFs+cy4S0ppaR5KOPx4/LTIbR1R9G/Bxp1PcmO4F j1Tg== X-Gm-Message-State: APjAAAVTf9GOJ65l0jiEJUuEnAQYIEP6Hm2WKd+OGvmcjwZpeDK/xYHf dBxrLFj9gH5Ae2LfxtqPWNgdomj5mkc0wDYwRb13oJH7UME= X-Google-Smtp-Source: APXvYqzCwQzvznp3v49quatKe47gUVLknsNkqtcsAE06dVUZoL1ViEFkdNhDIAZQV3CCS11f01rME4jzC8/79wZk8VE= X-Received: by 2002:a9d:5784:: with SMTP id q4mr38509487oth.278.1577991589157; Thu, 02 Jan 2020 10:59:49 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: vijay mohan Date: Thu, 2 Jan 2020 10:58:14 -0800 Message-ID: To: dev@dpdk.org, ferruh.yigit@intel.com, john.griffin@intel.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [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" On Thu, 26 Dec 2019 at 16:58, vijay mohan wrote: > > Hi All, > I am trying to use pci vf device with secondary process in a multiple pro= cess mode and finding pci_dev->mem_resource[0].addr to be NULL. This happen= s 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 t= he 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 i= f I am missing something. > > diff --git a/drivers/bus/pci/pci_common_uio.c b/drivers/bus/pci/pci_commo= n_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 =3D mapaddr; > } > return 0; > } Hi Ferruh Yigit/John Griffin, I am trying to use QAT crypto VF device attached to igb_uio.ko with secondary process and has observed following errors while setting up the queues due to pci_dev->mem_resource[0].addr check from qat_qp_setup. mem_resource[0].addr happens to be NULL when the device is presented to dpdk through igb_uio but works fine with vfio_pci.ko. Could you please let me know if the fix mentioned above is sufficient for the device to work with secondary process. CRYPTODEV: Initialisation parameters - name: BDF_qat_sym,socket id: 0, max queue pairs: 0 qat_sym_dev_create(): Created QAT SYM device BDF_qat_sym as cryptodev insta= nce 0 qat_comp_dev_create(): Creating QAT COMP device BDF_qat_comp qat_comp_dev_create(): Created QAT COMP device BDF_qat_comp as compressdev instance 0 Dev config Setting up queues qat_qp_setup(): Setup qp 0 on qat pci device 0 gen 2 qat_qp_setup(): Could not find VF config space (UIO driver attached?). Crypto device queue pair init failed Thanks, Vijay