1. 17 Dec, 2013 4 commits
    • David S. Miller's avatar
      Merge branch 'ovs_hash' · bc4d0f61
      David S. Miller authored
      Francesco Fusco says:
      
      ====================
      ovs: introduce arch-specific fast hashing improvements
      
      From: Daniel Borkmann <dborkman@redhat.com>
      
      We are introducing a fast hash function (see patch1) that can be
      used in the context of OpenVSwitch to reduce the hashing footprint
      (patch2). For details, please see individual patches!
      
      v1->v2:
       - Make hash generic and place it under lib
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bc4d0f61
    • Francesco Fusco's avatar
      net: ovs: use CRC32 accelerated flow hash if available · 500f8087
      Francesco Fusco authored
      Currently OVS uses jhash2() for calculating flow hashes in its
      internal flow_hash() function. The performance of the flow_hash()
      function is critical, as the input data can be hundreds of bytes
      long.
      
      OVS is largely deployed in x86_64 based datacenters.  Therefore,
      we argue that the performance critical fast path of OVS should
      exploit underlying CPU features in order to reduce the per packet
      processing costs. We replace jhash2 with the hash implementation
      provided by the kernel hash lib, which exploits the crc32l
      instruction to achieve high performance
      
      Our patch greatly reduces the hash footprint from ~200 cycles of
      jhash2() to around ~90 cycles in case of ovs_flow_hash_crc()
      (measured with rdtsc over maximum length flow keys on an i7 Intel
      CPU).
      
      Additionally, we wrote a microbenchmark to stress the flow table
      performance. The benchmark inserts random flows into the flow
      hash and then performs lookups. Our hash deployed on a CRC32
      capable CPU reduces the lookup for 1000 flows, 100 masks from
      ~10,100us to ~6,700us, for example.
      
      Thus, simply use the newly introduced arch_fast_hash2() as a
      drop-in replacement.
      Signed-off-by: default avatarFrancesco Fusco <ffusco@redhat.com>
      Signed-off-by: default avatarDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: default avatarThomas Graf <tgraf@redhat.com>
      Acked-by: default avatarJesse Gross <jesse@nicira.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      500f8087
    • Francesco Fusco's avatar
      lib: introduce arch optimized hash library · 71ae8aac
      Francesco Fusco authored
      We introduce a new hashing library that is meant to be used in
      the contexts where speed is more important than uniformity of the
      hashed values. The hash library leverages architecture specific
      implementation to achieve high performance and fall backs to
      jhash() for the generic case.
      
      On Intel-based x86 architectures, the library can exploit the crc32l
      instruction, part of the Intel SSE4.2 instruction set, if the
      instruction is supported by the processor. This implementation
      is twice as fast as the jhash() implementation on an i7 processor.
      
      Additional architectures, such as Arm64 provide instructions for
      accelerating the computation of CRC, so they could be added as well
      in follow-up work.
      Signed-off-by: default avatarFrancesco Fusco <ffusco@redhat.com>
      Signed-off-by: default avatarDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: default avatarThomas Graf <tgraf@redhat.com>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      71ae8aac
    • tanxiaojun's avatar
      fddi: cleanup unsigned to unsigned int/short · 89e47d3b
      tanxiaojun authored
      Use "unsigned int/short" instead of "unsigned", and change the type of
      iteration variable "i" to "unsigned int".
      Signed-off-by: default avatarTan Xiaojun <tanxiaojun@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      89e47d3b
  2. 16 Dec, 2013 5 commits
  3. 15 Dec, 2013 1 commit
  4. 14 Dec, 2013 26 commits
  5. 12 Dec, 2013 4 commits