From: Jason Wang <jasowang@redhat.com>
To: Jean-Christophe DUBOIS <jcd@tribudubois.net>,
qemu-devel@nongnu.org, peter.maydell@linaro.org
Subject: Re: [Qemu-devel] [PATCH v4 7/8] Add ENET/Gbps Ethernet support to FEC device
Date: Tue, 24 May 2016 10:16:10 +0800 [thread overview]
Message-ID: <5743B96A.9060408@redhat.com> (raw)
In-Reply-To: <573F804B.4000608@tribudubois.net>
On 2016年05月21日 05:23, Jean-Christophe DUBOIS wrote:
> Le 20/05/2016 04:34, Jason Wang a écrit :
>>
>>
>> On 2016年05月20日 02:14, Jean-Christophe DUBOIS wrote:
>>> Le 19/05/2016 05:48, Jason Wang a écrit :
>>>>
>>>>
>>>> On 2016年05月19日 06:23, Jean-Christophe Dubois wrote:
>>>>> The ENET device (present in i.MX6) is "derived" from FEC and backward
>>>>> compatible with it.
>>>>>
>>>>> This patch adds the necessary support of the added feature in the
>>>>> ENET
>>>>> device to allow Linux to use it (on supported processors).
>>>>>
>>>>> Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
>>>>> ---
>>>>>
>>>>> Changes since v1:
>>>>> * Not present on v1
>>>>> Changes since v2:
>>>>> * Not present on v2
>>>>> Changes since v3:
>>>>> * Separate and fix the 2 supported interrupts
>>>>>
>>>>> hw/arm/fsl-imx25.c | 3 +
>>>>> hw/net/imx_fec.c | 713
>>>>> ++++++++++++++++++++++++++++++++++++++---------
>>>>> include/hw/net/imx_fec.h | 195 ++++++++++---
>>>>> 3 files changed, 745 insertions(+), 166 deletions(-)
>>>>
>>>> [...]
>>>>
>>>>> -static Property imx_fec_properties[] = {
>>>>> +static Property imx_eth_properties[] = {
>>>>> DEFINE_NIC_PROPERTIES(IMXFECState, conf),
>>>>> + DEFINE_PROP_BOOL("is-fec", IMXFECState, is_fec, false),
>>>>> DEFINE_PROP_END_OF_LIST(),
>>>>> };
>>>>
>>>> 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.
>>
>> You can still share almost all the codes. E.g you can have a look at
>> e1000.c which have 3 types of rather similar devices.
>
> OK, I'll change it in next patch to match the pl110 model as proposed
> by Peter. No more additional property...
>
>>
>> Another question not relate to this patch, I saw version were bumped
>> for vmstate version. Is it better to keep the vmstate for FEC and
>> using a new vmstate for ENET (register array).
>
> Well, as I moved the FEC to register array, the VMState structure has
> changed and therefore I believe the vmstate version needs to be bumped.
>
> Am I wrong?
You're right. But migration to old version does not work in this way,
even if there aren't any changes in FEC.
I'm not sure the policy for arm, but we used to do lots of works in the
past to make migration to older version works.
You can achieve this by using two different vmstates, and keep the FEC's
state (by just use parts of array).
Perter, any thoughts on this? Should we try to keep the migration
compatibility here?
Thanks
next prev parent reply other threads:[~2016-05-24 2:16 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-18 22:22 [Qemu-devel] [PATCH v4 0/8] Add Ethernet device for i.MX6 SOC Jean-Christophe Dubois
2016-05-18 22:22 ` [Qemu-devel] [PATCH v4 1/8] net: improve UDP/TCP checksum computation Jean-Christophe Dubois
2016-05-18 22:22 ` [Qemu-devel] [PATCH v4 2/8] net: handle optional VLAN header in " Jean-Christophe Dubois
2016-05-18 22:22 ` [Qemu-devel] [PATCH v4 3/8] i.MX: Fix FEC code for MDIO operation selection Jean-Christophe Dubois
2016-05-18 22:22 ` [Qemu-devel] [PATCH v4 4/8] i.MX: Fix FEC code for MDIO address selection Jean-Christophe Dubois
2016-05-18 22:23 ` [Qemu-devel] [PATCH v4 5/8] i.MX: Fix FEC code for ECR register reset value Jean-Christophe Dubois
2016-05-18 22:23 ` [Qemu-devel] [PATCH v4 6/8] i.MX: move FEC device to a register array structure Jean-Christophe Dubois
2016-05-19 3:28 ` Jason Wang
2016-05-19 6:10 ` Jean-Christophe DUBOIS
2016-05-20 2:26 ` Jason Wang
2016-05-20 21:25 ` Jean-Christophe DUBOIS
2016-05-18 22:23 ` [Qemu-devel] [PATCH v4 7/8] Add ENET/Gbps Ethernet support to FEC device Jean-Christophe Dubois
2016-05-19 3:48 ` Jason Wang
2016-05-19 18:14 ` Jean-Christophe DUBOIS
2016-05-19 18:37 ` Peter Maydell
2016-05-20 21:24 ` Jean-Christophe DUBOIS
2016-05-20 2:34 ` Jason Wang
2016-05-20 21:23 ` Jean-Christophe DUBOIS
2016-05-24 2:16 ` Jason Wang [this message]
2016-05-24 19:33 ` Jean-Christophe DUBOIS
2016-05-25 8:14 ` Jason Wang
2016-05-18 22:23 ` [Qemu-devel] [PATCH v4 8/8] Add ENET device to i.MX6 SOC Jean-Christophe Dubois
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=5743B96A.9060408@redhat.com \
--to=jasowang@redhat.com \
--cc=jcd@tribudubois.net \
--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).