Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp804709pxb; Tue, 12 Apr 2022 13:57:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxjQR2tGYkb3MU+Sfe1QNoD14lwU/0+gsr4bL6CfNJms49f1GbecT1bXLjFV7EMrE8UCui X-Received: by 2002:a63:4c52:0:b0:398:db25:d2b8 with SMTP id m18-20020a634c52000000b00398db25d2b8mr33027642pgl.432.1649797033516; Tue, 12 Apr 2022 13:57:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1649797033; cv=pass; d=google.com; s=arc-20160816; b=bHIJc4lnITjZ/GZppCV0t4ATu+KSHghMab1TLgpCDh+Le548NrvWQr2SwHg9mgS4+2 CufMm64Cql8+t5SMZxUm2E1bGVm0ssF4R0S1t2dZRG4FEqNsg6DV/6LFD5y/wf1+kdhy 5wdKbD/rAbw8bY9UXFNv8Sw4As3Z8VaJBoB2jSpLQ6jqzQ0L5EJIbbxZKgk0TZvEuO+0 yA9UwxjtXZgYtUh9GnAllItB3ytcJ7VySXHDz09q2M7feQg61b4auTGfe2Pp/pCFNLfe 3AuW06yeq9GCv+dh8laWJ74pj8+vpUdZHVZY4Z0j+JrqCO3ABlFRWPzEvGzFz4bI7KQ7 U+XA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=tsKFe/5xJAgUALZkGb7KP+5SpfbIvfXoN4JmybCk9A0=; b=ym6xoAPCAntr3vY4u/BYRMbD7fn7fQjuWvG8IOZpmoi7UHYsO+XOwg134bNdISYbIv qcO2uRWDay1+qA9uAHptfCR4qLzbv6MN8I4LHTyyJHYRqpGYh8d5UXUHnF6aDNVuKvIz pAjZ5YCufqUZN5TzrHnp6esj8sH3u2duekRBx31o6r/Xfz4LmMj+zgfiojnSkYUX/Tq3 hXUKJrDUqlJzl9IqStIqvQ4aRcafSqqfVLZ48eq46XpGgx34Bgqtfq5nug1HLkMbbBUM +CojkXngbp6whkYM7lGhxv4nhbBzdB/EpB9JTMeqHQ+fQJ23Ly17ctdWl0Fj0iVBRIok 5vjg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=QQabdHkn; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id z13-20020a17090a1fcd00b001cb56b40005si11971543pjz.185.2022.04.12.13.57.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 13:57:13 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=QQabdHkn; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CB12B4A923; Tue, 12 Apr 2022 13:20:47 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355705AbiDLNRM (ORCPT + 99 others); Tue, 12 Apr 2022 09:17:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354998AbiDLNPw (ORCPT ); Tue, 12 Apr 2022 09:15:52 -0400 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2079.outbound.protection.outlook.com [40.107.244.79]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BEE317A92 for ; Tue, 12 Apr 2022 06:04:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FEpQCdNNJy4gAVr7ZXpGTVD4iIneL+phvRMN5WTZIXYePJxsLwqlfToST680AO+q7ecGePqqGOy2FBrdxFgWa8nQNKefjEPTIXBP6AxRaYLUMSrUS8OIIe7psL3u/WZqKgkEVRNIatC3avgkYy2rz7gVwJocms5BYNHMByV4qUzQpGaVPCgimWsO0YrloJ/h9oPRGFSP/pDeJwHVLMng+/pvBg+B0WVHthKsAtn8mi/78BifgvsGPq6L42xo/h2OICp6/NDed7BmlfjUrYD5Xy8JpJGzC9mXD1WMu8Anx2InaArEnoyea/QarwQZlfhbz0YyDnnry5IcMtUEq4b5mQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tsKFe/5xJAgUALZkGb7KP+5SpfbIvfXoN4JmybCk9A0=; b=iFvUgPsi4OU/bSQqLE3QR6XP3swnaLvHVm11tMFoPu+THMGYp9M+RvEluezN7rERKXO+YTSTQEOAsxZAHVne4U62VL4/pjap2X3vaq0isTlyV8srt3Fp+E5l8t6PyK43O0V5oKaguKkQfwUp7QK0fA53VCoFUNQsoX03pJL/HGny8+8mmln438sabdTgqJQhIpyn+Cl/v6WAzzSStnYi28EW9WA3/LrA7tsAZ6s5C6xfqywWiWh7yw6xZOC2MZSl821+0JWjPa6zMD1xMN267K8axmypilEI7mXLNRPqteOJ/5ADzzBQxSixuStD1y4E7VtTwNM29SoXb43rhUWBQw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.238) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject 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=tsKFe/5xJAgUALZkGb7KP+5SpfbIvfXoN4JmybCk9A0=; b=QQabdHkndiL9VVUx56q38iJW+fdKIEW5LFNU5oGVxSGIQt1U3387cuxQC2AeY9IiM5KFLOd4KxbehW6lrBM/9EGTP7tF92nhQsmQRDbe/o5v4KZ9WrrVRAsKMJX6rWEJ0+3Fo4jxJMG4vqVHSZzYdv31D8lshBDEgLSsXNmr5Wc8ketricMhpC7g6NQnCKPjsgNaXLcIJsZTNLbWraWUlGnKByCza/pI7bFfKsN4B7RxV16xEPD0FoWhvfLr4z3R9p7BiLol99EPWtomfxvesEf19h3CiUsnJW58eECMKuWpwqoSzzV5nvEQT45sHxf4ABorYiaLDov2gVU1y7ftnw== Received: from MW4PR04CA0370.namprd04.prod.outlook.com (2603:10b6:303:81::15) by BN6PR1201MB0259.namprd12.prod.outlook.com (2603:10b6:405:58::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.29; Tue, 12 Apr 2022 13:04:32 +0000 Received: from CO1NAM11FT030.eop-nam11.prod.protection.outlook.com (2603:10b6:303:81:cafe::92) by MW4PR04CA0370.outlook.office365.com (2603:10b6:303:81::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5164.18 via Frontend Transport; Tue, 12 Apr 2022 13:04:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.238) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.238 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.238; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.238) by CO1NAM11FT030.mail.protection.outlook.com (10.13.174.125) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5144.20 via Frontend Transport; Tue, 12 Apr 2022 13:04:31 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by DRHQMAIL105.nvidia.com (10.27.9.14) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 12 Apr 2022 13:04:31 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail204.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 12 Apr 2022 06:04:30 -0700 Received: from vdi.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.986.22 via Frontend Transport; Tue, 12 Apr 2022 06:04:28 -0700 From: Eli Cohen To: , CC: , , , Eli Cohen Subject: [PATCH v2 0/2] Show statistics for a vdpa device Date: Tue, 12 Apr 2022 16:04:00 +0300 Message-ID: <20220412130402.46945-1-elic@nvidia.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3b98c919-52a0-4414-f98b-08da1c84fc36 X-MS-TrafficTypeDiagnostic: BN6PR1201MB0259:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EuysE6y+Q+c1YL5XP6ALP9w6xQbQ+wO8tzhGR5qQdGjeWUS7XJLLkkqqyB0vjTjXc8m8ljU7QpfQdNgiJ+bHBDqgImYcCPCU0pqUokSb9Gq2ns0ZH9EItXX/B6IXudxOHrO4JZc5Gm9QYEDBq58xBsD9fneD46gz+9Xr8y9krtsTMN/o5xK1imzKPSXPnWc9FDJT/5dUOo6wfchCgBWoguxicfeeIvB5vfFZ6Lj7oydbz/H1poSPUcM1qChuGlaTwWcZe8EFlyN4xRbZbOGDOXqaVSmq6MY0YqrMATAEqfH9nDOUyBQ/FiRb9LEmhw9MmA0udDxwnxk0PaOIoqEbZpyKZoRQPb/qiJkSWfBUdwSHu84PvBUBxAGQTCVGwnLJPghZgDMzBQ2BUx1S0A2XoKJPE3anHFgiNhGv3I0l5H3PpD97alvSa4CzgAzbEC0cPosMByBKIP7l1xmIDn0YlpuoNSQbwiiFwiUnQjBj9YrN4zgOkCCd9XgWTUQTjochJMKgukMvZmQ6zcEmwEwp2OiCylaQSifz//Y7wTQk+NujgE9PbcYwVusvZ3jzXjabUW2iAfxaVd0VHDWlTU6O6QvZEUB++p3xSWQXvPsvaoG2WtHcykOljMjnqLU9fCvQoajOTD+h0zYzGciAc0VMSCZbt46WGrojD4NnT8bXC4ABqJhT/TskIXkq2UNk9yWBr3vlFM1iZKbTae7J2h0TPQ== X-Forefront-Antispam-Report: CIP:12.22.5.238;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:mail.nvidia.com;PTR:InfoNoRecords;CAT:NONE;SFS:(13230001)(4636009)(36840700001)(46966006)(40470700004)(107886003)(70206006)(70586007)(336012)(1076003)(110136005)(6666004)(186003)(4744005)(8936002)(2906002)(426003)(36756003)(4326008)(8676002)(5660300002)(356005)(36860700001)(26005)(47076005)(54906003)(86362001)(40460700003)(2616005)(7696005)(82310400005)(508600001)(316002)(81166007)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2022 13:04:31.7974 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3b98c919-52a0-4414-f98b-08da1c84fc36 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[12.22.5.238];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT030.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR1201MB0259 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following two patch series adds support to read vendor statistics for a vdpa device. The first patch lays the ground to allow an upstream driver to provide statistics in the form of an attribute name/attribute value pairs. The second patch implements this for mlx5_vdpa which gives received descriptors and completed descriptors information for all the virtqueues. v1->v2: Return negotiated features and max virtqueue pairs in each stats record to aid userspace in determining if this is a data or control virtqueue. Eli Cohen (2): vdpa: Add support for querying vendor statistics vdpa/mlx5: Add support for reading descriptor statistics drivers/vdpa/mlx5/core/mlx5_vdpa.h | 2 + drivers/vdpa/mlx5/net/mlx5_vnet.c | 165 +++++++++++++++++++++++++++++ drivers/vdpa/vdpa.c | 129 ++++++++++++++++++++++ include/linux/mlx5/mlx5_ifc.h | 1 + include/linux/mlx5/mlx5_ifc_vdpa.h | 39 +++++++ include/linux/vdpa.h | 5 + include/uapi/linux/vdpa.h | 6 ++ 7 files changed, 347 insertions(+) -- 2.35.1