lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 12 Apr 2022 14:55:27 +0800
From:   Zhou Furong <furong.zhou@...ux.intel.com>
To:     Zhu Lingshan <lingshan.zhu@...el.com>, jasowang@...hat.com,
        mst@...hat.com
Cc:     virtualization@...ts.linux-foundation.org, netdev@...r.kernel.org
Subject: Re: [PATCH] vDPA/ifcvf: allow userspace to suspend a queue

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ