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 A34F2A0548; Thu, 27 May 2021 16:03:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2564141112; Thu, 27 May 2021 16:02:36 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2054.outbound.protection.outlook.com [40.107.243.54]) by mails.dpdk.org (Postfix) with ESMTP id E9CDA41106 for ; Thu, 27 May 2021 16:02:32 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oI6ijxSNc85O0Q4YDQmxlVALQPpQwkMeCmHFSO1AOWhy5xxz+4FWOLWAW7RT4EWSYdlGgEN6V+INrsTqUSwHe7q6/5M5xNxdosaiZ5B2xXBfvVvN6pESn9Z1eEQEJYvZOMTF5dN3HyAs3czTrnNBk4Pp2An17WCE/zeEbWGxQDK/N9iZGVoMNw+27cw05mobyIY6drnCo9JQ7aoBSRs/sgX0Qs9jlSd0rxOy2uYOyb2z2p0yMQYZBHEK9B3wTcSoRTWcY24DU6T2QfDZbtI0QU2wGaeiS23RmA0E6fW/9P8wvn08+D4lgSulYeIRxVvrE2Rp4zolqmRVpxKH+ci9Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=N6twiXeE+3ElBKdDJ3XIA9zZgGwlLdUiv974F7RXdrY=; b=P57XCO+Wwl+l89dAhYyeyqKehjkxBoredQyLHQzW0mHgNb6VAFrBAtgT8NaCegRC3uD95Ll3X155w5I4JzD7x3fKzUEyjuu5hAeJhA80s9R5DotFdxDpRlJTteBSuS7NraKdrWR+QIxjCCfcoUrk+JutSAFg9cpPPy1nZKrEimMN0cggSZHfCE//WfRSEY7QryDP/3clvorcqPMHyYA7YtRul98mlCjhPCA7rIEn1ok+Bpw5/MRm0erZuwecG2+YfHjEwjn9y2ySfBHhJtDRMd3+RItDxHSWQaBIz4FuMYpGtB5DlhPbtO3QREsq7sVX+MJp3KyOJi53M1fFnAJ3ag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=N6twiXeE+3ElBKdDJ3XIA9zZgGwlLdUiv974F7RXdrY=; b=FRLpJ8l8+OHnKmUcQAMuoi4glaRBi1tXUi3UhkNgoT6HxOrRh8mgM7PFH7p4+zLUEjBfRGXDGumQ71zHSb1xbYp+zuzD4CqVY58n6jhS2NYzENj9W56IJ/92SVRnqRqlRWz8overOm3n+AoO8aq5IuNnM1N/baZsIQWKcQC97Y2pnWFhPJ/Ca5u17iu3jxryPyuDE6XL1QCrlWCHDRergFO66uu11A+xwb5FsarEx4izy2d6PIu6bdAGhjHaZm++0dCqgHWVu+k8JBFnMw99BZXQwi4u42Y7vSduqJxvyoNwqkqBSuChUOQac4h47EcWqpmRRbkvka9pxroR9e65Lw== Received: from BN9PR03CA0677.namprd03.prod.outlook.com (2603:10b6:408:10e::22) by DM5PR1201MB0075.namprd12.prod.outlook.com (2603:10b6:4:54::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.20; Thu, 27 May 2021 14:02:31 +0000 Received: from BN8NAM11FT055.eop-nam11.prod.protection.outlook.com (2603:10b6:408:10e:cafe::14) by BN9PR03CA0677.outlook.office365.com (2603:10b6:408:10e::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.21 via Frontend Transport; Thu, 27 May 2021 14:02:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT055.mail.protection.outlook.com (10.13.177.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4129.25 via Frontend Transport; Thu, 27 May 2021 14:02:31 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 27 May 2021 14:02:23 +0000 From: Xueming Li To: Viacheslav Ovsiienko CC: Thomas Monjalon , , , Matan Azrad Date: Thu, 27 May 2021 17:02:01 +0300 Message-ID: <20210527140202.19377-4-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210527140202.19377-1-xuemingl@nvidia.com> References: <20210527133759.17401-1-xuemingl@nvidia.com> <20210527140202.19377-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: eba0d1bf-e263-4b31-6e75-08d92118122e X-MS-TrafficTypeDiagnostic: DM5PR1201MB0075: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:510; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TwNyrZy90rQi8l+cyfKbFMKBSPZKCKXJ5LZMRbO6Cqrn2hiRIvQ4NrtcsyLOS5yK+ZleOwvL5UEPsvMCgVCfbSuQaeBKXb4r/Bn4Xomo1jw+Q+dkbmgjpd6MUMd2ld7nwXhuOBrzq7Z9+KDJcFrDNWTDQeRzXyfgcKrQ7wGBQaJU6RrhmVBSmuT5swIhHAHQ+Pb0EGqdHFb1n7W5NcKQtWP9/kPQuVcI+ZNDhT110L8FRfROwCekmCmD/KNFFjfIHSf+2wz1JP/FRabPSqngFvkPHzT8ugwFNNRVZkU+PX9AN/rkYJzJZfL3rGlgwNdLgdsi4hxnXo7+3ba0+9uJ2DWUfwjkU31x7IHkcQaCSH8sX37J3YwMTOWFt8TI2GLeX/L3XejUVhk65XgFfHZGG09LTFoWaQ5480PZCPEx4VTnNyvTXoaT+RwL5K2SEiwNRd/AWHLIy8y7URcTbRhWYATF7cONl6vXqGan8C4mcvzs4thzH/XkCwfu+VVaTO9JQaJjTZd20davgAe8HaESVC3ct/RQzHeegFXC8sMtS4jPpdQlEawQ9Ey+viBzeJPLg/nDMLWimG9Nmhqz4J637N/51cGju8J3xAyQ+K7VtoSsIYYzCc98FTIORlNVzPy/w1LoU1H7UP2ZU+Vl3N2sDUO0SH7hEm0UC/fhD1IkmQo= X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(376002)(136003)(396003)(346002)(39860400002)(36840700001)(46966006)(107886003)(6286002)(70206006)(2616005)(36906005)(1076003)(6666004)(26005)(356005)(82740400003)(70586007)(83380400001)(55016002)(8676002)(86362001)(8936002)(54906003)(37006003)(4326008)(36860700001)(316002)(5660300002)(82310400003)(478600001)(6636002)(2906002)(36756003)(6862004)(336012)(7636003)(186003)(4744005)(47076005)(16526019)(7696005)(426003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 May 2021 14:02:31.5821 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: eba0d1bf-e263-4b31-6e75-08d92118122e X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT055.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0075 Subject: [dpdk-dev] [RFC 13/14] vdpa/mlx5: support SubFunction 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" From: Thomas Monjalon Signed-off-by: Thomas Monjalon --- drivers/vdpa/mlx5/mlx5_vdpa.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c index 967234193f..2f4420becd 100644 --- a/drivers/vdpa/mlx5/mlx5_vdpa.c +++ b/drivers/vdpa/mlx5/mlx5_vdpa.c @@ -553,9 +553,13 @@ mlx5_vdpa_sys_roce_disable(const char *addr) static int mlx5_vdpa_roce_disable(struct rte_device *dev) { + char pci_addr[PCI_PRI_STR_SIZE]; + + if (mlx5_dev_to_pci_str(dev, pci_addr, sizeof(pci_addr)) < 0) + return -rte_errno; /* Firstly try to disable ROCE by Netlink and fallback to sysfs. */ - if (mlx5_vdpa_nl_roce_disable(dev->name) != 0 && - mlx5_vdpa_sys_roce_disable(dev->name) != 0) + if (mlx5_vdpa_nl_roce_disable(pci_addr) != 0 && + mlx5_vdpa_sys_roce_disable(pci_addr) != 0) return -rte_errno; return 0; } -- 2.25.1