Re: [libvirt] [PATCH] virNetDevVethCreate: assign names based on mac address by default

2013-08-29 Thread Michal Privoznik
On 28.08.2013 23:05, Oskari Saarenmaa wrote: Interface names do not have to be numerical (or veth + number) and trying to assign them to that format is susceptible to race conditions. Instead, assign the parent interface name according to the mac address (the last three bytes) if no name was

Re: [libvirt] [PATCH] virNetDevVethCreate: assign names based on mac address by default

2013-08-29 Thread Oskari Saarenmaa
On Thu, Aug 29, 2013 at 10:10:36AM +0200, Michal Privoznik wrote: On 28.08.2013 23:05, Oskari Saarenmaa wrote: Interface names do not have to be numerical (or veth + number) and trying to assign them to that format is susceptible to race conditions. Instead, assign the parent interface

Re: [libvirt] [PATCH] virNetDevVethCreate: assign names based on mac address by default

2013-08-29 Thread Gao feng
On 08/29/2013 04:20 PM, Oskari Saarenmaa wrote: On Thu, Aug 29, 2013 at 10:10:36AM +0200, Michal Privoznik wrote: On 28.08.2013 23:05, Oskari Saarenmaa wrote: Interface names do not have to be numerical (or veth + number) and trying to assign them to that format is susceptible to race

Re: [libvirt] [PATCH] virNetDevVethCreate: assign names based on mac address by default

2013-08-29 Thread Oskari Saarenmaa
29.08.2013 11:36, Gao feng kirjoitti: On 08/29/2013 04:20 PM, Oskari Saarenmaa wrote: On Thu, Aug 29, 2013 at 10:10:36AM +0200, Michal Privoznik wrote: On 28.08.2013 23:05, Oskari Saarenmaa wrote: Interface names do not have to be numerical (or veth + number) and trying to assign them to

Re: [libvirt] [PATCH] virNetDevVethCreate: assign names based on mac address by default

2013-08-29 Thread Gao feng
On 08/29/2013 04:52 PM, Oskari Saarenmaa wrote: 29.08.2013 11:36, Gao feng kirjoitti: On 08/29/2013 04:20 PM, Oskari Saarenmaa wrote: On Thu, Aug 29, 2013 at 10:10:36AM +0200, Michal Privoznik wrote: On 28.08.2013 23:05, Oskari Saarenmaa wrote: Interface names do not have to be numerical (or

Re: [libvirt] [PATCH] virNetDevVethCreate: assign names based on mac address by default

2013-08-29 Thread Oskari Saarenmaa
29.08.2013 12:11, Gao feng kirjoitti: The suggested patch also greatly simplifies name selection by removing the loops trying to find a supposedly unused interface name. If you don't like using mac address in the interface name we could just replace it with a random string with a loop

Re: [libvirt] [PATCH] virNetDevVethCreate: assign names based on mac address by default

2013-08-29 Thread Daniel P. Berrange
On Thu, Aug 29, 2013 at 12:05:49AM +0300, Oskari Saarenmaa wrote: Interface names do not have to be numerical (or veth + number) and trying to assign them to that format is susceptible to race conditions. Instead, assign the parent interface name according to the mac address (the last three