WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] [patch 3/5] xen: xm/create mac selection

To: "Jody Belka" <lists-xen@xxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] [patch 3/5] xen: xm/create mac selection
From: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Date: Mon, 31 Jan 2005 23:36:16 -0000
Delivery-date: Mon, 31 Jan 2005 23:41:26 +0000
Envelope-to: xen+James.Bulpin@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
Thread-index: AcUH63UX4a1VJzhxSxqZqBlCHCqU6wAAMFaQ
Thread-topic: [Xen-devel] [patch 3/5] xen: xm/create mac selection
> > Please can you explain how the randomly generated MACs are kept
> > different -- I was expecting to see the vif number being 
> folded into the
> > random MAC generation.
> > 
> > (I'm not saying what you've done doesn't work, I'd just like an
> > explanation)
> 
> It doesn't prevent different domains from getting the same 
> random MACs,
> only within a domain. It keeps a list of generated MACs as it 
> processes
> the vifs, and loops until one is generated that hasn't been used yet.
> For some reason i'd usually get several copies of the same MAC without
> this code when creating multiple vifs within one domain.

Your patch certainly helps by rejecting duplicates, but I'd also like to
see the algorithm used to generate the MACs changed too.

We currently seed the random number generator with random.seed() which I
suspect seeds it with the system time in seconds. At the very least, we
should use something more fine grained to avoid other domains started in
quick succession getting the same MACs.

A better approach might be to seed it with a hash of the config file
plus any parameters passed into it (e.g. vmid), plus the vif number.

Would you mind knocking something up?

Thanks,
Ian




-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel