Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8AAB4C47080 for ; Sun, 23 May 2021 12:07:01 +0000 (UTC) Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by mail.kernel.org (Postfix) with ESMTP id F1FDE61132 for ; Sun, 23 May 2021 12:07:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F1FDE61132 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C4D6B40685; Sun, 23 May 2021 14:06:59 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 325954003C for ; Sun, 23 May 2021 14:06:58 +0200 (CEST) IronPort-SDR: khfzdH8akYcLo9bJuDQQP57JiaUaj6iXrT/qKfkhIdjIHpGGvY0tDhDqbbCZJPxFd8dKH0hYdy BcaQpUJ0SY8w== X-IronPort-AV: E=McAfee;i="6200,9189,9992"; a="199847485" X-IronPort-AV: E=Sophos;i="5.82,319,1613462400"; d="scan'208";a="199847485" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2021 05:06:53 -0700 IronPort-SDR: VqSZmYGp2p5KMgGLEYX5nUujYfCdaQm32E/AaVZ6UWhTS+DjYRNsaxVTLiX4USufGzIx3/++IP ENxkrzzm82vw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,319,1613462400"; d="scan'208";a="475390067" Received: from npg-dpdk-haiyue-1.sh.intel.com ([10.67.118.220]) by orsmga001.jf.intel.com with ESMTP; 23 May 2021 05:06:50 -0700 From: Haiyue Wang To: dev@dpdk.org Cc: qi.z.zhang@intel.com, liang-min.wang@intel.com, david.marchand@redhat.com, Haiyue Wang Date: Sun, 23 May 2021 19:46:05 +0800 Message-Id: <20210523114609.448092-1-haiyue.wang@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210421050243.130585-1-haiyue.wang@intel.com> References: <20210421050243.130585-1-haiyue.wang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v6 0/3] fix PF reset causes VF memory request failure 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 Sender: "dev" By triggerring the VF reset from PF reset, echo 1 > /sys/bus/pci/devices/PF-BDF/reset the PCI bus master bit will cleared on VF, so the VF needs to enable this bit before restart. This patch set adds the API to enable PCI bus master. v6: update the annotate symbol version, and add some comments in source code v5: error handling if bus master enable failed v4: change the API to set type, so can enable or disable v3: added the missed annotate symbol add time v2: rebase to new librte directory path Haiyue Wang (3): bus/pci: set PCI master in command register net/iavf: enable PCI bus master after reset net/i40e: enable PCI bus master after reset drivers/bus/pci/pci_common.c | 28 ++++++++++++++++++++++++++++ drivers/bus/pci/rte_bus_pci.h | 14 ++++++++++++++ drivers/bus/pci/version.map | 3 +++ drivers/net/i40e/i40e_ethdev_vf.c | 13 ++++++++++++- drivers/net/iavf/iavf_ethdev.c | 10 +++++++++- lib/pci/rte_pci.h | 4 ++++ 6 files changed, 70 insertions(+), 2 deletions(-) -- 2.31.1