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 716F2A055B; Tue, 25 Feb 2020 20:46:02 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BA3691BF8D; Tue, 25 Feb 2020 20:46:01 +0100 (CET) Received: from mail-oi1-f194.google.com (mail-oi1-f194.google.com [209.85.167.194]) by dpdk.org (Postfix) with ESMTP id B5908B62 for ; Tue, 25 Feb 2020 20:46:00 +0100 (CET) Received: by mail-oi1-f194.google.com with SMTP id c16so536835oic.3 for ; Tue, 25 Feb 2020 11:46:00 -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 :cc; bh=9hbPpvjcVjhGIcXC6y3QyteqbtqO+KDD2U3ubqV+Vzk=; b=AchYJW3XT/g2iRkLI5u+ayEMvpy66or5EqSIrFdwaI6gVTzRAtNt/bNiqQ7RLJKOAt eZoB0HWh1wFwzCL3VsRDTbwG0LaQcwxYry55ogV+UbmMqGEy3niandWeYnniFoaaYlsE BjxOk00+rNfESPpY0tSoV4rkunx4miOW72gEZBvPV1E61SY8FU2PWBMNNCOSiJ+5Y9gz mXXnYnTNPCxFYy57SOd5KK36ji884uBFpPIVZosKZHLwFXfVYN860e+iuG0BTxbgrQSN VOosW++WYlqLEGXoRN2t5dIB2NH9G+oToUJdIA57fYX0vyAGmgLYmp4hY0rCOzzeE3JC vLIw== 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:cc; bh=9hbPpvjcVjhGIcXC6y3QyteqbtqO+KDD2U3ubqV+Vzk=; b=PvfGTg7X0X0wrSV9VhqmFrTh34MzEhy7eGF4aI5ZhTI7D4qlMY1bsq0XHSLzsVNzFE uzldSnrTz+vZNWTxRFC6bEzkeB32BdZc8TiBcLiatS3bDRus0EXgKWGvbhNyRJnujfMm X0fP+6zMzAoTLVP3Ut3XhBEbVusbHBKrhuz3fTjhUNOfskOtnVh2g0KburK3Ypv/QfJu 0OFM7t62Ut3TMgd5nkhRuHf4GRzxhun8fV5okiqnC9KcV+thpNHctByXehLnZHFmTKim 6YRJL6uLObT/dssEbUOuu1T6ZfPHKthrPkCRAdh5/YET27OiEjQVYKhxB2jo4ddWcaPe a+DA== X-Gm-Message-State: APjAAAUifuiNMMZgDzZ2KzBaby8LdRLHe9AHQuhjB1X4J4n25tc9Hqk5 FYlmr3hHlYoBwVUCP1cz4VrTT/JNOGwWcu5aAfM= X-Google-Smtp-Source: APXvYqxY62PYmf6gwoBvFMejSiSbPHaJfHxpxVl2nqMIzjS0aTZQn84okc+t6+BmleFv+bCgCMMU5m1I0ivlqwE0Bfs= X-Received: by 2002:a05:6808:b29:: with SMTP id t9mr414010oij.69.1582659959844; Tue, 25 Feb 2020 11:45:59 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: vijay mohan Date: Tue, 25 Feb 2020 11:45:48 -0800 Message-ID: To: "Trahe, Fiona" Cc: "dev@dpdk.org" , "Yigit, Ferruh" Content-Type: text/plain; charset="UTF-8" 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" Hi Fiona, Thanks for verifying the fix. I will send this patch out for review. Thanks, Vijay On Tue, 25 Feb 2020 at 07:09, Trahe, Fiona wrote: > > Hi Vijay, > > Thanks for debugging. We've recreated your issue and validated that this fixes it. > Do you want to go ahead and send up a patch or will I do that? > > Fiona > > > > -----Original Message----- > > From: Trahe, Fiona > > Sent: Wednesday, January 22, 2020 5:19 PM > > To: vijay mohan ; dev@dpdk.org; Yigit, Ferruh > > Cc: Trahe, Fiona > > Subject: RE: [dpdk-dev] pci device access from dpdk secondary process with igb_uio > > > > Hi Vijay, > > > > Sorry for the delay, we missed this as It arrived while on Christmas holidays. > > We'll investigate, though it may take some time as this looks like a pci lib issue > > and up to recently we have only been using QAT in primary processes so don't have > > expertise yet in this area. > > > > If you could provide some background to your use-case for qat in primary/secondary, that may help. > > > > Fiona > > > > > -----Original Message----- > > > From: dev On Behalf Of vijay mohan > > > Sent: Thursday, January 2, 2020 6:58 PM > > > To: dev@dpdk.org; Yigit, Ferruh ; Griffin, John > > > Subject: Re: [dpdk-dev] pci device access from dpdk secondary process with igb_uio > > > > > > 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 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; > > > > } > > > > > > 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 instance 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