From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: Transactions and watches Date: Wed, 05 Oct 2005 12:22:26 -0500 Message-ID: <43440BD2.4050403@us.ibm.com> References: <0944e5db9597f942ac7454521b14734f@cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jacob Gorm Hansen Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org What snapshot of unstable are you using? The only thing different about transactions is that slow things down a bit. It would indicate you're seeing race conditions. Note, that I've not been able to recreate the problems you're having with your code. What OS are you using? Do you have patches against unstable? Regards, Anthony Liguori Jacob Gorm Hansen wrote: >Hmm it is not too simple, but if I run the code below as is, domU >succeeds in connecting netfront<->netback, e.g. there is no timeout >and the >MAC address is set correctly. If I rem in the xs_transaction_* calls, >the backend does not get the probe callback and nothing works. > >Similar is true if I wrap each xs_write in a transaction_start-end pair. > > char s[256]; > char s2[256]; > > int vifid = 2000 + domid; > > char* dom0_home = xs_get_domain_path(xs,0); > printf("dom0_home is %s\n",dom0_home); > > char backend[256]; > char frontend[256]; > sprintf(backend,"%s/backend/vif/%d/%d",dom0_home,vifid,domid); > sprintf(frontend, "%s/device/vif/%d",home,vifid); > > > //xs_transaction_start(xs); > > sprintf(s,"%s/frontend",backend); > xs_w(s, frontend ); > > sprintf(s,"%s/frontend-id",backend); > sprintf(s2,"%d",domid); > xs_w(s, s2 ); > > sprintf(s,"%s/handle",backend); > sprintf(s2,"%d",vifid); > xs_w(s, s2); > > > //xs_transaction_end(xs,0); > > //xs_transaction_start(xs); > > > sprintf(s, "%s/backend-id", frontend); > xs_w(s, "0"); > > sprintf(s,"%s/backend",frontend); > xs_w(s, backend ); > > sprintf(s,"%s/handle",frontend); > sprintf(s2,"%d",vifid); > xs_w(s, s2); > > sprintf(s,"%s/mac",frontend); > xs_w(s, "aa:00:00:11:a6:02"); > > //xs_transaction_end(xs,0); > >Jacob > >_______________________________________________ >Xen-devel mailing list >Xen-devel@lists.xensource.com >http://lists.xensource.com/xen-devel > > >