I''d like reviewers for a fix for: 6651973 hvm migration: cannot open dlpi interface The webrev is at: http://dme.org/solaris/webrev/6651973/sunos.hg/ I''m not entirely happy with the fix (it seems clumsy), but it gets things moving again for those working on HVM migration. dme. -- David Edmondson, Sun Microsystems, http://dme.org
> I''d like reviewers for a fix for: > 6651973 hvm migration: cannot open dlpi interface > webrev is at: > http://dme.org/solaris/webrev/6651973/sunos.hg/It''s probably not performance critical, but I think you can save two forks / execs / processes by matching lines and counting them all with nawk, something like this: 73 set_refcount() 74 { 75 # 76 # Set $refcount to the number of times $1 is referenced as a nic 77 # used by a backend device in xenstore. 78 # 80 refcount=`xenstore-ls backend/vif | \ 81 nawk -v nic='' "''$1''"'' -F= ''BEGIN { n = 0; } $1==" nic " && $2 == nic { n++;} END { print n; }'' ` 83 } This message posted from opensolaris.org
David Edmondson wrote:> I''d like reviewers for a fix for: > 6651973 hvm migration: cannot open dlpi interface > > The webrev is at: > http://dme.org/solaris/webrev/6651973/sunos.hg/ > > I''m not entirely happy with the fix (it seems clumsy), but it gets > things moving again for those working on HVM migration.looks ok to me. Michael -- Michael Schuster Recursion, n.: see ''Recursion''
* jk@tools.de [2008-01-23 16:29:17]>> I''d like reviewers for a fix for: >> 6651973 hvm migration: cannot open dlpi interface >> webrev is at: >> http://dme.org/solaris/webrev/6651973/sunos.hg/ > > It''s probably not performance critical, but I think you > can save two forks / execs / processes by matching > lines and counting them all with nawk, something like > this:I''m reminded of David Tilbrook: "Whenever faced with a problem, some people say `Lets use AWK.'' Now, they have two problems."> 73 set_refcount() > 74 { > 75 # > 76 # Set $refcount to the number of times $1 is referenced as a nic > 77 # used by a backend device in xenstore. > 78 # > 80 refcount=`xenstore-ls backend/vif | \ > 81 nawk -v nic='' "''$1''"'' -F= ''BEGIN { n = 0; } $1==" nic " && $2 == nic { n++;} END { print n; }'' ` > 83 }Thanks! dme. -- David Edmondson, Sun Microsystems, http://dme.org
> I''d like reviewers for a fix for: > 6651973 hvm migration: cannot open dlpi interface > webrev is at: > http://dme.org/solaris/webrev/6651973/sunos.hg/Webrev updated with suggestions from here and also to merge with the Clearview changes. If there are no further comments from Michael or Juergen then I''ll file an RTI citing you both as reviewers. dme. -- David Edmondson, Sun Microsystems, http://dme.org
> > I''d like reviewers for a fix for: > > 6651973 hvm migration: cannot open dlpi interface > > webrev is at: > > http://dme.org/solaris/webrev/6651973/sunos.hg/ > > Webrev updated with suggestions from here and also to > merge with the Clearview changes. > > If there are no further comments from Michael or > Juergen then I''ll file an RTI citing you both as reviewers.Looks ok for me. This message posted from opensolaris.org
Jürgen Keil wrote:>>> I''d like reviewers for a fix for: >>> 6651973 hvm migration: cannot open dlpi interface >>> webrev is at: >>> http://dme.org/solaris/webrev/6651973/sunos.hg/ >> Webrev updated with suggestions from here and also to >> merge with the Clearview changes. >> >> If there are no further comments from Michael or >> Juergen then I''ll file an RTI citing you both as reviewers. > > Looks ok for me.I agree -- Michael Schuster Recursion, n.: see ''Recursion''