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

[Xen-devel] Re: skb_checksum_setup() placement in pv-ops vs. legacy kernel



On Fri, 2010-12-03 at 12:24 +0000, Jan Beulich wrote:
> >>> On 03.12.10 at 13:06, Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx> wrote:
> > You mean a packet flowing pvops-domU -> pvops-dom0 -> legacy?
> 
> I was actually just thinking in terms of a simple pair (see below).
> 
> > In this case the dom0 kernel does the necessary setup at (*) in the
> > pvops-domU -> (*) pvops-dom0 hop so there is nothing to do on the
> > pvops-dom0 (*) ->legacy hop.
> > 
> > If the legacy kernel forwards the packet further it will have to do the
> > setup on its egress path, this is the same if dom0 is pvops or legacy.
> > 
> >> Secondary question was whether the duplicated effort on transmission the 
> > other way around
> >> may be a (performance) issue.
> > 
> > You mean the legacy (*) -> (*) pvops-dom0 -> pvops-domU case?
> > 
> > In that case the setup is done at the two (*)'s but it is not really
> > "duplicated" as such since it is in the context of two separate skbs. if
> > the dom0 was legacy then the second one would still happen but on the
> > egress path.
> > 
> > I have a feeling I'm not understanding what your concern is correctly.
> > If the above isn't what you mean can you give an example of the path of
> > the packet and when the setup is (not) occurring.
> 
> pv-ops-{front,back}end -> legacy-{back,front} (for example a
> pv-ops DomU sending a packet to (not through) a legacy Dom0,

The setup which is done in skb_checksum_setup is internal to the guest's
skb data structure and doesn't cross the pv interface boundary. The
fields which it sets up are just offsets to the checksum field in the
packet, it doesn't actually manipulate the content of the packet or
impact what goes into the ring until/unless the guest does TSO or
something similar in which case the kernel needs to make sure the fields
are setup first.

So in the pvops-front->legacy-back case the legacy dom0 is already happy
with having skbs with invalid checksum fields floating around in its
stack since it sees the exact same thing in the
legacy-front->legacy-back case.

If it gets to a point where it needs the fields to be valid (either to
forward on or if in some case it matters for local delivery) then it
still has to do the necessary setup at that point.

> or pv-ops Dom0 sending to legacy DomU).

Same here, the legacy kernel knows it needs to setup the skb checksum
fields before it uses them.

> Of course, if the
> packet fully passes the backend domain's stack, it will have
> undergone the setup at least once (either on its way into or
> out of that stack).

Ian.


_______________________________________________
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®.