virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: "Zhu, Lingshan" <lingshan.zhu@intel.com>,
	alex.williamson@redhat.com, pbonzini@redhat.com,
	sean.j.christopherson@intel.com, wanpengli@tencent.com,
	virtualization@lists.linux-foundation.org, kvm@vger.kernel.org,
	netdev@vger.kernel.org, dan.daly@intel.com
Subject: Re: [PATCH 6/7] ifcvf: replace irq_request/free with helpers in vDPA core.
Date: Wed, 15 Jul 2020 18:04:11 +0800	[thread overview]
Message-ID: <eefc2969-c91e-059e-ed4a-20ce8fa6dfe9@redhat.com> (raw)
In-Reply-To: <20200715055538-mutt-send-email-mst@kernel.org>


On 2020/7/15 下午6:01, Michael S. Tsirkin wrote:
> On Wed, Jul 15, 2020 at 04:40:17PM +0800, Jason Wang wrote:
>> On 2020/7/13 下午6:22, Zhu, Lingshan wrote:
>>> On 7/13/2020 4:33 PM, Jason Wang wrote:
>>>> On 2020/7/12 下午10:49, Zhu Lingshan wrote:
>>>>> This commit replaced irq_request/free() with helpers in vDPA
>>>>> core, so that it can request/free irq and setup irq offloading
>>>>> on order.
>>>>>
>>>>> Signed-off-by: Zhu Lingshan<lingshan.zhu@intel.com>
>>>>> ---
>>>>>    drivers/vdpa/ifcvf/ifcvf_main.c | 11 ++++++-----
>>>>>    1 file changed, 6 insertions(+), 5 deletions(-)
>>>>>
>>>>> diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c
>>>>> b/drivers/vdpa/ifcvf/ifcvf_main.c
>>>>> index f5a60c1..65b84e1 100644
>>>>> --- a/drivers/vdpa/ifcvf/ifcvf_main.c
>>>>> +++ b/drivers/vdpa/ifcvf/ifcvf_main.c
>>>>> @@ -47,11 +47,12 @@ static void ifcvf_free_irq(struct
>>>>> ifcvf_adapter *adapter, int queues)
>>>>>    {
>>>>>        struct pci_dev *pdev = adapter->pdev;
>>>>>        struct ifcvf_hw *vf = &adapter->vf;
>>>>> +    struct vdpa_device *vdpa = &adapter->vdpa;
>>>>>        int i;
>>>>>            for (i = 0; i < queues; i++)
>>>>> -        devm_free_irq(&pdev->dev, vf->vring[i].irq, &vf->vring[i]);
>>>>> +        vdpa_free_vq_irq(&pdev->dev, vdpa, vf->vring[i].irq, i,
>>>>> &vf->vring[i]);
>>>>>          ifcvf_free_irq_vectors(pdev);
>>>>>    }
>>>>> @@ -60,6 +61,7 @@ static int ifcvf_request_irq(struct
>>>>> ifcvf_adapter *adapter)
>>>>>    {
>>>>>        struct pci_dev *pdev = adapter->pdev;
>>>>>        struct ifcvf_hw *vf = &adapter->vf;
>>>>> +    struct vdpa_device *vdpa = &adapter->vdpa;
>>>>>        int vector, i, ret, irq;
>>>>>          ret = pci_alloc_irq_vectors(pdev, IFCVF_MAX_INTR,
>>>>> @@ -73,6 +75,7 @@ static int ifcvf_request_irq(struct
>>>>> ifcvf_adapter *adapter)
>>>>>             pci_name(pdev));
>>>>>        vector = 0;
>>>>>        irq = pci_irq_vector(pdev, vector);
>>>>> +    /* config interrupt */
>>>> Unnecessary changes.
>>> This is to show we did not setup this irq offloading for config
>>> interrupt, only setup irq offloading for data vq. But can remove this
>>> since we have config_msix_name in code to show what it is
>> Btw, any reason for not making config interrupt work for irq offloading? I
>> don't see any thing that blocks this.
>>
>> Thanks
> Well config accesses all go through userspace right?
> Doing config interrupt directly would just be messy ...


Right, so I think we need a better comment here.

Thanks


>
>

  reply	other threads:[~2020-07-15 10:04 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1594565366-3195-1-git-send-email-lingshan.zhu@intel.com>
     [not found] ` <1594565366-3195-2-git-send-email-lingshan.zhu@intel.com>
2020-07-12 15:29   ` [PATCH 2/7] kvm/vfio: detect assigned device via irqbypass manager Alex Williamson
2020-07-13  7:57     ` Jason Wang
2020-07-12 21:06   ` Michael S. Tsirkin
2020-07-13  8:13     ` Jason Wang
2020-07-13 10:52       ` Michael S. Tsirkin
     [not found]         ` <aca899f7-ec2e-2b55-df78-44eacb923c00@intel.com>
2020-07-14  9:03           ` Michael S. Tsirkin
     [not found] ` <1594565366-3195-3-git-send-email-lingshan.zhu@intel.com>
2020-07-13  8:22   ` [PATCH 3/7] vhost_vdpa: implement IRQ offloading functions in vhost_vdpa Jason Wang
     [not found]     ` <e06f9706-441f-0d7a-c8c0-cd43a26c5296@intel.com>
2020-07-15  8:51       ` Jason Wang
     [not found]         ` <8f52ee3a-7a08-db14-9194-8085432481a4@intel.com>
2020-07-15  9:06           ` Jason Wang
     [not found]             ` <61c1753a-43dc-e448-6ece-13a19058e621@intel.com>
2020-07-15  9:42               ` Jason Wang
2020-07-15 11:09                 ` Zhu, Lingshan
     [not found] ` <1594565366-3195-4-git-send-email-lingshan.zhu@intel.com>
2020-07-13  8:27   ` [PATCH 4/7] vDPA: implement IRQ offloading helpers in vDPA core Jason Wang
     [not found] ` <1594565366-3195-5-git-send-email-lingshan.zhu@intel.com>
2020-07-13  8:28   ` [PATCH 5/7] virtio_vdpa: init IRQ offloading function pointers to NULL Jason Wang
     [not found]     ` <ba1ea94c-b0ae-8bd8-8425-64b096512d3d@intel.com>
2020-07-15  8:43       ` Jason Wang
     [not found] ` <1594565366-3195-6-git-send-email-lingshan.zhu@intel.com>
2020-07-13  8:33   ` [PATCH 6/7] ifcvf: replace irq_request/free with helpers in vDPA core Jason Wang
     [not found]     ` <f6fc09e2-7a45-aaa5-2b4a-f1f963c5ce2c@intel.com>
2020-07-15  8:40       ` Jason Wang
2020-07-15 10:01         ` Michael S. Tsirkin
2020-07-15 10:04           ` Jason Wang [this message]
2020-07-15 11:10             ` Zhu, Lingshan

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=eefc2969-c91e-059e-ed4a-20ce8fa6dfe9@redhat.com \
    --to=jasowang@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=dan.daly@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=lingshan.zhu@intel.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=sean.j.christopherson@intel.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=wanpengli@tencent.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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).