From: Zhou Furong <furong.zhou@linux.intel.com>
To: Zhu Lingshan <lingshan.zhu@intel.com>,
jasowang@redhat.com, mst@redhat.com
Cc: virtualization@lists.linux-foundation.org, netdev@vger.kernel.org
Subject: Re: [PATCH] vDPA/ifcvf: allow userspace to suspend a queue
Date: Tue, 12 Apr 2022 14:55:27 +0800 [thread overview]
Message-ID: <b24c4e3d-2792-da43-3335-5ed83c557565@linux.intel.com> (raw)
In-Reply-To: <20220411031057.162485-1-lingshan.zhu@intel.com>
Hi,
> +bool ifcvf_get_vq_ready(struct ifcvf_hw *hw, u16 qid)
> +{
> + struct virtio_pci_common_cfg __iomem *cfg = hw->common_cfg;
> + bool queue_enable;
> +
> + vp_iowrite16(qid, &cfg->queue_select);
> + queue_enable = vp_ioread16(&cfg->queue_enable);
> +
> + return (bool)queue_enable;
queue_enable is bool, why cast? looks like remove the variable is better.
return vp_ioread16(&cfg->queue_enable);
> static bool ifcvf_vdpa_get_vq_ready(struct vdpa_device *vdpa_dev, u16 qid)
> {
> struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev);
> + bool ready;
>
> - return vf->vring[qid].ready;
> + ready = ifcvf_get_vq_ready(vf, qid);
> +
> + return ready;
remove ready looks better
return ifcvf_get_vq_ready(vf, qid);
Best regards,
Furong
next prev parent reply other threads:[~2022-04-12 7:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-11 3:10 [PATCH] vDPA/ifcvf: allow userspace to suspend a queue Zhu Lingshan
2022-04-12 6:55 ` Zhou Furong [this message]
2022-04-21 11:05 ` Zhu, Lingshan
2022-04-21 14:27 ` Zhou Furong
2022-04-13 8:25 ` Jason Wang
2022-04-13 8:25 ` Jason Wang
2022-04-13 8:54 ` Michael S. Tsirkin
2022-04-13 8:54 ` Michael S. Tsirkin
2022-04-21 11:13 ` Zhu, Lingshan
2022-04-21 11:11 ` 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=b24c4e3d-2792-da43-3335-5ed83c557565@linux.intel.com \
--to=furong.zhou@linux.intel.com \
--cc=jasowang@redhat.com \
--cc=lingshan.zhu@intel.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.org \
/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 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.