lkml.org 
[lkml]   [2021]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH 3/6] vp_vdpa: add vq irq offloading support
    On Wed, Sep 8, 2021 at 8:23 PM Wu Zongyong <wuzongyong@linux.alibaba.com> wrote:
    >
    > This patch implements the get_vq_irq() callback for virtio pci devices
    > to allow irq offloading.
    >
    > Signed-off-by: Wu Zongyong <wuzongyong@linux.alibaba.com>
    > ---
    > drivers/vdpa/virtio_pci/vp_vdpa.c | 8 ++++++++
    > 1 file changed, 8 insertions(+)

    Acked-by: Jason Wang <jasowang@redhat.com>

    >
    > diff --git a/drivers/vdpa/virtio_pci/vp_vdpa.c b/drivers/vdpa/virtio_pci/vp_vdpa.c
    > index fe0527329857..4c512ae1fe01 100644
    > --- a/drivers/vdpa/virtio_pci/vp_vdpa.c
    > +++ b/drivers/vdpa/virtio_pci/vp_vdpa.c
    > @@ -76,6 +76,13 @@ static u8 vp_vdpa_get_status(struct vdpa_device *vdpa)
    > return vp_modern_get_status(mdev);
    > }
    >
    > +static int vp_vdpa_get_vq_irq(struct vdpa_device *vdev, u16 idx)
    > +{
    > + struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdev);
    > +
    > + return vp_vdpa->vring[idx].irq;
    > +}
    > +
    > static void vp_vdpa_free_irq(struct vp_vdpa *vp_vdpa)
    > {
    > struct virtio_pci_modern_device *mdev = &vp_vdpa->mdev;
    > @@ -416,6 +423,7 @@ static const struct vdpa_config_ops vp_vdpa_ops = {
    > .get_config = vp_vdpa_get_config,
    > .set_config = vp_vdpa_set_config,
    > .set_config_cb = vp_vdpa_set_config_cb,
    > + .get_vq_irq = vp_vdpa_get_vq_irq,
    > };
    >
    > static void vp_vdpa_free_irq_vectors(void *data)
    > --
    > 2.31.1
    >

    \
     
     \ /
      Last update: 2021-09-09 04:54    [W:4.039 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site