qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Markus Armbruster <armbru@redhat.com>,
	qemu-devel@nongnu.org, mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH V3] net: don't use set/get_pointer() in set/get_netdev()
Date: Fri, 19 Dec 2014 11:31:25 +0000	[thread overview]
Message-ID: <20141219113125.GA17683@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1413177397-30734-1-git-send-email-jasowang@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1437 bytes --]

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 <armbru@redhat.com>
> Cc: Stefan Hajnoczi <stefanha@redhat.com>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Jason Wang <jasowang@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 #2: Type: application/pgp-signature, Size: 473 bytes --]

      parent reply	other threads:[~2014-12-19 11:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-13  5:16 [Qemu-devel] [PATCH V3] net: don't use set/get_pointer() in set/get_netdev() Jason Wang
2014-12-19  9:15 ` Markus Armbruster
2014-12-19 11:31 ` Stefan Hajnoczi [this message]

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=20141219113125.GA17683@stefanha-thinkpad.redhat.com \
    --to=stefanha@redhat.com \
    --cc=armbru@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).