1. 05 Mar, 2011 2 commits
    • David S. Miller's avatar
      ipv4: Get peer more cheaply in rt_init_metrics(). · 3c0afdca
      David S. Miller authored
      We know this is a new route object, so doing atomics and
      stuff makes no sense at all.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3c0afdca
    • David S. Miller's avatar
      ipv4: Optimize flow initialization in output route lookup. · 44713b67
      David S. Miller authored
      We burn a lot of useless cycles, cpu store buffer traffic, and
      memory operations memset()'ing the on-stack flow used to perform
      output route lookups in __ip_route_output_key().
      
      Only the first half of the flow object members even matter for
      output route lookups in this context, specifically:
      
      FIB rules matching cares about:
      
      	dst, src, tos, iif, oif, mark
      
      FIB trie lookup cares about:
      
      	dst
      
      FIB semantic match cares about:
      
      	tos, scope, oif
      
      Therefore only initialize these specific members and elide the
      memset entirely.
      
      On Niagara2 this kills about ~300 cycles from the output route
      lookup path.
      
      Likely, we can take things further, since all callers of output
      route lookups essentially throw away the on-stack flow they use.
      So they don't care if we use it as a scratch-pad to compute the
      final flow key.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Acked-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      44713b67
  2. 04 Mar, 2011 4 commits
  3. 03 Mar, 2011 34 commits