qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Qemu-ppc] [PATCH v3 1/1] hw/net/spapr_llan: 6 byte mac


From: David Gibson
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH v3 1/1] hw/net/spapr_llan: 6 byte mac address device tree entry
Date: Tue, 14 Feb 2017 14:23:48 +1100
User-agent: Mutt/1.7.1 (2016-10-04)

On Mon, Feb 13, 2017 at 08:36:45AM +0100, Thomas Huth wrote:
> On 13.02.2017 06:33, David Gibson wrote:
> > On Tue, Nov 22, 2016 at 10:19:38AM +1100, Sam Bobroff wrote:
> >> The spapr-vlan device in QEMU has always presented it's MAC address in
> >> the device tree as an 8 byte value, even though PAPR requires it to be
> >> 6 bytes.  This is because, at the time, AIX required the value to be 8
> >> bytes.  However, modern versions of AIX support the (correct) 6
> >> byte value so they no longer require the workaround.
> >>
> >> It would be neatest to always provide a 6 byte value but that would
> >> cause a problem with old Linux kernel ibmveth drivers, so the old 8
> >> byte value is still presented when necessary.
> >>
> >> Since commit 13f85203e (3.10, May 2013) the driver has been able to
> >> handle 6 or 8 byte addresses so versions after that don't need to be
> >> considered specially.
> >>
> >> Drivers from kernels before that can also handle either type of
> >> address, but not always:
> >> * If the first byte's lowest bits are 10, the address must be 6 bytes.
> >> * Otherwise, the address must be 8 bytes.
> >> (The two bits in question are significant in a MAC address: they
> >> indicate a locally-administered unicast address.)
> >>
> >> So to maintain compatibility the old 8 byte value is presented when
> >> the lowest two bits of the first byte are not 10.
> >>
> >> Signed-off-by: Sam Bobroff <address@hidden>
> > 
> > Sorry, I didn't see this one until now.
> > 
> > Since we need a workaround for the workaround, is it actually worth
> > going to the 6-byte property?
> 
> 8-byte addresses are just wrong, all other network devices and the
> standard use 6-byte MAC addresses instead. So we should use 6-byte
> addresses in QEMU whenever it is possible, too. Unfortunately there are
> still guests in the field that use this bad assumption with 8 byte
> addresses, so I think this work-around is the best we can and should do
> right now.

Hm, yes, good point.  Applied to ppc-for-2.9.

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]