From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A435D42DC0; Mon, 3 Jul 2023 09:47:54 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E926941143; Mon, 3 Jul 2023 09:47:53 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 8A8F240ED5 for ; Mon, 3 Jul 2023 09:47:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688370471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AeBDuY6dDSSpwasS2wRhzEN6U41//kgxxNr0vr0+nH4=; b=V5GiaVKpFbDNJMi88rsk1OYMDwMjxqEFjiW50SQt+XDZQsWC0VaI3aZO8w7bM36/csf1Qf 8fEL0fViSQ9bqBxYlnSaX3Uhh05P3JlLqatJpMWVidcJvsUBv9Qjxyb6duBOfStBLCgx6K MfmtytsIk/M5zub8Z0kjfDc0gTnUi5k= Received: from mail-oi1-f199.google.com (mail-oi1-f199.google.com [209.85.167.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-527-1HiS6WjuMcaFIf20rxc1tA-1; Mon, 03 Jul 2023 03:47:50 -0400 X-MC-Unique: 1HiS6WjuMcaFIf20rxc1tA-1 Received: by mail-oi1-f199.google.com with SMTP id 5614622812f47-39ec7630322so3829666b6e.0 for ; Mon, 03 Jul 2023 00:47:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688370469; x=1690962469; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AeBDuY6dDSSpwasS2wRhzEN6U41//kgxxNr0vr0+nH4=; b=SDL36BiVDq2DWxt1UNOIfLn9hgHSGKVCFFUUgyzj+idUns0NUFKzE1P6s4fUWglk99 Ygz3zqIgKNpOaWmQQ8pPZ8PSTVRbjSsjTrTgmDDzIqVJ1kQnbvRwkogj7l+F2Plul9DF QoeIWAPIbUJQ7fauEBsjfqJZSWYEO/6ptAumRvY8W/K8zVE7K2fimkIaJCirwivlv8Fd 0/5PepjK8FefFzCXOX7yi8exmwNuD57y8u6H9Yahltml1FHNQp/BLRuTEylZ2l23rQ3I fnEK8PF1li2WJH2nPvTArqk0gpb3+l4JpWNSRpIiwVjmMQbtWOVkkBJdvNZ/WNKFmorV Bs7g== X-Gm-Message-State: AC+VfDye1ECTwmX1IiMW2iRC4RKsdaHC2tWlFfGGSD79g4xIUq+PJllC kAtqFov5/773An/iH7/e20IDcw/LZsOZzQXphdZd+SFXAoytU6k4ckYfgphBd41tnZAdXKKXfAH m6v28rCHe2sjBMsUxjz8= X-Received: by 2002:a05:6808:1296:b0:3a3:6f20:39b4 with SMTP id a22-20020a056808129600b003a36f2039b4mr9543346oiw.29.1688370469358; Mon, 03 Jul 2023 00:47:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4O7nOkPvXMpGPTtD9FlESjnTjc06ih4EKZ5NM9T2IP3NcBdolb45Br7SB9JMxlFy72frlMcHwF0S8rlUfAJD8= X-Received: by 2002:a05:6808:1296:b0:3a3:6f20:39b4 with SMTP id a22-20020a056808129600b003a36f2039b4mr9543333oiw.29.1688370469051; Mon, 03 Jul 2023 00:47:49 -0700 (PDT) MIME-Version: 1.0 References: <20230628063651.178604-1-miao.li@intel.com> <20230629022653.263046-1-miao.li@intel.com> In-Reply-To: <20230629022653.263046-1-miao.li@intel.com> From: David Marchand Date: Mon, 3 Jul 2023 09:47:37 +0200 Message-ID: Subject: Re: [PATCH v2 1/2] net/virtio: fix legacy device IO port map in secondary process To: Miao Li Cc: dev@dpdk.org, stable@dpdk.org, Maxime Coquelin , Chenbo Xia X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Thu, Jun 29, 2023 at 4:27=E2=80=AFAM Miao Li wrote: > > When doing IO port map for legacy device in secondary process, > vfio_cfg setup for legacy device like vfio_group_fd and vfio_dev_fd > is missing. So, in secondary process, rte_pci_map_device is added > for legacy device to setup vfio_cfg and fill in region info like in > primary process. I think, in legacy mode, there is no PCI mappable memory. So there should be no need for this call to rte_pci_map_device. What is missing is a vfio setup, is this correct? I'd rather see this issue be fixed in the pci_vfio_ioport_map() function. >> Fixes: 512e27eeb743 ("net/virtio: move PCI specific dev init to PCI ethd= ev init") This commit only moved code, and at this point, there was no need for a call to rte_pci_map_device in the secondary process case. It seems unlikely this is a faulty change. The recent addition on the vfio side seems a better culprit, but I am fine with being proven wrong :-). > Cc: stable@dpdk.org > > Signed-off-by: Miao Li --=20 David Marchand