From: Jason Gunthorpe <jgg@mellanox.com> To: Jason Wang <jasowang@redhat.com> Cc: "mst@redhat.com" <mst@redhat.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "kvm@vger.kernel.org" <kvm@vger.kernel.org>, "virtualization@lists.linux-foundation.org" <virtualization@lists.linux-foundation.org>, "netdev@vger.kernel.org" <netdev@vger.kernel.org>, "tiwei.bie@intel.com" <tiwei.bie@intel.com>, "maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>, "cunming.liang@intel.com" <cunming.liang@intel.com>, "zhihong.wang@intel.com" <zhihong.wang@intel.com>, "rob.miller@broadcom.com" <rob.miller@broadcom.com>, "xiao.w.wang@intel.com" <xiao.w.wang@intel.com>, "haotian.wang@sifive.com" <haotian.wang@sifive.com>, "lingshan.zhu@intel.com" <lingshan.zhu@intel.com>, "eperezma@redhat.com" <eperezma@redhat.com>, "lulu@redhat.com" <lulu@redhat.com>, Parav Pandit <parav@mellanox.com>, "kevin.tian@intel.com" <kevin.tian@intel.com>, "stefanha@redhat.com" <stefanha@redhat.com>, "rdunlap@infradead.org" <rdunlap@infradead.org>, "hch@infradead.org" <hch@infradead.org>, "aadam@redhat.com" <aadam@redhat.com>, Jiri Pirko <jiri@mellanox.com>, Shahaf Shuler <shahafs@mellanox.com>, "hanand@xilinx.com" <hanand@xilinx.com>, "mhabets@solarflare.com" <mhabets@solarflare.com> Subject: Re: [PATCH V4 5/5] vdpasim: vDPA device simulator Date: Wed, 26 Feb 2020 13:19:05 -0400 [thread overview] Message-ID: <20200226171905.GS26318@mellanox.com> (raw) In-Reply-To: <793a1b81-4f78-c405-4aae-f32a2bf67d87@redhat.com> On Wed, Feb 26, 2020 at 02:12:26PM +0800, Jason Wang wrote: > > > It is a bit weird to be creating this dummy parent, couldn't this be > > > done by just passing a NULL parent to vdpa_alloc_device, doing > > > set_dma_ops() on the vdpasim->vdpa->dev and setting dma_device to > > > vdpasim->vdpa->dev ? > > > > > > I think it works. > > > Rethink about this, since most hardware vDPA driver will have a parent and > will use it to find the parent structure e.g > > dev_get_drvdata(vdpa->dev->parent) Oh that seems like a sketchy pattern > So I keep this dummy parent in V5. The dummy parent is visible in sysfs, I think you should remove it so the syfs for this virtual device makes sense. Jason
WARNING: multiple messages have this Message-ID (diff)
From: Jason Gunthorpe <jgg@mellanox.com> To: Jason Wang <jasowang@redhat.com> Cc: "mst@redhat.com" <mst@redhat.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "kvm@vger.kernel.org" <kvm@vger.kernel.org>, "virtualization@lists.linux-foundation.org" <virtualization@lists.linux-foundation.org>, "netdev@vger.kernel.org" <netdev@vger.kernel.org>, "tiwei.bie@intel.com" <tiwei.bie@intel.com>, "maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>, "cunming.liang@intel.com" <cunming.liang@intel.com>, "zhihong.wang@intel.com" <zhihong.wang@intel.com>, "rob.miller@broadcom.com" <rob.miller@broadcom.com>, "xiao.w.wang@intel.com" <xiao.w.wang@intel.com>, "haotian.wang@sifive.com" <haotian.wang@sifive.com>, "lingshan.zhu@intel.com" <lingshan.zhu@intel.com>, "eperezma@redhat.com" <eperezma@redhat.com>, "lulu@redhat.com" <lulu@redhat.co> Subject: Re: [PATCH V4 5/5] vdpasim: vDPA device simulator Date: Wed, 26 Feb 2020 13:19:05 -0400 [thread overview] Message-ID: <20200226171905.GS26318@mellanox.com> (raw) In-Reply-To: <793a1b81-4f78-c405-4aae-f32a2bf67d87@redhat.com> On Wed, Feb 26, 2020 at 02:12:26PM +0800, Jason Wang wrote: > > > It is a bit weird to be creating this dummy parent, couldn't this be > > > done by just passing a NULL parent to vdpa_alloc_device, doing > > > set_dma_ops() on the vdpasim->vdpa->dev and setting dma_device to > > > vdpasim->vdpa->dev ? > > > > > > I think it works. > > > Rethink about this, since most hardware vDPA driver will have a parent and > will use it to find the parent structure e.g > > dev_get_drvdata(vdpa->dev->parent) Oh that seems like a sketchy pattern > So I keep this dummy parent in V5. The dummy parent is visible in sysfs, I think you should remove it so the syfs for this virtual device makes sense. Jason
next prev parent reply other threads:[~2020-02-26 17:19 UTC|newest] Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-02-20 6:11 [PATCH V4 0/5] vDPA support Jason Wang 2020-02-20 6:11 ` [PATCH V4 1/5] vhost: factor out IOTLB Jason Wang 2020-02-20 6:11 ` [PATCH V4 2/5] vringh: IOTLB support Jason Wang 2020-02-20 6:11 ` [PATCH V4 3/5] vDPA: introduce vDPA bus Jason Wang 2020-02-20 15:14 ` Jason Gunthorpe 2020-02-20 15:14 ` Jason Gunthorpe 2020-02-21 7:54 ` Jason Wang 2020-02-21 7:54 ` Jason Wang 2020-02-24 6:14 ` Harpreet Singh Anand 2020-02-24 6:14 ` Harpreet Singh Anand 2020-02-24 6:48 ` Jason Wang 2020-02-24 6:48 ` Jason Wang 2020-02-20 6:11 ` [PATCH V4 4/5] virtio: introduce a vDPA based transport Jason Wang 2020-02-20 15:19 ` Jason Gunthorpe 2020-02-20 15:19 ` Jason Gunthorpe 2020-02-21 8:06 ` Jason Wang 2020-02-21 8:06 ` Jason Wang 2020-02-20 6:11 ` [PATCH V4 5/5] vdpasim: vDPA device simulator Jason Wang 2020-02-20 15:12 ` Jason Gunthorpe 2020-02-20 15:12 ` Jason Gunthorpe 2020-02-21 7:57 ` Jason Wang 2020-02-21 7:57 ` Jason Wang 2020-02-26 6:12 ` Jason Wang 2020-02-26 6:12 ` Jason Wang 2020-02-26 17:19 ` Jason Gunthorpe [this message] 2020-02-26 17:19 ` Jason Gunthorpe 2020-02-21 8:33 ` Harpreet Singh Anand 2020-02-21 8:33 ` Harpreet Singh Anand 2020-02-21 8:50 ` Jason Wang 2020-02-21 8:50 ` Jason Wang
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200226171905.GS26318@mellanox.com \ --to=jgg@mellanox.com \ --cc=aadam@redhat.com \ --cc=cunming.liang@intel.com \ --cc=eperezma@redhat.com \ --cc=hanand@xilinx.com \ --cc=haotian.wang@sifive.com \ --cc=hch@infradead.org \ --cc=jasowang@redhat.com \ --cc=jiri@mellanox.com \ --cc=kevin.tian@intel.com \ --cc=kvm@vger.kernel.org \ --cc=lingshan.zhu@intel.com \ --cc=linux-kernel@vger.kernel.org \ --cc=lulu@redhat.com \ --cc=maxime.coquelin@redhat.com \ --cc=mhabets@solarflare.com \ --cc=mst@redhat.com \ --cc=netdev@vger.kernel.org \ --cc=parav@mellanox.com \ --cc=rdunlap@infradead.org \ --cc=rob.miller@broadcom.com \ --cc=shahafs@mellanox.com \ --cc=stefanha@redhat.com \ --cc=tiwei.bie@intel.com \ --cc=virtualization@lists.linux-foundation.org \ --cc=xiao.w.wang@intel.com \ --cc=zhihong.wang@intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.