From patchwork Mon Feb 7 12:55:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 12737204 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ABF0EC433F5 for ; Mon, 7 Feb 2022 13:04:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1447886AbiBGNCF (ORCPT ); Mon, 7 Feb 2022 08:02:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1447279AbiBGM4W (ORCPT ); Mon, 7 Feb 2022 07:56:22 -0500 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2060.outbound.protection.outlook.com [40.107.93.60]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 528B4C043188 for ; Mon, 7 Feb 2022 04:56:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DKxvvufyHvZ0WPtWw8YqnZd1/1lcMd6qS95AH7rLVzsEafYwwPJW/B6qYO3nVSE/SkHShBfIrQ3KZy+6ZpVMjeY+qvO/C3gBH6SG+HnWVVbT/VLraEZru0RvcahNNa2KKIaiMYn3EwsjZ4aPDOSyF09hRPoBNJv6ed2eFkAlkFczWSy4+SWQcSrMvQ5khXzY+Lgf1LXA3aVAoVruhx8jnjvrlgAiCsa5RbHybp79Ht7sFInfhbJCgddUFvz6VXKYZO4fERhRBDiPgzVcLufFv5pA+vDrWOEUqW4UAgZzNo59GNk7JU3q+9/1nTAb6XuofG8VfMRD+oJ65Nk/IpuymA== 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=cs3BKRYtJrvPD+AOS1IZwZWAgd0SO1sGjPgTG6j2N4I=; b=Ze9tPwEBzpjtfxblbfvMlGEMc+7Y3UqTr2mxoLlUTNONqrEuaNVKhJFjgmkD3xJW8PrKUZLpoEhlEdfkxI2yTaOXHUnJ2P1xL1kGrswpeDMyiyx++jVUO0xNccuMHF13JMA5TGPX+GOeMXG2aAdlltWxgFX5nay0jM4p8fWBy8QZHLjlbWOk/zG4grYmIl91hwAHjTDMeaBnY0yWCwlhllW68AHW3dS0KG3a7YQQoW4trW+fuCup5Z/tO4YnQVdcfhJvPEbnH+dp+WbhpMJ3E+tVt0nf9IXkUoeIEUqY7ZwSnGCaoQaz7HyWsrZMgdncdmg7CP2qBLRyZgx+/03Z2w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.234) smtp.rcpttodomain=redhat.com 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=cs3BKRYtJrvPD+AOS1IZwZWAgd0SO1sGjPgTG6j2N4I=; b=rkhbeepB22zD/VxDFEW2pTxZbo5FTX/QYVARLfsOT8jpPtQIF+LUg3mUHE69+h2Axoj4uywTRNrwCpnB6diLUg/G2nWqVEYNdTlMRJFvpVRpIv9mpkKMtqzmAWlBhTFSPRHrei1ZTf0lT7DJMJLTfe+7mYbaOHTaZmvcH7GKWzJ0BrD4DL0Kfq0A4J/zQ51DgnBZgr2uE/PaZP3/cFkf4c8pYBTZOCEAJfNMkNjm0bOzA9FlpNSgCTg/qeZ/LDBOaORb/Gz+kt0XqjeGPr8bFfGKNxguxNq4lJ8cA63ffGuYF//TcR+rjxC8P1ZAX/RGAp4UIOhhePxSZIdXdSGLrA== Received: from MWHPR19CA0008.namprd19.prod.outlook.com (2603:10b6:300:d4::18) by BN6PR12MB1268.namprd12.prod.outlook.com (2603:10b6:404:1a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.11; Mon, 7 Feb 2022 12:56:19 +0000 Received: from CO1NAM11FT044.eop-nam11.prod.protection.outlook.com (2603:10b6:300:d4:cafe::b0) by MWHPR19CA0008.outlook.office365.com (2603:10b6:300:d4::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.18 via Frontend Transport; Mon, 7 Feb 2022 12:56:18 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.234) 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.234 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.234; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.234) by CO1NAM11FT044.mail.protection.outlook.com (10.13.175.188) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4951.12 via Frontend Transport; Mon, 7 Feb 2022 12:56:18 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 7 Feb 2022 12:56:18 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9; Mon, 7 Feb 2022 04:56:17 -0800 Received: from vdi.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server id 15.2.986.9 via Frontend Transport; Mon, 7 Feb 2022 04:56:15 -0800 From: Eli Cohen To: , CC: , , Eli Cohen , Jianbo Liu Subject: [PATCH 1/3] vdpa: Remove unsupported command line option Date: Mon, 7 Feb 2022 14:55:35 +0200 Message-ID: <20220207125537.174619-2-elic@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207125537.174619-1-elic@nvidia.com> References: <20220207125537.174619-1-elic@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 399805f5-7070-41d2-68d4-08d9ea393bda X-MS-TrafficTypeDiagnostic: BN6PR12MB1268:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:510; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hZXTpCpKxj3q9bDrqRBVjebcT3TeNocyp5K+3gpEu0wXndqrRhjQUtfxoh+KNFH3Vqn/8Hhh2Vhqh83cxV9lg21eHJ1iJ19uzcI6XQCt1XaL/liDFPIVPVrfI+03n/sWv/NZ/NEYGiwuufiIQIebPyIFYZpLm6NnxEjMeX7r4EVs3umW5ufUp7Tya7eHc9sQHfyy2sFWs5wD/LpPQjA+goO3RWoFlF3rNIgIBZVYr7SOCe3GnxJ0598V+1M2X4HXwSr936sz3zMUX+CxKMuCZf2cMnc1W8XlvoowgZnQORDRS8hrg4XyjjoSTK4sfGaMV+J/WD+2+iEN1CrZtcxnuc+i5eLPtx0EephVSWn0vyCv/vvbep9Ef5sYTCFF2Wgl+VNMb51uXhc9xGXWUdTk6iRRJwt6H841QxlVuMQakC3/cmMZf+L/EHvCG2rbfPv8XamXbRo8AjIQlsusZYBaMCtRXSAzs+hUNvpXivh67o76cWJqvNEsaRtiXTprYHVg05kfiN/ikeKZQEaWJ7Wb++tou9rmZ1vfZlCuU4FVSxX3JqtfeEgFtq1zcUOOnNfpaClemTGO+lgjIcz3OcGIXnvNduhGVXulmpND+cgVrw68qrDCGR9oj+wHUEe/ZAf4M04xtGcsxCaa4JlWl0eYg+m2TfFbcvJbiTgaR7pkn/JXg9q1qOhrzPvtup0Jb4kb/WJF4rcFg/wDNY3gHyhQoA== X-Forefront-Antispam-Report: CIP:12.22.5.234;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:mail.nvidia.com;PTR:InfoNoRecords;CAT:NONE;SFS:(13230001)(4636009)(40470700004)(36840700001)(46966006)(4326008)(1076003)(426003)(336012)(186003)(2616005)(36860700001)(107886003)(5660300002)(26005)(81166007)(356005)(47076005)(83380400001)(86362001)(70586007)(70206006)(8936002)(8676002)(40460700003)(6666004)(2906002)(7696005)(4744005)(82310400004)(508600001)(316002)(36756003)(54906003)(110136005)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2022 12:56:18.6590 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 399805f5-7070-41d2-68d4-08d9ea393bda 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.234];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT044.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1268 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org "-v[erbose]" option is not supported. Remove it. Reviewed-by: Jianbo Liu Signed-off-by: Eli Cohen Acked-by: Jason Wang --- vdpa/vdpa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vdpa/vdpa.c b/vdpa/vdpa.c index f048e470c929..4ccb564872a0 100644 --- a/vdpa/vdpa.c +++ b/vdpa/vdpa.c @@ -711,7 +711,7 @@ static void help(void) fprintf(stderr, "Usage: vdpa [ OPTIONS ] OBJECT { COMMAND | help }\n" "where OBJECT := { mgmtdev | dev }\n" - " OPTIONS := { -V[ersion] | -n[o-nice-names] | -j[son] | -p[retty] | -v[erbose] }\n"); + " OPTIONS := { -V[ersion] | -n[o-nice-names] | -j[son] | -p[retty] }\n"); } static int vdpa_cmd(struct vdpa *vdpa, int argc, char **argv) From patchwork Mon Feb 7 12:55:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 12737205 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85420C41535 for ; Mon, 7 Feb 2022 13:04:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1447855AbiBGNCB (ORCPT ); Mon, 7 Feb 2022 08:02:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1447284AbiBGM4Y (ORCPT ); Mon, 7 Feb 2022 07:56:24 -0500 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam07on2058.outbound.protection.outlook.com [40.107.95.58]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6290DC043181 for ; Mon, 7 Feb 2022 04:56:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gAXCB6maPPKxm4JdbwtSsBKN/jZ1Cdw2BgEXlyP7RpK43kSwAzI+4wk9K5r027h7OONjDcqRdmk0QG4E3Tbw0pXVK83g5hwy8nB7MsGHGu/1myiotoTtF+r04aTSW/HqKrAtJisH3R7yvnt5wSLvUZgRRytEwzUv30YFr8TTr/z/oxl79l1vU9mpuSjE8W6+Q03onjRUYG6yS6/nc9gd2b7gnPHcbLqEQ7BAanpSN2oAdgPC7C4/jS3RIDo1Lytxcg7poDLLl6VRNl6t7ZZ6Mg0G8LxOgwW6f2N9mK+Uv9kN0JjbFy0m7c0BTTDsgEOFMs2aDPQ5x4TfsdUlS3URRQ== 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=SWLqnuJ3ykJnW5siipkQ2N8gauNfPYAN7oUheCWCBpk=; b=MsnmLAw/z0FrNmwRsi2rzodYlm3m5s1Pa4sqsGW+yPP52DpRvg1IuzNeyP071OcfzGPoKDgRkakkexb+H1po/sI6L84xfbuSeFgntXhF4arTYjHy3AtQvjFdidIVNs39nsf8IytvhJIfpyDA845hfUXNPlfxgY8Sw6Rk4RrKz/dmXE+JSdA6HF4EmUsrre+gDt/p/f10OhYVnqcX2sJqbt+s3REX9eunvNQ8JlTrmoAtTS8rEKoMtrE7xrFbeTgvxQ4l3IbDLfW2b3HRi+nAF+zaDTPVXpi0no3MtiX/71aZstFUqGWtYAWize1NtkFFffLnBF14FmT7DyHBCOHEzg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) smtp.rcpttodomain=redhat.com 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=SWLqnuJ3ykJnW5siipkQ2N8gauNfPYAN7oUheCWCBpk=; b=fmiw2FEjzOrnrnGZb4bvLks/mEnirDb5RlmlhnWmWsypdquc0M8jFNv3qG40Q0jhXdGgLoNh9WsEhySKmuwSPiQP+ukiWebA/rtQjpo+BQKf3lzui4SaKWilFzb1g9bpTiXphuselnrs4VOw2sxctkLIDu6nrt8cuJUhA0ZrgebVNWLOKHMJ/RAvkepQe1ZFFjh10zJWxSfcvJ4mXCDJD7hRDpxKGccUW+TpdiTxQHNni24037h/smJnXk4vR9SFM4Kf2pxhGoXbC93wF+WbfUCS6mVbbIx3pg6zuPtNhiT0ED8sNw0WqwR+jX9G/Ny9aSr4ouRg6alArYqzUJZsFQ== Received: from MW2PR16CA0027.namprd16.prod.outlook.com (2603:10b6:907::40) by BY5PR12MB4209.namprd12.prod.outlook.com (2603:10b6:a03:20d::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.11; Mon, 7 Feb 2022 12:56:21 +0000 Received: from CO1NAM11FT066.eop-nam11.prod.protection.outlook.com (2603:10b6:907:0:cafe::f0) by MW2PR16CA0027.outlook.office365.com (2603:10b6:907::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.18 via Frontend Transport; Mon, 7 Feb 2022 12:56:21 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) 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.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.235) by CO1NAM11FT066.mail.protection.outlook.com (10.13.175.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4951.12 via Frontend Transport; Mon, 7 Feb 2022 12:56:21 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 7 Feb 2022 12:56:20 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail202.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9; Mon, 7 Feb 2022 04:56:20 -0800 Received: from vdi.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server id 15.2.986.9 via Frontend Transport; Mon, 7 Feb 2022 04:56:18 -0800 From: Eli Cohen To: , CC: , , Eli Cohen , Jianbo Liu Subject: [PATCH 2/3] virtio: Define bit numbers for device independent features Date: Mon, 7 Feb 2022 14:55:36 +0200 Message-ID: <20220207125537.174619-3-elic@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207125537.174619-1-elic@nvidia.com> References: <20220207125537.174619-1-elic@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 986a0335-b3bd-4a8d-78ab-08d9ea393d61 X-MS-TrafficTypeDiagnostic: BY5PR12MB4209:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2294brMmk19YxS5FnzWj3IA8be2hU4D43adUFtlrgsh23ITXho4X7zekJ7Zhj1YCphnMvfQz10FuZXi8LX/lj4271pU/ZT4ojQpxRkJ+pzKOW3vdUdcLueRkz3kvn45I4Vw+NUreR7Pdvbuo8xDuql7wP5lE3Y1g4u9V5KXAbtoTmPwGYEDhFazYkm/4DZpmjkMrDJ9qO48+vGa4iKgeivXXZd/Eib0JR7cC97pcfGb3f8gH8Px5hAQ2T/mL/RhmgfhVWNkBfnoEf0709pEuEIXNfABRN0ZS789q1BXIyT3fyeOtObbI3hBLLYvrPvmWV7N+QLx5bS7C1lh89wCLqKkaIVL+J2dsTs/k6LiytnMqA7MwlC6Y+2mqxnxD+agTyU9UIlKaTWuqRGXEEUirGJs2XSzrDhAAtrMMVNlQ344ETWhn4gl4gl4CsiHN9d9V9wrETUNjhEobdXhZ9YtjBLjWOqVLUizUgWsIDJAvl/jtWodgoB1Jz2TAPkUSDbxXG5oaJQN1ljk8ZgL4JG4oxAUyh5p1fOF2/X3Hj4fSPIjnTtrh/sp5B2FjGn4ymLMvV0ES4yLmqs+iZte+mzWjNFxnbKjiHEoQzPJ1kJrleaB6QJKNzUMFf36xtbF2Jn8MsD+EKJxxbtzrptrVvA82jiPo6UMz1F15eXYKJLWouG5v98VIQ0A5J/1LzTa6pryqNkN3NdP3XG/9pWfKiJgi/g== X-Forefront-Antispam-Report: CIP:12.22.5.235;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:mail.nvidia.com;PTR:InfoNoRecords;CAT:NONE;SFS:(13230001)(4636009)(40470700004)(46966006)(36840700001)(83380400001)(81166007)(47076005)(356005)(5660300002)(107886003)(186003)(2616005)(1076003)(26005)(336012)(426003)(2906002)(36756003)(40460700003)(6666004)(110136005)(4326008)(316002)(7696005)(86362001)(70586007)(70206006)(36860700001)(82310400004)(8676002)(8936002)(54906003)(508600001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2022 12:56:21.2375 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 986a0335-b3bd-4a8d-78ab-08d9ea393d61 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.235];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT066.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4209 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Define bit fields for device independent feature bits. We need them in a follow up patch. Also, define macros for start and end of these feature bits. Reviewed-by: Jianbo Liu Signed-off-by: Eli Cohen --- include/uapi/linux/virtio_config.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/uapi/linux/virtio_config.h b/include/uapi/linux/virtio_config.h index 3bf6c8bf8477..6d92cc31a8d3 100644 --- a/include/uapi/linux/virtio_config.h +++ b/include/uapi/linux/virtio_config.h @@ -45,14 +45,14 @@ /* We've given up on this device. */ #define VIRTIO_CONFIG_S_FAILED 0x80 -/* - * Virtio feature bits VIRTIO_TRANSPORT_F_START through - * VIRTIO_TRANSPORT_F_END are reserved for the transport - * being used (e.g. virtio_ring, virtio_pci etc.), the - * rest are per-device feature bits. - */ -#define VIRTIO_TRANSPORT_F_START 28 -#define VIRTIO_TRANSPORT_F_END 38 +/* Device independent features per virtio spec 1.1 range from 28 to 38 */ +#define VIRTIO_DEV_INDEPENDENT_F_START 28 +#define VIRTIO_DEV_INDEPENDENT_F_END 38 + +#define VIRTIO_F_RING_INDIRECT_DESC 28 +#define VIRTIO_F_RING_EVENT_IDX 29 +#define VIRTIO_F_IN_ORDER 35 +#define VIRTIO_F_NOTIFICATION_DATA 38 #ifndef VIRTIO_CONFIG_NO_LEGACY /* Do we get callbacks when the ring is completely used, even if we've From patchwork Mon Feb 7 12:55:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 12737203 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3A7EC4167B for ; Mon, 7 Feb 2022 13:04:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443778AbiBGNBv (ORCPT ); Mon, 7 Feb 2022 08:01:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1447293AbiBGM41 (ORCPT ); Mon, 7 Feb 2022 07:56:27 -0500 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2046.outbound.protection.outlook.com [40.107.237.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED44CC043181 for ; Mon, 7 Feb 2022 04:56:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MzYL8Pl9E8EsiHCQv/fiygfcgT9yeELLd73u1bBJy2lvL0wXZH2DpDaD7+2GZu91HqjeC0OjRloa+EMVkPSOWPCtJwzbmoZjlBuxX62f7oCBl28jtc7yeIJH9jk0Cc9sfZWAe5Pix0q87CwMwOyPLibgYSr/Xcpv4YCfdEpa1IymIZBL9yVtsXUMIEggom9FPdw92obZfIusdwFhk+Pi/zTYefqSE9Mmok+9P95qAMVi0s6ybKuwvRnPsm2xf8m0hIfYKx9gGQgG1qZSALIB+oyuIVq9qAg+uuwH+YDdwzbtUH83KL8neeMKeP5JPt+1/re9x3qdbFlirGLRXxlxVA== 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=soL2TRuh0Wlb/hoeGCmDtuVNaKP0S2wNTvBrecMhYPk=; b=E/vfFBQJVYQrNTAZ4ryGGp32wzBkL0lQEq5bxy1VSxySIn9uJSzTcyaYkbFl3AL2CRFbr8UbqONiG12H36D9TEhLrFV25t5+8PtfkLakrstWRSWGdPdP5on7t6gNu+wl/QQpfT+nBKhlXCdagn7rjS/c6izq5TLATEt5r0xrBQgAu7c7X/K6+1ZlNBTjKu0K1U1FC3FITHeV3z12ffXsUNB3Wm46XRp4P2v7uEBek41BHWdgwklk8WVLT2F0WKUwTYgmHbjFFAUKAHFvEy8MLz89FwdzkkNeXPnoXGdRjvp4VSuuFzEMUA0ofI8J076xeH+jqWYKBjxDLQrjj31AiA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.236) smtp.rcpttodomain=redhat.com 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=soL2TRuh0Wlb/hoeGCmDtuVNaKP0S2wNTvBrecMhYPk=; b=U01naGTDgGAGnTL8GrouiYTGdp//NlX9H4Ae2KFvl3xZG4nGD2WGnUkFgwPYyuGfhWNaDBiCM5tMWZtJxUe1fPcEBkmAREr8rwJ51WRGTEMAnl9RI76Q5751sGh01KWAKKjxG1KbNLBsmsxaVok6SWI88iYqzo0LuKN2kUVqoyXl8CBf3lG5G49VaYoOwskm600YcZA5xG5oQjCIFow3OS3siltgrKO/2daioBR5kVWCcQCmdtUoQnb7NyRCATAFQaAUpURLBonQx57TpBBrELJkBTmNR+MK1jeCAOiF+Ml73JfPDTLSx7OkGtv00T/J2PEiajbvEBvHlosqxLuhbA== Received: from MW4PR04CA0178.namprd04.prod.outlook.com (2603:10b6:303:85::33) by BYAPR12MB3157.namprd12.prod.outlook.com (2603:10b6:a03:130::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.17; Mon, 7 Feb 2022 12:56:23 +0000 Received: from CO1NAM11FT046.eop-nam11.prod.protection.outlook.com (2603:10b6:303:85:cafe::3c) by MW4PR04CA0178.outlook.office365.com (2603:10b6:303:85::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.17 via Frontend Transport; Mon, 7 Feb 2022 12:56:23 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.236) 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.236 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.236; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.236) by CO1NAM11FT046.mail.protection.outlook.com (10.13.174.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4951.12 via Frontend Transport; Mon, 7 Feb 2022 12:56:23 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL109.nvidia.com (10.27.9.19) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 7 Feb 2022 12:56:22 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9; Mon, 7 Feb 2022 04:56:22 -0800 Received: from vdi.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server id 15.2.986.9 via Frontend Transport; Mon, 7 Feb 2022 04:56:20 -0800 From: Eli Cohen To: , CC: , , Eli Cohen , Jianbo Liu Subject: [PATCH 3/3] vdpa: Add support to configure max number of VQs Date: Mon, 7 Feb 2022 14:55:37 +0200 Message-ID: <20220207125537.174619-4-elic@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207125537.174619-1-elic@nvidia.com> References: <20220207125537.174619-1-elic@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 788b4d2b-5bb0-4f0b-532e-08d9ea393eb0 X-MS-TrafficTypeDiagnostic: BYAPR12MB3157:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2276; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Lh4EmgZ3wAVchQ/PFnf3+jplThMLOMrm3WgXeLz8Q8Hm/TCcmFTRFFZ5f9BwI5nRvc3p/ay41zYhYnaVe9hG0uYggF4beOKpAC7tRj0qcrGwrN5RxYP6XptAcBw/8QfwOMCy75A1H8LIhs4NkQTf+UrXfNXEOA4Trd6Dvg8m0G+rJ87kKJgMueTfR4WoP9gjbhjxPV4Zf3Ba0vNq6uBY15sO7Yifl22ra1fbayLmB/lktRonwy49xJhZVNUGKdHwrL/J1DXtWCusaLApAUrCkxGeYXaauGwZ1sJYj3LYOD3O+2MwYW6CPxVQh0f3m/jinqh81oAdBklizijv1L3TxSDywe1jA7Q/tLDSi6nHCPWO8/TllC8ED/FDZPDEJi57xj8dI2N8PIvTVV1uxMJWtyGlz6azFBPiTF6GJ42hrx3PNjg0z3JMfaQkleRzItlZN8Rkp0wWOODhMCbJzgmXT6pWSdkuft3xhKatsPoJSXbVB5nlhAXBBcCh7QneBJGuPj/SMaSTtIMfFpCVlUZSg71m+5An/P+yb51OsG8MWfWS9Y2D3IVLJJ0VDKTmFLXcb5h/2kWSvpQqXvrwT4qjRDyk5MOrsPHcMmMixKff85wU/F26/tp8UaIe19VkksL7tiX/z7OBdxE1cndf7WNTz7P4TX3BV6p9j1QJWTWfHR/OfLtA919GNmHW93h2jgRESVv+BM+eYLiP7jBsJDy5sg== X-Forefront-Antispam-Report: CIP:12.22.5.236;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:mail.nvidia.com;PTR:InfoNoRecords;CAT:NONE;SFS:(13230001)(4636009)(40470700004)(46966006)(36840700001)(110136005)(1076003)(54906003)(47076005)(186003)(36756003)(40460700003)(316002)(86362001)(6666004)(70586007)(70206006)(8676002)(4326008)(336012)(82310400004)(2906002)(356005)(26005)(8936002)(7696005)(36860700001)(426003)(508600001)(2616005)(107886003)(5660300002)(81166007)(83380400001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2022 12:56:23.4008 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 788b4d2b-5bb0-4f0b-532e-08d9ea393eb0 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.236];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT046.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB3157 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add support to configure max supported virtqueue pairs for a vdpa device. For this to be possible, add support for reading management device's capabilities. Management device capabilities give the user a hint as to how many virtqueue pairs at most he can ask for. Using this information the user can choose a valid number of virtqueue pairs when creating the device. Examples: - Show management device capabiliteis: $ vdpa mgmtdev show auxiliary/mlx5_core.sf.1: supported_classes net max_supported_vqs 257 dev_features CSUM GUEST_CSUM MTU HOST_TSO4 HOST_TSO6 STATUS CTRL_VQ \ MQ CTRL_MAC_ADDR VERSION_1 ACCESS_PLATFORM A user can now create a device based on the above information. In the above case 128 virtqueue pairs at most. The other VQ being for the control virtqueue. - Add a vdpa device with 16 data virtqueue pairs $ vdpa dev add name vdpa-a mgmtdev auxiliary/mlx5_core.sf.1 max_vqp 16 After feature negotiation has been completed, one can read the vdpa configuration using: $ vdpa dev config show vdpa-a: mac 00:00:00:00:88:88 link up link_announce false max_vq_pairs 16 mtu 1500 negotiated_features CSUM GUEST_CSUM MTU MAC HOST_TSO4 HOST_TSO6 STATUS CTRL_VQ MQ CTRL_MAC_ADDR VERSION_1 ACCESS_PLATFORM Reviewed-by: Jianbo Liu Signed-off-by: Eli Cohen --- vdpa/include/uapi/linux/vdpa.h | 4 ++ vdpa/vdpa.c | 113 ++++++++++++++++++++++++++++++++- 2 files changed, 114 insertions(+), 3 deletions(-) diff --git a/vdpa/include/uapi/linux/vdpa.h b/vdpa/include/uapi/linux/vdpa.h index b7eab069988a..171122dd03c9 100644 --- a/vdpa/include/uapi/linux/vdpa.h +++ b/vdpa/include/uapi/linux/vdpa.h @@ -40,6 +40,10 @@ enum vdpa_attr { VDPA_ATTR_DEV_NET_CFG_MAX_VQP, /* u16 */ VDPA_ATTR_DEV_NET_CFG_MTU, /* u16 */ + VDPA_ATTR_DEV_NEGOTIATED_FEATURES, /* u64 */ + VDPA_ATTR_DEV_MGMTDEV_MAX_VQS, /* u32 */ + VDPA_ATTR_DEV_SUPPORTED_FEATURES, /* u64 */ + /* new attributes must be added above here */ VDPA_ATTR_MAX, }; diff --git a/vdpa/vdpa.c b/vdpa/vdpa.c index 4ccb564872a0..d0dd4196610f 100644 --- a/vdpa/vdpa.c +++ b/vdpa/vdpa.c @@ -23,6 +23,7 @@ #define VDPA_OPT_VDEV_HANDLE BIT(3) #define VDPA_OPT_VDEV_MAC BIT(4) #define VDPA_OPT_VDEV_MTU BIT(5) +#define VDPA_OPT_MAX_VQP BIT(6) struct vdpa_opts { uint64_t present; /* flags of present items */ @@ -32,6 +33,7 @@ struct vdpa_opts { unsigned int device_id; char mac[ETH_ALEN]; uint16_t mtu; + uint16_t max_vqp; }; struct vdpa { @@ -78,6 +80,9 @@ static const enum mnl_attr_data_type vdpa_policy[VDPA_ATTR_MAX + 1] = { [VDPA_ATTR_DEV_VENDOR_ID] = MNL_TYPE_U32, [VDPA_ATTR_DEV_MAX_VQS] = MNL_TYPE_U32, [VDPA_ATTR_DEV_MAX_VQ_SIZE] = MNL_TYPE_U16, + [VDPA_ATTR_DEV_NEGOTIATED_FEATURES] = MNL_TYPE_U64, + [VDPA_ATTR_DEV_MGMTDEV_MAX_VQS] = MNL_TYPE_U32, + [VDPA_ATTR_DEV_SUPPORTED_FEATURES] = MNL_TYPE_U64, }; static int attr_cb(const struct nlattr *attr, void *data) @@ -219,6 +224,8 @@ static void vdpa_opts_put(struct nlmsghdr *nlh, struct vdpa *vdpa) sizeof(opts->mac), opts->mac); if (opts->present & VDPA_OPT_VDEV_MTU) mnl_attr_put_u16(nlh, VDPA_ATTR_DEV_NET_CFG_MTU, opts->mtu); + if (opts->present & VDPA_OPT_MAX_VQP) + mnl_attr_put_u16(nlh, VDPA_ATTR_DEV_NET_CFG_MAX_VQP, opts->max_vqp); } static int vdpa_argv_parse(struct vdpa *vdpa, int argc, char **argv, @@ -287,6 +294,14 @@ static int vdpa_argv_parse(struct vdpa *vdpa, int argc, char **argv, NEXT_ARG_FWD(); o_found |= VDPA_OPT_VDEV_MTU; + } else if ((matches(*argv, "max_vqp") == 0) && (o_optional & VDPA_OPT_MAX_VQP)) { + NEXT_ARG_FWD(); + err = vdpa_argv_u16(vdpa, argc, argv, &opts->max_vqp); + if (err) + return err; + + NEXT_ARG_FWD(); + o_found |= VDPA_OPT_MAX_VQP; } else { fprintf(stderr, "Unknown option \"%s\"\n", *argv); return -EINVAL; @@ -385,6 +400,77 @@ static const char *parse_class(int num) return class ? class : "< unknown class >"; } +static const char * const net_feature_strs[64] = { + [VIRTIO_NET_F_CSUM] = "CSUM", + [VIRTIO_NET_F_GUEST_CSUM] = "GUEST_CSUM", + [VIRTIO_NET_F_CTRL_GUEST_OFFLOADS] = "CTRL_GUEST_OFFLOADS", + [VIRTIO_NET_F_MTU] = "MTU", + [VIRTIO_NET_F_MAC] = "MAC", + [VIRTIO_NET_F_GUEST_TSO4] = "GUEST_TSO4", + [VIRTIO_NET_F_GUEST_TSO6] = "GUEST_TSO6", + [VIRTIO_NET_F_GUEST_ECN] = "GUEST_ECN", + [VIRTIO_NET_F_GUEST_UFO] = "GUEST_UFO", + [VIRTIO_NET_F_HOST_TSO4] = "HOST_TSO4", + [VIRTIO_NET_F_HOST_TSO6] = "HOST_TSO6", + [VIRTIO_NET_F_HOST_ECN] = "HOST_ECN", + [VIRTIO_NET_F_HOST_UFO] = "HOST_UFO", + [VIRTIO_NET_F_MRG_RXBUF] = "MRG_RXBUF", + [VIRTIO_NET_F_STATUS] = "STATUS", + [VIRTIO_NET_F_CTRL_VQ] = "CTRL_VQ", + [VIRTIO_NET_F_CTRL_RX] = "CTRL_RX", + [VIRTIO_NET_F_CTRL_VLAN] = "CTRL_VLAN", + [VIRTIO_NET_F_CTRL_RX_EXTRA] = "CTRL_RX_EXTRA", + [VIRTIO_NET_F_GUEST_ANNOUNCE] = "GUEST_ANNOUNCE", + [VIRTIO_NET_F_MQ] = "MQ", + [VIRTIO_F_NOTIFY_ON_EMPTY] = "NOTIFY_ON_EMPTY", + [VIRTIO_NET_F_CTRL_MAC_ADDR] = "CTRL_MAC_ADDR", + [VIRTIO_F_ANY_LAYOUT] = "ANY_LAYOUT", + [VIRTIO_NET_F_RSC_EXT] = "RSC_EXT", + [VIRTIO_NET_F_STANDBY] = "STANDBY", +}; + +#define VDPA_EXT_FEATURES_SZ (VIRTIO_DEV_INDEPENDENT_F_END - \ + VIRTIO_DEV_INDEPENDENT_F_START + 1) + +static const char * const ext_feature_strs[VDPA_EXT_FEATURES_SZ] = { + [VIRTIO_F_RING_INDIRECT_DESC - VIRTIO_DEV_INDEPENDENT_F_START] = "RING_INDIRECT_DESC", + [VIRTIO_F_RING_EVENT_IDX - VIRTIO_DEV_INDEPENDENT_F_START] = "RING_EVENT_IDX", + [VIRTIO_F_VERSION_1 - VIRTIO_DEV_INDEPENDENT_F_START] = "VERSION_1", + [VIRTIO_F_ACCESS_PLATFORM - VIRTIO_DEV_INDEPENDENT_F_START] = "ACCESS_PLATFORM", + [VIRTIO_F_RING_PACKED - VIRTIO_DEV_INDEPENDENT_F_START] = "RING_PACKED", + [VIRTIO_F_IN_ORDER - VIRTIO_DEV_INDEPENDENT_F_START] = "IN_ORDER", + [VIRTIO_F_ORDER_PLATFORM - VIRTIO_DEV_INDEPENDENT_F_START] = "ORDER_PLATFORM", + [VIRTIO_F_SR_IOV - VIRTIO_DEV_INDEPENDENT_F_START] = "SR_IOV", + [VIRTIO_F_NOTIFICATION_DATA - VIRTIO_DEV_INDEPENDENT_F_START] = "NOTIFICATION_DATA", +}; + +static void print_net_features(struct vdpa *vdpa, uint64_t features, bool maxf) +{ + const char *s; + int i; + + if (maxf) + pr_out_array_start(vdpa, "dev_features"); + else + pr_out_array_start(vdpa, "negotiated_features"); + + for (i = 0; i < 64; i++) { + if (!(features & (1ULL << i))) + continue; + + if (i >= VIRTIO_DEV_INDEPENDENT_F_START && i <= VIRTIO_DEV_INDEPENDENT_F_END) + s = ext_feature_strs[i - VIRTIO_DEV_INDEPENDENT_F_START]; + else + s = net_feature_strs[i]; + + if (!s) + print_uint(PRINT_ANY, NULL, " unrecognized_bit_%d", i); + else + print_string(PRINT_ANY, NULL, " %s", s); + } + pr_out_array_end(vdpa); +} + static void pr_out_mgmtdev_show(struct vdpa *vdpa, const struct nlmsghdr *nlh, struct nlattr **tb) { @@ -408,6 +494,22 @@ static void pr_out_mgmtdev_show(struct vdpa *vdpa, const struct nlmsghdr *nlh, pr_out_array_end(vdpa); } + if (tb[VDPA_ATTR_DEV_MGMTDEV_MAX_VQS]) { + uint16_t num_vqs; + + if (!vdpa->json_output) + printf("\n"); + num_vqs = mnl_attr_get_u16(tb[VDPA_ATTR_DEV_MGMTDEV_MAX_VQS]); + print_uint(PRINT_ANY, "max_supported_vqs", " max_supported_vqs %d", num_vqs); + } + + if (tb[VDPA_ATTR_DEV_SUPPORTED_FEATURES]) { + uint64_t features; + + features = mnl_attr_get_u64(tb[VDPA_ATTR_DEV_SUPPORTED_FEATURES]); + print_net_features(vdpa, features, true); + } + pr_out_handle_end(vdpa); } @@ -557,7 +659,7 @@ static int cmd_dev_add(struct vdpa *vdpa, int argc, char **argv) NLM_F_REQUEST | NLM_F_ACK); err = vdpa_argv_parse_put(nlh, vdpa, argc, argv, VDPA_OPT_VDEV_MGMTDEV_HANDLE | VDPA_OPT_VDEV_NAME, - VDPA_OPT_VDEV_MAC | VDPA_OPT_VDEV_MTU); + VDPA_OPT_VDEV_MAC | VDPA_OPT_VDEV_MTU | VDPA_OPT_MAX_VQP); if (err) return err; @@ -579,9 +681,10 @@ static int cmd_dev_del(struct vdpa *vdpa, int argc, char **argv) return mnlu_gen_socket_sndrcv(&vdpa->nlg, nlh, NULL, NULL); } -static void pr_out_dev_net_config(struct nlattr **tb) +static void pr_out_dev_net_config(struct vdpa *vdpa, struct nlattr **tb) { SPRINT_BUF(macaddr); + uint64_t val_u64; uint16_t val_u16; if (tb[VDPA_ATTR_DEV_NET_CFG_MACADDR]) { @@ -610,6 +713,10 @@ static void pr_out_dev_net_config(struct nlattr **tb) val_u16 = mnl_attr_get_u16(tb[VDPA_ATTR_DEV_NET_CFG_MTU]); print_uint(PRINT_ANY, "mtu", "mtu %d ", val_u16); } + if (tb[VDPA_ATTR_DEV_NEGOTIATED_FEATURES]) { + val_u64 = mnl_attr_get_u64(tb[VDPA_ATTR_DEV_NEGOTIATED_FEATURES]); + print_net_features(vdpa, val_u64, false); + } } static void pr_out_dev_config(struct vdpa *vdpa, struct nlattr **tb) @@ -619,7 +726,7 @@ static void pr_out_dev_config(struct vdpa *vdpa, struct nlattr **tb) pr_out_vdev_handle_start(vdpa, tb); switch (device_id) { case VIRTIO_ID_NET: - pr_out_dev_net_config(tb); + pr_out_dev_net_config(vdpa, tb); break; default: break;