Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4335083pxv; Mon, 5 Jul 2021 21:14:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjeYZcccicBuzysKhSIWqdxd+uUGvPFcFH50R3rIB0Kq7JJGd5OSqvmgpZnxCxFO64AHyx X-Received: by 2002:aa7:d7ca:: with SMTP id e10mr13608286eds.40.1625544840976; Mon, 05 Jul 2021 21:14:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625544840; cv=none; d=google.com; s=arc-20160816; b=l//iVcvah2o/jaJ6o2uhVNwPtCp6xd982cj+bXacxozbcpZ5Xllfq6rqCozc2QMXyc ai6cJFlrqHSuZZe6rQjmR54AaA/u9t87sCNZ00yG5y54Sy0gTEBaOB6OYVbWLBnrMhaK Y5fu9VsLrA7uMQogyxuMpuvEqN9eJdm3FzO8QNQTyFWEghZJCCl0XvI8I7HE4QcCzB9k O92QCdU0qN4o/eOMxBZV3CuEUK/WRGj/Zn8awNEmgr3YO6oLecT7UKr0awdMKVp6Cr4X xbXwTNAZaBmb/AZL5mYYRvioOq8kv+dh4kn1TI8qjIPKPbpEKfdTsqCd+DJ3jzAc2gHs 2eRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=lc5Ft/Ot8/1ElwSJfG9D0pqyoEy9VB8BC2lj4AaOhaU=; b=zThbBoK3Q05GA/TnY3kHU0fnacE6J9LNfmMhA7TptPsaI234kbU4geOU/8xkfcWW1A fi9O9ck3riO69SFuwP/KxAtXKwhV7RSb8fsKP1Br/A+Pry2zvErG2IbH3/oLJaFHouhS QCaqOXewfVkllppXj7XMyLxjZOnSupg6AnhXV/T7kLmPyT146/vyMFPb0zvkiRbT4ixL iXRNmSbyVxIH4wnlEt6diEox55Lp0y68C/Bl1oNCedyMOY/J/fz6rHbZgkiLZhYU5X+R LEYk35EG9t8kI64T4VFoFZmPPqsB9nO6RjCqCkTEt6zPF2IEIHw/yTlXy0AotwMu8EYF C7IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ro2L/nJ4"; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gk1si11079046ejc.31.2021.07.05.21.13.25; Mon, 05 Jul 2021 21:14:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ro2L/nJ4"; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229992AbhGFECg (ORCPT + 99 others); Tue, 6 Jul 2021 00:02:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:44286 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229550AbhGFECf (ORCPT ); Tue, 6 Jul 2021 00:02:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4AC8961375; Tue, 6 Jul 2021 03:59:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625543998; bh=EBb836TUqwdFybd5e2qAGza9Mok0L1tjLS+MbMnBjN4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ro2L/nJ4cUN3ER5i2dJBf/AoagWgvc7fTnq9wCDIWMaIK1/W4Fsl2yB0GSMy9mC0L D3ywytE827DeLQGb9bH5+zgKUENID8BWXwP7OgigfS++eWj34tKndOwKh1d6ACah7A HMjgnNxt8KkJ97fiXGIEQ4riZ9A6cfV+i6nd6Lce18CP8vCVXpYL4yaiUkrT7RX2kP ixKBJ1i36AsdX/evHWTr4u3uzEEsHHRoYXFG6Mr49SnegKfLZTkN2zNxBGGjX/vKew WgTvpmKmW/NF3DleCNOTTj0eisiOauD4DzjHiBGeetDA9i2g6R7XC4iwkEULdjNHLH 6vPk8pBEd6jog== Date: Tue, 6 Jul 2021 06:59:54 +0300 From: Leon Romanovsky To: Jason Gunthorpe Cc: Shameerali Kolothum Thodi , Max Gurtovoy , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-crypto@vger.kernel.org" , "alex.williamson@redhat.com" , Linuxarm , liulongfang , "Zengtao (B)" , yuzenghui , Jonathan Cameron , "Wangzhou (B)" Subject: Re: [RFC v2 1/4] hisi-acc-vfio-pci: add new vfio_pci driver for HiSilicon ACC devices Message-ID: References: <20210702095849.1610-1-shameerali.kolothum.thodi@huawei.com> <20210702095849.1610-2-shameerali.kolothum.thodi@huawei.com> <834a009bba0d4db1b7a1c32e8f20611d@huawei.com> <20210705183247.GU4459@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210705183247.GU4459@nvidia.com> Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Mon, Jul 05, 2021 at 03:32:47PM -0300, Jason Gunthorpe wrote: > On Mon, Jul 05, 2021 at 09:27:37PM +0300, Leon Romanovsky wrote: > > > > I think, in any case, it would be good to update the Documentation based on > > > which way we end up doing this. > > > > The request to update Documentation can be seen as an example of > > choosing not-good API decisions. Expectation to see all drivers to > > use same callbacks with same vfio-core function calls sounds strange > > to me. > > It is not vfio-core, it is vfio-pci-core. It is similar to how some of > the fops stuff works, eg the generic_file whatever functions everyone > puts in. It doesn't really matter if it is vfio-core or vfio-pci-core. This looks horrible and it is going to be repeated for every driver: + .release = vfio_pci_core_release, + .ioctl = vfio_pci_core_ioctl, + .read = vfio_pci_core_read, + .write = vfio_pci_core_write, + .mmap = vfio_pci_core_mmap, + .request = vfio_pci_core_request, + .match = vfio_pci_core_match, + .reflck_attach = vfio_pci_core_reflck_attach, +}; At some point of time you will add new .XXX callback and will find yourself changing all drivers to have something like ".XXX = vfio_pci_core_XXX," Thanks