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

[Xen-devel] barriers before {req/rsp}_cons = cons?



Hello,

In a bunch of places, one can read code like

cons = netif->tx.req_cons;
rmb(); /* Ensure that we see the request before we copy it. */
memcpy(&txreq, RING_GET_REQUEST(&netif->tx, i), sizeof(txreq));
some checks
netif->tx.req_cons = ++cons;

Shouldn't there be a full barrier just before the req_cons assignation?
I guess we are currently not seeing bugs at least because the req will
not be overwriten until we loop in the ring, but it seems to me there
may be a bug here.

Samuel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.