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 A719FA0093; Mon, 3 Oct 2022 08:41:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 77769410FB; Mon, 3 Oct 2022 08:41:44 +0200 (CEST) Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by mails.dpdk.org (Postfix) with ESMTP id DAD4B4003F for ; Fri, 30 Sep 2022 22:48:17 +0200 (CEST) Received: by mail-wr1-f53.google.com with SMTP id x18so8555599wrm.7 for ; Fri, 30 Sep 2022 13:48:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date; bh=0Ra0NcM3gyaGoWh4rO7+Pu4l2BkZdAHh4LXaj3VqSxU=; b=YsHzo4nC2JdrBX+UC8LlvItvxhIQyU8q6AhnY46farCfM0La2l8QBXsypPEeUEb7my PwCUDDuQcoh3PDAvpHTIX9eXpcrdOgd7MwmNrf89lLTG2nb0Q+sdeCyiEYudFJfHXAhj gZQDS3V0ovNOjhkR4eQGQPbxHiVbZiewOisHUcQ/Rg47J3Nv41H/A7RcezGbpt3cEy8C WUiS0bSXxAVGIu9YyFPJUfaC4qz240SdmAxfd8bqrqT1lQY9LhDPC0DjHrhFf+m07/FI Drpm4iaNCvOmEvyN1/BapEXF4ld68xjolFwdO+p2vKthKNEIxni4Fv9bt791Gmx0zIny o7OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date; bh=0Ra0NcM3gyaGoWh4rO7+Pu4l2BkZdAHh4LXaj3VqSxU=; b=Xfy9ZV2uHJ+r2/IaHDFigir2ef6K2fOtzQSEk7TGgF3pcpTCg+RsLm+M5hcio7dG0K b5ANpYvyRCJaB2ceV2xEY0iYZW7ONxJfOG9vA6SZbfHCh51ULH36ro7slPglpXbnc72j ZD6tpmgFWXlDCH0f+yvRLphQn/cjYgh3G7wLgcUnRx/aooG4krql9BAe92FosbKO8YpX oW6hzB9kSoBi0KY//lyUzsLQ1JYnX7a7TbacUOCbafui7k/3NZa9e58WxLPa+DyJ2oq7 mqPEmEB3r3Ut98mUV4YXOfof1UkJD4+3ddsSl552jHJmfo7pscGlT9wajjMzyTIhn4w3 cQRA== X-Gm-Message-State: ACrzQf1KG+k06+IlNa0Us89x5rajCY0VFHNOUznBUN/ST5xeIP6rhXNN 0acAE9Lo+PFYzQ6VI527BpQsymjtgH9fQCvYFpx73tLie9RSeg== X-Google-Smtp-Source: AMsMyM4Gy1w5wFZ5+E8CIMxZUGHUlULBBJvrh2cJMd+jCRttzXDQmd0WIztFsoDaWBVe9VqN+DkCTNUDaVYpZZwrABc= X-Received: by 2002:a05:6000:a17:b0:22a:2da9:e233 with SMTP id co23-20020a0560000a1700b0022a2da9e233mr6675473wrb.248.1664570896968; Fri, 30 Sep 2022 13:48:16 -0700 (PDT) MIME-Version: 1.0 From: Niket Kandya Date: Fri, 30 Sep 2022 13:48:05 -0700 Message-ID: Subject: Question about VFIO_DEVICE_RESET To: dev@dpdk.org Cc: Tanjore Suresh Content-Type: multipart/alternative; boundary="00000000000004fa2005e9eb1d8e" X-Mailman-Approved-At: Mon, 03 Oct 2022 08:41:42 +0200 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 --00000000000004fa2005e9eb1d8e Content-Type: text/plain; charset="UTF-8" Hi Folks, After running into a reset related issue recently and browsing through code, I reached at this function *pci_rte_vfio_setup_device*. I do not understand the rationale of the *VFIO_DEVICE_RESET* at the end of this function. Looks like the function sets up interrupts, enables bus mastering and then resets the device? See below from the PCIe spec: *`Note that the controls that enable the Function to initiate requests on PCI Express are cleared, including Bus Master Enable, MSI Enable, and the like, effectively causing the Function to become quiescent on the Link.`* Is the function effectively undoing everything by doing the reset at the end? --00000000000004fa2005e9eb1d8e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Folks,

After running into a reset related issue = recently and browsing=C2=A0through code, I reached at this function pci_rte_vfio_setup_device.

I do not understand the rationale of the VFIO_DEVICE_RESET at the= end of this function.
Looks like the function sets up interrupts= , enables bus mastering=C2=A0and then resets the device?

See below f= rom the PCIe spec:
`Note that the controls that enable the Function t= o initiate requests on PCI Express are cleared, including Bus Master Enable, MSI Enable, and the like, effectively causing the Function to becom= e quiescent on the Link.`

Is the function effectively undoing ev= erything by doing the reset at the end?
--00000000000004fa2005e9eb1d8e--