netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [0/3] tun: Add packet accounting
@ 2009-02-04 10:48 Herbert Xu
  2009-02-04 10:49 ` [PATCH 1/3] net: Partially allow skb destructors to be used on receive path Herbert Xu
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Herbert Xu @ 2009-02-04 10:48 UTC (permalink / raw)
  To: David S. Miller, netdev

Hi Dave:

Remember that UDP packet loss issue with virtulisation that one of
the Japanese guys menteioned at Plumbers'? Well it's back.

My initial reaction was obviously to suggest a different protocol,
however, that didn't get very far because we do such a great job
at handling it on baremetal.  That has created an unhealthy
dependency on the part of the users :)

Since no one has been brave enough to suggest removing the truesize
accounting for UDP, I've bitten the bullet and implemented the
same thing for the tuntap device.  This essentially brings UDP
in virtualisation to a par with UDP on baremetal as far as pushback
by the physical NIC is concerned.

On the plus side, we can spin this as a security feature :) It
stops the tun users from potentially pinning down unlimited amounts
of kernel memory (the entity creating the tun device is not
necessarily the one pushing traffic through it).

And I've got to say that it's not as ugly as I feared initially,
with just two lines changed in the core code.  The performance
impact should also be small, as only one conditional is added
on the fast path.

Of course the solution is not perfect in that it only handles
bridging right now.  But as bridging represents 99% of our current
virtualisation user base, it should be good enough.  Making this
work for routing isn't all that hard but requires more surgery
in the protocol (IP) stacks.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2009-02-15  4:46 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-04 10:48 [0/3] tun: Add packet accounting Herbert Xu
2009-02-04 10:49 ` [PATCH 1/3] net: Partially allow skb destructors to be used on receive path Herbert Xu
2009-02-05  0:55   ` David Miller
2009-02-04 10:49 ` [PATCH 2/3] net: Reexport sock_alloc_send_pskb Herbert Xu
2009-02-05  0:56   ` David Miller
2009-02-04 10:49 ` [PATCH 3/3] tun: Limit amount of queued packets per device Herbert Xu
2009-02-05  0:56   ` David Miller
2009-02-05  1:06     ` Herbert Xu
2009-02-05  1:13       ` David Miller
2009-02-05  3:23         ` Herbert Xu
2009-02-06  5:25           ` David Miller
2009-02-10 18:33   ` Alex Williamson
2009-02-12 11:13     ` Herbert Xu
2009-02-12 19:35       ` Alex Williamson
2009-02-15  3:15         ` Herbert Xu
2009-02-15  4:46           ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).