From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3Spl-0005T0-Ky for qemu-devel@nongnu.org; Thu, 19 May 2016 14:38:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b3Spf-0003Mx-Jc for qemu-devel@nongnu.org; Thu, 19 May 2016 14:38:08 -0400 Received: from mail-vk0-x22b.google.com ([2607:f8b0:400c:c05::22b]:34063) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3Spf-0003Lv-0j for qemu-devel@nongnu.org; Thu, 19 May 2016 14:38:03 -0400 Received: by mail-vk0-x22b.google.com with SMTP id c189so114884015vkb.1 for ; Thu, 19 May 2016 11:38:02 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <573E0276.8040002@tribudubois.net> References: <573D3799.9090109@redhat.com> <573E0276.8040002@tribudubois.net> From: Peter Maydell Date: Thu, 19 May 2016 19:37:43 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v4 7/8] Add ENET/Gbps Ethernet support to FEC device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jean-Christophe DUBOIS Cc: Jason Wang , QEMU Developers On 19 May 2016 at 19:14, Jean-Christophe DUBOIS wrote= : > Le 19/05/2016 05:48, Jason Wang a =C3=A9crit : >> On 2016=E5=B9=B405=E6=9C=8819=E6=97=A5 06:23, Jean-Christophe Dubois wro= te: >> >> It's ok to decide with "is-fec", but is it better to use a new type for >> that? > > > Well, there is a lot of common code between FEC and ENET because ENET is > basically backward compatible with FEC. So most/all of the FEC code needs= to > go in the ENET device. > > I thought this way of doing thing was the best way to avoid duplicating > things. Right, but usually we have different device types, even if under the hood it's the same code using a bool to decide what to do (see for instance hw/display/pl110.c, which provides 3 devices which are all pretty similar). This means that the users of your device don't need to care that the FEC is an ENET device with a flag to say "be like an FEC device", they just instantiate the kind of device they want. >> The above renaming seems cause lots of unnecessary changes above which m= ay >> brings issue when backporint patches to -stable. Can we just keep this, = and >> all ENET_*** should be used after we're sure we are ENET? > > > What do you mean by "after we're sure we are ENET"? > > ENET is the evolution of FEC to support Gb interface. FEC is more like a > legacy device these days (for ARM9 family). So it seems we are better > supporting ENET as default going forward. I don't mind if we rename the functions, #defines, etc, but if we do can we have a patch which does that renaming and only that renaming, so it's easy to review? thanks -- PMM