From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id BE8D091 for ; Thu, 8 Nov 2018 19:16:27 +0100 (CET) Received: by mail-wr1-f68.google.com with SMTP id j17-v6so17154200wrq.11 for ; Thu, 08 Nov 2018 10:16:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-transfer-encoding:mime-version; bh=qDCxx74WEJki+yJERY9MILTYGZ0YoP9R7bl4S3mbTFQ=; b=LqCxK2tE9EY22Q2xP+7/wTym57fYMfcjCnzOvHnf9FhljTbXpRJifhpdJQGFVyGgJI CCGrNFN+ZJGlcJQcdPKYsk23Mh3eDMtIImapSxwBXZKxFXUoFZMfyDs7XcEI+IYWxo1s psmz2piJVWo9tmKocB3N581S5LyVvpLpD78jaisKMYb74QE09PzhDG+vUaaejXevqW4s b7Cyma0vCyH+bDqmuEdI3RM5iqx+60OYLKncdPqE/4LfV7SuODJSU1KA48i0m7+wqXam Cn1nu7fMAIvtAls2uJJbQoS9CNGzGnmBrF1gvYivXU9KIE2MOmdUCN0NKJfEFvo1v9pz 2PZg== X-Gm-Message-State: AGRZ1gKhEwIX+fzwRqXcaFCnjm00sepv9FtkDftrUw1W1KrU3oP3q6o9 n+qtrkZaxpmcVFnNgl4FfI4= X-Google-Smtp-Source: AJdET5ezrCJrpzjaETvAfopBDyTKSNo/6u0OaEP5yloq3dkrxa4dEktAJt126YTgDsBNYE8AM4SnQQ== X-Received: by 2002:adf:9d1f:: with SMTP id k31-v6mr5538125wre.18.1541700987305; Thu, 08 Nov 2018 10:16:27 -0800 (PST) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id i10-v6sm4557261wrr.69.2018.11.08.10.16.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Nov 2018 10:16:26 -0800 (PST) Message-ID: <1541700985.31208.25.camel@debian.org> From: Luca Boccassi To: Shijith Thotton Cc: Jianfeng Tan , Ferruh Yigit , Gregory Etelson , dpdk stable , Jeff Guo Date: Thu, 08 Nov 2018 18:16:25 +0000 In-Reply-To: <20181108180111.25873-14-bluca@debian.org> References: <20181029125329.17729-20-bluca@debian.org> <20181108180111.25873-1-bluca@debian.org> <20181108180111.25873-14-bluca@debian.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Subject: Re: [dpdk-stable] patch 'igb_uio: issue FLR during open and release of device file' has been queued to LTS release 16.11.9 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Nov 2018 18:16:27 -0000 On Thu, 2018-11-08 at 18:01 +0000, Luca Boccassi wrote: > Hi, >=20 > FYI, your patch has been queued to LTS release 16.11.9 >=20 > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. > It will be pushed if I get no objections before 11/10/18. So please > shout if anyone has objections. >=20 > Also note that after the patch there's a diff of the upstream commit > vs the patch applied > to the branch. If the code is different (ie: not only metadata > diffs), due for example to > a change in context or macro names, please double check it. >=20 > Thanks. >=20 > Luca Boccassi >=20 > --- > From 11bb826270d6feb3e810aec77a9252cf65b559a9 Mon Sep 17 00:00:00 > 2001 > From: Shijith Thotton > Date: Fri, 7 Jul 2017 16:43:51 +0530 > Subject: [PATCH] igb_uio: issue FLR during open and release of device > file >=20 > [ upstream commit b58eedfc7dd57eef6d12e2c654a52c834f36084a ] >=20 > Set UIO info device file operations open and release. Call pci reset > function inside open and release to clear device state at start and > end. > Copied this behaviour from vfio_pci kernel module code. With this > patch, > it is not mandatory to issue FLR by PMD's during init and close. >=20 > Bus master enable and disable are added in open and release > respectively > to take care of device DMA. >=20 > Signed-off-by: Shijith Thotton > Reviewed-by: Jianfeng Tan > Acked-by: Ferruh Yigit > Acked-by: Gregory Etelson > --- > =C2=A0lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 33 > +++++++++++++++++++++++ > =C2=A01 file changed, 33 insertions(+) >=20 > diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c > b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c > index 9f00f07ab..4be89ef86 100644 > --- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c > +++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c > @@ -170,6 +170,37 @@ igbuio_pci_irqhandler(int irq, struct uio_info > *info) > =C2=A0 return IRQ_HANDLED; > =C2=A0} > =C2=A0 > +/** > + * This gets called while opening uio device file. > + */ > +static int > +igbuio_pci_open(struct uio_info *info, struct inode *inode) > +{ > + struct rte_uio_pci_dev *udev =3D info->priv; > + struct pci_dev *dev =3D udev->pdev; > + > + pci_reset_function(dev); > + > + /* set bus master, which was cleared by the reset function > */ > + pci_set_master(dev); > + > + return 0; > +} > + > +static int > +igbuio_pci_release(struct uio_info *info, struct inode *inode) > +{ > + struct rte_uio_pci_dev *udev =3D info->priv; > + struct pci_dev *dev =3D udev->pdev; > + > + /* stop the device from further DMA */ > + pci_clear_master(dev); > + > + pci_reset_function(dev); > + > + return 0; > +} > + > =C2=A0#ifdef CONFIG_XEN_DOM0 > =C2=A0static int > =C2=A0igbuio_dom0_mmap_phys(struct uio_info *info, struct vm_area_struct > *vma) > @@ -370,6 +401,8 @@ igbuio_pci_probe(struct pci_dev *dev, const > struct pci_device_id *id) > =C2=A0 udev->info.version =3D "0.1"; > =C2=A0 udev->info.handler =3D igbuio_pci_irqhandler; > =C2=A0 udev->info.irqcontrol =3D igbuio_pci_irqcontrol; > + udev->info.open =3D igbuio_pci_open; > + udev->info.release =3D igbuio_pci_release; > =C2=A0#ifdef CONFIG_XEN_DOM0 > =C2=A0 /* check if the driver run on Xen Dom0 */ > =C2=A0 if (xen_initial_domain()) Hi, I've picked up b58eedfc7dd57eef6d12e2c654a52c834f36084a as it is a prerequisite for 70efa4116420b6f7a0734711dd603d3024366c79 as far as I can see, let me know if I should not or do it differently please. Thanks! --=20 Kind regards, Luca Boccassi