Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6032757ybv; Wed, 12 Feb 2020 04:53:23 -0800 (PST) X-Google-Smtp-Source: APXvYqwKEIlSh54oDRCIockCsVmZ4FVCSJZppX+2QXPLg/97rnS1HpCVLhrSGP4fKApNNw0JPxqW X-Received: by 2002:a05:6808:4c7:: with SMTP id a7mr6152574oie.83.1581512003549; Wed, 12 Feb 2020 04:53:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1581512003; cv=pass; d=google.com; s=arc-20160816; b=taxE8lo5NNEXLQfsn8cbX2Rusxp3wS6iQ2D+ccQQaFhxUNPJiZmTFkML3OxdP+fZXv 5QJjWJXQHOGf7z0Qm7kj2+6JEgyrn6YsLSHP0gH85lSNJJ/Bf40ANUiQmQMeqsHn8XeR eeGQi8aa7Gqx1ACyY9i9DzvaKamNxAp2ZCigY1CCGMHRyzvon9ozZBnpJr9Gy9KyEoyK s343RIkuAAD8+xH7sDsyvHdmrU1hzdXRMPx1RmhFW1zozvw3zav9CQbfstOOCwWQOP+g A2VMiPyMRcByVL6VplL33zFvf5TAfz9dBsqvlY+mRpe6MP4K5XX+8uooCdPP3dEMXqse nTog== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:in-reply-to :content-disposition:references:message-id:subject:cc:to:from:date :dkim-signature; bh=raNv4B1CGya4jkTomUvQp5srpXT78rPNqVMaS88pbdk=; b=MHDvBfUibDlFMoCECk7xq62J98/uv4aXucT4rW9JE+0kx1zSmYWt+lu9Djt2xkpyHu RZCJ/RckOb3Z3wz/QuH/wfYkwRegFUoKq1cxEdEUAHBefebQyvKJPfwvwy0LtYVDqwgh qOpTHO70MXNZdageSijhI8v32HR4bXoXG9Ix4F8n5mI45kGSNr8KY/GukXkGfX67K9gC OWviEIbpBRdndNpJecitLB/JhhXb3/d9fHrYY3unhSTjPD61OjyJ5dmDR6edqxzuP5aR upMf6A1IDpA4Tjdlg2lu7B5kQxIe1DI8NKfA9Fsx4LIvr6tKRz1M7IEJ5ENBs5DWzdng 18HA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Mellanox.com header.s=selector1 header.b=kIgp6Z9v; arc=pass (i=1 spf=pass spfdomain=mellanox.com dkim=pass dkdomain=mellanox.com dmarc=pass fromdomain=mellanox.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a17si167569otp.236.2020.02.12.04.53.11; Wed, 12 Feb 2020 04:53:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@Mellanox.com header.s=selector1 header.b=kIgp6Z9v; arc=pass (i=1 spf=pass spfdomain=mellanox.com dkim=pass dkdomain=mellanox.com dmarc=pass fromdomain=mellanox.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728248AbgBLMvV (ORCPT + 99 others); Wed, 12 Feb 2020 07:51:21 -0500 Received: from mail-eopbgr140053.outbound.protection.outlook.com ([40.107.14.53]:8417 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725887AbgBLMvS (ORCPT ); Wed, 12 Feb 2020 07:51:18 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cVN3pEZLk7RuLRjABcQWSaZKc6WGzC/KfWM+H3MMD/T8x3pQTZFPadDk3Qg1iC8rkFQ679gvUVcKLTJe6LI12H3vm3r96Ecsch2vCqyeYjcWBVQOopLk67ERV50dHHKzr5ZyIlP0U73/YMj1+5dkW6m2fEtrlEC4NuJFNpOztxVMtN3GwaEK3nyU9gpHfsDzHosN4BnWcexkkJoN/m/l5mwO+C2ZfjS9gneC/XNjk3P5UZlTlP2NllKkmY72TBx5Z+U8maOMjWne96rTGKHuTq4v+73XdvQzm+w/i6FI6zU88UYeSLUTw2wLMCZus1bd+eXq0WtmtStIGCLhr337hw== 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=raNv4B1CGya4jkTomUvQp5srpXT78rPNqVMaS88pbdk=; b=TeLrifVuPbF3jwXOmPU2lCqClQwRgjj3OmRLd4UVvExsMVwu/JzOWwv34QjZSAftvALnZbXRVcu1n/Csd139EhBieDACuqcAq0vTBTYjMkkoq/OHBf6WCX0V8UDq26WKbyV+btXayzdVN6PeNLj6iiovakQqO1Ky5Go5uX46xtE1ozCbGk6EaIL6R13IhlTw2H/vZBjfG7geDcvud0DHvNQMlZT5hFU6H6a8Bm27nGVNC3anGvsuZWZxVOz69FPRzR+X1MSeVDT5wbeBYrkywr9wnPm5s3RCgcvdDP9eMbwpi3nP/4Z02zaSPurrzG2yvUhNAC6ZgPI8wz52EzJMJQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=raNv4B1CGya4jkTomUvQp5srpXT78rPNqVMaS88pbdk=; b=kIgp6Z9vbjYXi6lvzY/FeajA8XO4ButnTgC/U1fEN7QK0qaaj57nqpOaH3ziL+l0uX39wgeGmYryeydyt4Y/k1t9sTHarWke8kefklvbFrfG+G1Vk9QXaNQ2eFakt/458Yyiqq9krBCLma53zUOp0F6Cxz/yHv5Ua2D2f9oGBO0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=jgg@mellanox.com; Received: from DB7PR05MB4138.eurprd05.prod.outlook.com (52.135.129.16) by DB7PR05MB4956.eurprd05.prod.outlook.com (20.176.237.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.22; Wed, 12 Feb 2020 12:51:12 +0000 Received: from DB7PR05MB4138.eurprd05.prod.outlook.com ([fe80::3942:d5fb:e94f:503d]) by DB7PR05MB4138.eurprd05.prod.outlook.com ([fe80::3942:d5fb:e94f:503d%6]) with mapi id 15.20.2707.030; Wed, 12 Feb 2020 12:51:12 +0000 Date: Wed, 12 Feb 2020 08:51:08 -0400 From: Jason Gunthorpe To: Jason Wang Cc: mst@redhat.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, tiwei.bie@intel.com, maxime.coquelin@redhat.com, cunming.liang@intel.com, zhihong.wang@intel.com, rob.miller@broadcom.com, xiao.w.wang@intel.com, haotian.wang@sifive.com, lingshan.zhu@intel.com, eperezma@redhat.com, lulu@redhat.com, parav@mellanox.com, kevin.tian@intel.com, stefanha@redhat.com, rdunlap@infradead.org, hch@infradead.org, aadam@redhat.com, jiri@mellanox.com, shahafs@mellanox.com, hanand@xilinx.com, mhabets@solarflare.com Subject: Re: [PATCH V2 3/5] vDPA: introduce vDPA bus Message-ID: <20200212125108.GS4271@mellanox.com> References: <20200210035608.10002-1-jasowang@redhat.com> <20200210035608.10002-4-jasowang@redhat.com> <20200211134746.GI4271@mellanox.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-ClientProxiedBy: MN2PR18CA0004.namprd18.prod.outlook.com (2603:10b6:208:23c::9) To DB7PR05MB4138.eurprd05.prod.outlook.com (2603:10a6:5:23::16) MIME-Version: 1.0 Received: from mlx.ziepe.ca (142.68.57.212) by MN2PR18CA0004.namprd18.prod.outlook.com (2603:10b6:208:23c::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.23 via Frontend Transport; Wed, 12 Feb 2020 12:51:12 +0000 Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1j1rTw-0000B9-CE; Wed, 12 Feb 2020 08:51:08 -0400 X-Originating-IP: [142.68.57.212] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: ed96b891-59f9-4a94-0d5e-08d7afba3d1c X-MS-TrafficTypeDiagnostic: DB7PR05MB4956:|DB7PR05MB4956: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-Forefront-PRVS: 0311124FA9 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4636009)(366004)(376002)(396003)(39860400002)(136003)(346002)(199004)(189003)(7416002)(86362001)(33656002)(2906002)(66946007)(4744005)(52116002)(1076003)(186003)(36756003)(2616005)(26005)(478600001)(5660300002)(316002)(66556008)(8676002)(9786002)(81156014)(6916009)(8936002)(66476007)(4326008)(9746002)(81166006)(24400500001);DIR:OUT;SFP:1101;SCL:1;SRVR:DB7PR05MB4956;H:DB7PR05MB4138.eurprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1fsf6/9TirB9zdd8ibh8ca3PfvZQY3rF5xp9QwPOUtT+NePlUAxvmceW6mK2UgaFwyzu61OJIBKdpAB+TY/f922pgqm6kgyvRFsGt+ais8JL1kF1Jav3iazMPLuYawFa0xfmh5dLlALqCBN/UO6zTSuXDwsXS8NtFrjYXkB0G4WOuIBVNS0eKNalPbVsBpqQUr4g6pntxDbs1HrUNSOJW6JR6tx+DbOxLi5ogiEFarPlfX7SsdkP/JCRSEATuAFaPD4rEg32vO8grT3+vJXOGVEq0RklZbR/h5Wt2YXMNWioHlXbNGRKX+ssIB0KYaHbS8V0CiloQpRZGzMUIgwRLp3YuMk9gtDyI7Lk27+gOvRUJ2cponOeuqICTkpIAiivJ/R9t3nKqOpyHtrKUW8b4nxTMtlZY/4MiGJIo6LvPb894hpQMTCIMO2ofWkVkvOrzHc2PN+hVBBtxJC4XpUTYgnGYV91TqAGZoRtZX7LwmTl8DagvXzEZ3PxYKSNgAzN X-MS-Exchange-AntiSpam-MessageData: HgdQ42Q+9akSUY+Gvqw/Sh0W+EjPBozu2I+v6CNDkYgZEkvUgssCsCAq4HN3aRAVlWDjkFDrOh9+YneoFiua9Qmt4Xi4Gj178z9BnZOjc8wIaOOatWX9bDO/OXrn9NcSeGCLhOIEE2ACkFR5J63HqA== X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: ed96b891-59f9-4a94-0d5e-08d7afba3d1c X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2020 12:51:12.4008 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: x8D6xDbWq8wQq7TMiTAlPcoBxWXvCy/6rBbFG1RIYOuIVI5B4wyOz1D7048hLWS/pBRkvH1ZMM2duyS0ZpQaQg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB4956 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 12, 2020 at 03:55:31PM +0800, Jason Wang wrote: > > The ida_simple_remove should probably be part of the class release > > function to make everything work right > > It looks to me bus instead of class is the correct abstraction here since > the devices share a set of programming interface but not the semantics. device_release() doesn't call the bus release? You have dev, type or class to choose from. Type is rarely used and doesn't seem to be used by vdpa, so class seems the right choice Jason