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]
Message-ID: <6824a28b-8611-d83e-259c-d84be8513683@redhat.com>
Date:   Mon, 30 Nov 2020 11:16:07 +0800
From:   Jason Wang <jasowang@...hat.com>
To:     Stefano Garzarella <sgarzare@...hat.com>,
        virtualization@...ts.linux-foundation.org
Cc:     Stefan Hajnoczi <stefanha@...hat.com>,
        linux-kernel@...r.kernel.org, Laurent Vivier <lvivier@...hat.com>,
        Max Gurtovoy <mgurtovoy@...dia.com>,
        "Michael S. Tsirkin" <mst@...hat.com>, Eli Cohen <elic@...dia.com>
Subject: Re: [PATCH v2 09/17] vdpa_sim: add work_fn in vdpasim_dev_attr


On 2020/11/26 下午10:49, Stefano Garzarella wrote:
> Rename vdpasim_work() in vdpasim_net_work() and add it to
> the vdpasim_dev_attr structure.
>
> Co-developed-by: Max Gurtovoy <mgurtovoy@...dia.com>
> Signed-off-by: Max Gurtovoy <mgurtovoy@...dia.com>
> Signed-off-by: Stefano Garzarella <sgarzare@...hat.com>
> ---
>   drivers/vdpa/vdpa_sim/vdpa_sim.c | 7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)


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


>
> diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c
> index 36677fc3631b..b84d9acd130c 100644
> --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c
> +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c
> @@ -60,6 +60,8 @@ struct vdpasim_dev_attr {
>   	u64 supported_features;
>   	int nvqs;
>   	u32 id;
> +
> +	work_func_t work_fn;
>   };
>   
>   /* State of each vdpasim device */
> @@ -153,7 +155,7 @@ static void vdpasim_reset(struct vdpasim *vdpasim)
>   	++vdpasim->generation;
>   }
>   
> -static void vdpasim_work(struct work_struct *work)
> +static void vdpasim_net_work(struct work_struct *work)
>   {
>   	struct vdpasim *vdpasim = container_of(work, struct
>   						 vdpasim, work);
> @@ -360,7 +362,7 @@ static struct vdpasim *vdpasim_create(struct vdpasim_dev_attr *dev_attr)
>   		goto err_alloc;
>   
>   	vdpasim->dev_attr = *dev_attr;
> -	INIT_WORK(&vdpasim->work, vdpasim_work);
> +	INIT_WORK(&vdpasim->work, dev_attr->work_fn);
>   	spin_lock_init(&vdpasim->lock);
>   	spin_lock_init(&vdpasim->iommu_lock);
>   
> @@ -730,6 +732,7 @@ static int __init vdpasim_dev_init(void)
>   	dev_attr.id = VIRTIO_ID_NET;
>   	dev_attr.supported_features = VDPASIM_NET_FEATURES;
>   	dev_attr.nvqs = VDPASIM_VQ_NUM;
> +	dev_attr.work_fn = vdpasim_net_work;
>   
>   	vdpasim_dev = vdpasim_create(&dev_attr);
>   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ