Re: [PATCH v3 09/13] vhost/vdpa: remove vhost_vdpa_config_validate()

2021-02-07 Thread Jason Wang
On 2021/2/5 下午10:17, Stefano Garzarella wrote: On Fri, Feb 05, 2021 at 08:32:37AM -0500, Michael S. Tsirkin wrote: On Fri, Feb 05, 2021 at 10:16:51AM +0100, Stefano Garzarella wrote: On Fri, Feb 05, 2021 at 11:27:32AM +0800, Jason Wang wrote: > > On 2021/2/5 上午1:22, Stefano Garzarella wrote:

Re: [PATCH v3 09/13] vhost/vdpa: remove vhost_vdpa_config_validate()

2021-02-05 Thread Stefano Garzarella
On Fri, Feb 05, 2021 at 08:32:37AM -0500, Michael S. Tsirkin wrote: On Fri, Feb 05, 2021 at 10:16:51AM +0100, Stefano Garzarella wrote: On Fri, Feb 05, 2021 at 11:27:32AM +0800, Jason Wang wrote: > > On 2021/2/5 上午1:22, Stefano Garzarella wrote: > > get_config() and set_config() callbacks in the

Re: [PATCH v3 09/13] vhost/vdpa: remove vhost_vdpa_config_validate()

2021-02-05 Thread Michael S. Tsirkin
On Fri, Feb 05, 2021 at 10:16:51AM +0100, Stefano Garzarella wrote: > On Fri, Feb 05, 2021 at 11:27:32AM +0800, Jason Wang wrote: > > > > On 2021/2/5 上午1:22, Stefano Garzarella wrote: > > > get_config() and set_config() callbacks in the 'struct vdpa_config_ops' > > > usually already validated the

Re: [PATCH v3 09/13] vhost/vdpa: remove vhost_vdpa_config_validate()

2021-02-05 Thread Stefano Garzarella
On Fri, Feb 05, 2021 at 11:27:32AM +0800, Jason Wang wrote: On 2021/2/5 上午1:22, Stefano Garzarella wrote: get_config() and set_config() callbacks in the 'struct vdpa_config_ops' usually already validated the inputs. Also now they can return an error, so we don't need to validate them here anymo

Re: [PATCH v3 09/13] vhost/vdpa: remove vhost_vdpa_config_validate()

2021-02-04 Thread Jason Wang
On 2021/2/5 上午1:22, Stefano Garzarella wrote: get_config() and set_config() callbacks in the 'struct vdpa_config_ops' usually already validated the inputs. Also now they can return an error, so we don't need to validate them here anymore. Let's use the return value of these callbacks and retur