On Mon, Oct 13, 2014 at 01:16:37PM +0800, Jason Wang wrote:
> Commit 1ceef9f27359cbe92ef124bf74de6f792e71f6fb (net: multiqueue
> support) tries to use set_pointer() and get_pointer() to set and get
> NICPeers which is not a pointer defined in DEFINE_PROP_NETDEV. This
> trick works but result a unclean and fragile implementation (e.g
> print_netdev and parse_netdev).
> 
> This patch solves this issue by not using set/get_pinter() and set and
> get netdev directly in set_netdev() and get_netdev(). After this the
> parse_netdev() and print_netdev() were no longer used and dropped from
> the source.
> 
> Cc: Markus Armbruster <arm...@redhat.com>
> Cc: Stefan Hajnoczi <stefa...@redhat.com>
> Cc: Peter Maydell <peter.mayd...@linaro.org>
> Signed-off-by: Jason Wang <jasow...@redhat.com>
> ---
> Changes from V2:
> - Use error_setg() instead of error_set_from_qdev_prop_error() for E2BIG 
> error.
> - Clean the return part of the set_netdev() since
>   eror_set_from_qdev_prop_error() does nothing when err is 0.
> Changes from V1:
> - validate ncs pointer before accessing them, this fixes the qtest failure
>   on arm.
> ---
>  hw/core/qdev-properties-system.c | 70 
> ++++++++++++++++++++++------------------
>  1 file changed, 38 insertions(+), 32 deletions(-)

Renamed 'err' label to 'out' as suggested by Markus.

Thanks, applied to my net tree:
https://github.com/stefanha/qemu/commits/net

Stefan

Attachment: pgp0XAYGLk80L.pgp
Description: PGP signature

Reply via email to