1. 10 11月, 2014 2 次提交
  2. 06 11月, 2014 6 次提交
  3. 18 10月, 2014 1 次提交
    • P
      openvswitch: Create right mask with disabled megaflows · f47de068
      Pravin B Shelar 提交于
      If megaflows are disabled, the userspace does not send the netlink attribute
      OVS_FLOW_ATTR_MASK, and the kernel must create an exact match mask.
      
      sw_flow_mask_set() sets every bytes (in 'range') of the mask to 0xff, even the
      bytes that represent padding for struct sw_flow, or the bytes that represent
      fields that may not be set during ovs_flow_extract().
      This is a problem, because when we extract a flow from a packet,
      we do not memset() anymore the struct sw_flow to 0.
      
      This commit gets rid of sw_flow_mask_set() and introduces mask_set_nlattr(),
      which operates on the netlink attributes rather than on the mask key. Using
      this approach we are sure that only the bytes that the user provided in the
      flow are matched.
      
      Also, if the parse_flow_mask_nlattrs() for the mask ENCAP attribute fails, we
      now return with an error.
      
      This bug is introduced by commit 07148121
      ("openvswitch: Eliminate memset() from flow_extract").
      Reported-by: NAlex Wang <alexw@nicira.com>
      Signed-off-by: NDaniele Di Proietto <ddiproietto@vmware.com>
      Signed-off-by: NAndy Zhou <azhou@nicira.com>
      Signed-off-by: NPravin B Shelar <pshelar@nicira.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f47de068
  4. 06 10月, 2014 3 次提交
  5. 16 9月, 2014 2 次提交
  6. 23 5月, 2014 1 次提交
    • J
      openvswitch: Compact sw_flow_key. · 1139e241
      Jarno Rajahalme 提交于
      Minimize padding in sw_flow_key and move 'tp' top the main struct.
      These changes simplify code when accessing the transport port numbers
      and the tcp flags, and makes the sw_flow_key 8 bytes smaller on 64-bit
      systems (128->120 bytes).  These changes also make the keys for IPv4
      packets to fit in one cache line.
      
      There is a valid concern for safety of packing the struct
      ovs_key_ipv4_tunnel, as it would be possible to take the address of
      the tun_id member as a __be64 * which could result in unaligned access
      in some systems. However:
      
      - sw_flow_key itself is 64-bit aligned, so the tun_id within is
        always
        64-bit aligned.
      - We never make arrays of ovs_key_ipv4_tunnel (which would force
        every
        second tun_key to be misaligned).
      - We never take the address of the tun_id in to a __be64 *.
      - Whereever we use struct ovs_key_ipv4_tunnel outside the
        sw_flow_key,
        it is in stack (on tunnel input functions), where compiler has full
        control of the alignment.
      Signed-off-by: NJarno Rajahalme <jrajahalme@nicira.com>
      Signed-off-by: NPravin B Shelar <pshelar@nicira.com>
      1139e241
  7. 17 5月, 2014 6 次提交
  8. 07 1月, 2014 2 次提交
  9. 02 11月, 2013 1 次提交
    • J
      openvswitch: TCP flags matching support. · 5eb26b15
      Jarno Rajahalme 提交于
          tcp_flags=flags/mask
              Bitwise  match on TCP flags.  The flags and mask are 16-bit num‐
              bers written in decimal or in hexadecimal prefixed by 0x.   Each
              1-bit  in  mask requires that the corresponding bit in port must
              match.  Each 0-bit in mask causes the corresponding  bit  to  be
              ignored.
      
              TCP  protocol  currently  defines  9 flag bits, and additional 3
              bits are reserved (must be transmitted as zero), see  RFCs  793,
              3168, and 3540.  The flag bits are, numbering from the least
              significant bit:
      
              0: FIN No more data from sender.
      
              1: SYN Synchronize sequence numbers.
      
              2: RST Reset the connection.
      
              3: PSH Push function.
      
              4: ACK Acknowledgement field significant.
      
              5: URG Urgent pointer field significant.
      
              6: ECE ECN Echo.
      
              7: CWR Congestion Windows Reduced.
      
              8: NS  Nonce Sum.
      
              9-11:  Reserved.
      
              12-15: Not matchable, must be zero.
      Signed-off-by: NJarno Rajahalme <jrajahalme@nicira.com>
      Signed-off-by: NJesse Gross <jesse@nicira.com>
      5eb26b15
  10. 04 10月, 2013 1 次提交
  11. 12 9月, 2013 1 次提交
  12. 06 9月, 2013 1 次提交
  13. 28 8月, 2013 1 次提交
    • A
      openvswitch: optimize flow compare and mask functions · 5828cd9a
      Andy Zhou 提交于
      Make sure the sw_flow_key structure and valid mask boundaries are always
      machine word aligned. Optimize the flow compare and mask operations
      using machine word size operations. This patch improves throughput on
      average by 15% when CPU is the bottleneck of forwarding packets.
      
      This patch is inspired by ideas and code from a patch submitted by Peter
      Klausler titled "replace memcmp() with specialized comparator".
      However, The original patch only optimizes for architectures
      support unaligned machine word access. This patch optimizes for all
      architectures.
      Signed-off-by: NAndy Zhou <azhou@nicira.com>
      Signed-off-by: NJesse Gross <jesse@nicira.com>
      5828cd9a
  14. 27 8月, 2013 2 次提交
  15. 24 8月, 2013 2 次提交
  16. 15 8月, 2013 1 次提交
  17. 20 6月, 2013 3 次提交
  18. 15 6月, 2013 3 次提交
  19. 30 3月, 2013 1 次提交