From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49757) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCo84-0001rc-Dd for qemu-devel@nongnu.org; Tue, 14 Jun 2016 09:11:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCo81-00081N-6D for qemu-devel@nongnu.org; Tue, 14 Jun 2016 09:11:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44605) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCo80-00081E-OZ for qemu-devel@nongnu.org; Tue, 14 Jun 2016 09:11:37 -0400 From: Markus Armbruster References: <1463784024-17242-1-git-send-email-eblake@redhat.com> <1463784024-17242-3-git-send-email-eblake@redhat.com> Date: Tue, 14 Jun 2016 15:11:29 +0200 In-Reply-To: <1463784024-17242-3-git-send-email-eblake@redhat.com> (Eric Blake's message of "Fri, 20 May 2016 16:40:11 -0600") Message-ID: <87vb1bdif2.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v7 02/15] net: use Netdev instead of NetClientOptions in client init List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org, "Michael S. Tsirkin" , Jan Kiszka , Jason Wang , Vincenzo Maffione , =?utf-8?B?S8WRdsOhZ8OzLCBa?= =?utf-8?B?b2x0w6Fu?= , Samuel Thibault , Giuseppe Lettieri , Luigi Rizzo Eric Blake writes: > From: K=C5=91v=C3=A1g=C3=B3, Zolt=C3=A1n First posted almost a year ago. I'm glad we're finally ready for this work. Zolt=C3=A1n, I'm sorry it has taken us so long. > This way we no longer need NetClientOptions and can convert Netdev > into a flat union. That's work enabled by this patch, not done by it. We won't actually get rid of NetClientOptions, only confine it to legacy command line support. > Signed-off-by: K=C5=91v=C3=A1g=C3=B3, Zolt=C3=A1n > Reviewed-by: Eric Blake > Message-Id: <93ffdfed7054529635e6acb935150d95dc173a12.1441627176.git.Dirt= Y.iCE.hu@gmail.com> > > [rework net_client_init1() to pass Netdev by copying from NetdevLegacy, > rather than merging the two types; rebase to qapi changes] > Signed-off-by: Eric Blake The patch is mostly mechanical: wherever we replace parameter NetClientOptions *opts by Netdev *netdev, we replace opts by netdev->opts, because netdev wraps opts: struct Netdev { char *id; NetClientOptions *opts; }; The interesting part is the change to net_client_init1(), which looks sane.