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 4099EA034E; Thu, 24 Feb 2022 15:17:42 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A2CC6426F6; Thu, 24 Feb 2022 15:17:41 +0100 (CET) Received: from mail-qv1-f46.google.com (mail-qv1-f46.google.com [209.85.219.46]) by mails.dpdk.org (Postfix) with ESMTP id 03FD74114D for ; Thu, 24 Feb 2022 15:17:39 +0100 (CET) Received: by mail-qv1-f46.google.com with SMTP id a1so3736301qvl.6 for ; Thu, 24 Feb 2022 06:17:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=WViP2cInWhi6qcQvSz+Nyiq5PWcvM///YcpZTQTJmjs=; b=Mi/1ZDnIPGzAEY5nbP6m3DruBe2J/LtmcTwo/r4vV6O6RRyZNjdo2LWx8ivHeHPvPJ 9HuyBKgMFux6KiM12/awXMIBE+qS7Yol2WDyrzM08p5woeFAa3mvR+6lY2VVy7W9m37G IVoqrdUsWtP0QahQ7MUgBau2h/sZsi5qNex8QXFDtacmB7qcR+Hs48CEcfL6Mpsuxfeo KPZ1YswSK/yP0zHtb6mWHq5PwA/sF71W0hHSdIa5LKcSIo0W+XbhU1kU0gZ26DQX73PR ETkm7mCIckuNhziu5Mb3FfS2pUB3sLtAB4sKY+cGk7+Jxhj8tJFALjqsSWLNDXjDDS/1 4kTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=WViP2cInWhi6qcQvSz+Nyiq5PWcvM///YcpZTQTJmjs=; b=nHCOrSIzHOrPzkCvSfrdihwLDTONiXPBv/yRIBDAAoiJibDrLpI7aw0Um8RlPe4F4F UXnEyL2FnLtA5uVHIwK5q24Cp+Vf5/BfUNu1muo5fHfjrBNeTUDFkoB2J2SGCXGvV2NV +A3nGtH0MwKE57kM/+puLPkT+9M/5QBwG/kW3J8CwKTN0RAUk9Xf5QczGqeoWI7NzP+D xix1yheaQIYEgk/JBSDp6cbpnpzUnBjckuzaKeFM5VGDpYhcvrq5FL1+vGmnq5MY2mU8 0SLcnqG3T0MeeYlq6C3We3P6EjSBMLspCDhZIFsLxGE+AGxOje4ERygnCsnCIp3j/PcD B9XA== X-Gm-Message-State: AOAM530P67sHOEbMG3XfkvU1uErYkZgRgLHrxqA59SJo2I18CiRW96Ul p5Ef1ZX/Wb5Xqof13w/sLSksmB2J6R7oKUFa/m/0R9aLlFE= X-Google-Smtp-Source: ABdhPJy+Qi4Ayxn9P5PErn58uL+MyVhXJTsaHpnT3qw+sNmRDqR3N5lWI4my5+MNFxB+egP6wb3aQGm2XYAXisEHNE4= X-Received: by 2002:a05:622a:4d1:b0:2de:676:d2bd with SMTP id q17-20020a05622a04d100b002de0676d2bdmr2494623qtx.565.1645712258814; Thu, 24 Feb 2022 06:17:38 -0800 (PST) MIME-Version: 1.0 References: <20220119145037.28125-1-mk@semihalf.com> In-Reply-To: <20220119145037.28125-1-mk@semihalf.com> From: =?UTF-8?Q?Micha=C5=82_Krawczyk?= Date: Thu, 24 Feb 2022 15:17:27 +0100 Message-ID: Subject: Re: [PATCH] bus/pci: assign driver's pointer before mapping To: dev Cc: upstream@semihalf.com, "Brandes, Shai" , Harman Kalra , stable@dpdk.org, Ferruh Yigit , Thomas Monjalon 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 =C5=9Br., 19 sty 2022 o 15:50 Michal Krawczyk napisa=C5= =82(a): > > Patch changing the way of accessing interrupt handle also changed order > of the rte_pci_map_device() call and rte_pci_device:driver assignment. > It was causing issues with Write Combine mapping on the Linux platform > if it was used with the igb_uio module. > > Linux implementation of pci_uio_map_resource_by_index(), which is called > by rte_pci_map_device(), needs access to the device's driver. Otherwise > it won't be able to check the driver's flags and won't respect them. > > Fixes: d61138d4f0e2 ("drivers: remove direct access to interrupt handle") > Cc: hkalra@marvell.com > Cc: stable@dpdk.org > > Signed-off-by: Michal Krawczyk > --- Hi, is there any chance that this fix will land for v22.03-rc2? Without that, we suffer a huge performance impact for the ENA PMD. Thanks, Michal > drivers/bus/pci/pci_common.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c > index 4a3a87f24f..def372b67e 100644 > --- a/drivers/bus/pci/pci_common.c > +++ b/drivers/bus/pci/pci_common.c > @@ -247,9 +247,12 @@ rte_pci_probe_one_driver(struct rte_pci_driver *dr, > return -ENOMEM; > } > > + dev->driver =3D dr; > + > if (dr->drv_flags & RTE_PCI_DRV_NEED_MAPPING) { > ret =3D rte_pci_map_device(dev); > if (ret !=3D 0) { > + dev->driver =3D NULL; > rte_intr_instance_free(dev->vfio_req_intr= _handle); > dev->vfio_req_intr_handle =3D NULL; > rte_intr_instance_free(dev->intr_handle); > @@ -257,8 +260,6 @@ rte_pci_probe_one_driver(struct rte_pci_driver *dr, > return ret; > } > } > - > - dev->driver =3D dr; > } > > RTE_LOG(INFO, EAL, "Probe PCI driver: %s (%x:%x) device: "PCI_PRI= _FMT" (socket %i)\n", > -- > 2.25.1 >