|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] RE: Linux TCP Checksum offload limitations
> > I'm not sure I agree with your declaration of 'stupid'. Windows
>
> stupid in the context of linux networking. Other systems have other
> tradeoffs.
Understood.
>
> > presumably gets its share of performance testing so I assume that
there
> > are reasons for doing it this way. I'm guessing that they just reuse
the
> > same page over and over where the Ethernet src and dst address don't
> > change (always true for a single connection), and use a pool of
> > pre-setup pages for sending so all they need to do is update the ip
> > length in the IP header and the seq and ack fields in the TCP
header.
> >
>
> That would sound pretty dumb if true because ethernet headers are very
> very
> cheap to set up. If if you consider reusing IOMMU mappings (which
Windows
> doesn't support anyways afaik) it probably wouldn't be a good idea.
If you are sending hundreds of thousands of packets per second then
reusing the same page over and over might give you some benefit. No
setup is better than very cheap setup. But...
>
> > Windows has the disadvantage that it has made the assumption that it
is
> > going to be talking to real hardware that can always handle this,
not an
> > emulated hardware device (from Windows PoV) that is a bit more
limited
> > in what it can handle.
>
> Even real hardware goes slower when it has to do more scatter-gather
Yes. I hadn't thought of that. I guess it depends on if "allocating a
page, looking up and copying the src and dst mac address" is cheaper
than "get the same page we used last time and putting it on the sg
list". With the latter, we are still sending actual data so there is
still a page to allocate for that anyway, and for the rest of the
headers... As I said, Microsoft as a whole appears to act pretty stupid
at times, but I'm sure their coders know how to do performance analysis
on driver behaviour and figuring out which gives better performance.
> > > You'll just have to fix it up somewhere in your driver.
> >
> > Yep. That's what I've done. I'll just have to live with the
performance
> > hit I guess. The fact that I can't tell Windows to please put the
whole
>
> If you code it right the performance hit should be rather small. You
> just have to copy the header, not everything.
Yep. I allocate a new page (well... just get it off my freelist) then
just loop around and keep appending data until I have a full header.
> > > Should be enough to do a pskb_may_pull()
> >
> > My driver is on the Windows side of things, so I'm pretty much stuck
> > with only giving Linux what it can cope with.
>
> I meant on the Xen frontend side.
My windows driver is the xen frontend. It is to Windows what netfront is
to Linux. Linux obviously doesn't have this problem on it's frontend :)
James
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|