[ovs-dev] [PATCH 5/8] datapath: Add support for tunnel fragmentation.
blp at nicira.com
Wed Aug 18 18:24:47 UTC 2010
On Wed, Aug 18, 2010 at 01:05:19PM -0400, Jesse Gross wrote:
> On Wed, Aug 18, 2010 at 12:49 PM, Ben Pfaff <blp at nicira.com> wrote:
> > get_random_bytes() is pretty expensive. Most of the network stack uses
> > net_random() or random32() (same thing), can you use that instead?
> I'm not sure that the cost is really all that big a deal here since it only
> happens when we setup tunnels (we also use get_random_bytes() for generating
> a MAC address at this time). Getting initial IP IDs, TCP ISNs, etc. all
> come from a more secure random pool (and as Steve Hemminger mentioned
> random32() is really for statistical simulation). I would have used
> get_random_int() as the best solution but it isn't exported.
OK, I didn't realize that this was per-tunnel setup. Makes sense.
> > It's hard to evaluate the use of the new 'frag_id' member of struct
> > tnl_vport, since it's treated as write-only in this commit. atomic_t's
> > are relatively expensive on SMP, but maybe fragmentation is inherently
> > expensive enough that it doesn't matter?
> Fragmentation is already a very slow path, so if you go down it you've
> already lost. I thought about doing something better but it would blow up
> data structures, which has a cost for everybody. It's just not worth it.
> IP IDs also use atomic_t's, so we're in good company.
OK, that's fine then.
More information about the dev