qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 2/5] hw/nvme: always set eui64


From: Christoph Hellwig
Subject: Re: [PATCH 2/5] hw/nvme: always set eui64
Date: Wed, 20 Apr 2022 07:30:59 +0200
User-agent: Mutt/1.5.17 (2007-11-01)

On Tue, Apr 19, 2022 at 02:10:36PM +0200, Klaus Jensen wrote:
> From: Klaus Jensen <k.jensen@samsung.com>
> 
> Unconditionally set an EUI64 for namespaces. The nvme-ns device defaults
> to auto-generating a persistent EUI64 if not specified, but for single
> namespace setups (-device nvme,drive=...), this does not happen.
> 
> Since the EUI64 has previously been zeroed it is not considered valid,
> so it should be safe to add this now.
> 
> The generated EUI64 is of the form 52:54:00:<namespace counter>. Note,
> this is NOT the namespace identifier since that is not unique across
> subsystems; it is a global namespace counter. This has the effect that
> the value of this auto-generated EUI64 is dependent on the order with
> which the namespaces are created. If a more flexible setup is required,
> the eui64 namespace parameter should be explicitly set. Update the
> documentation to make this clear.

How is this actually globally unique given that it uses a start value
that is incremented for each created namespace?  Also EUI64 values are
based on a OUI, while NVME_EUI64_DEFAULT seems to have the OUI values
cleared to all zero as far as I can tell.

I would strongly advise againt autogenerating eui64 values.  They are
small and have little entropy, and require at least three bytes (for
new allocations more) to be set to a IEEE assigned OUI.



reply via email to

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