1. 22 4月, 2017 6 次提交
    • A
      IB/mlx5: Use IP version matching to classify IP traffic · 19cc7524
      Ariel Levkovich 提交于
      This change adds the ability for flow steering to classify IPv4/6
      packets with MPLS tag (Ethertype 0x8847 and 0x8848) as standard IP
      packets and hit IPv4/6 classifed steering rules.
      
      When user added a flow rule with IP classification, driver was
      implicitly adding ethertype matching to the created rule in order
      to distinguish between IPv4 and IPv6 protocols.
      Since IP packets with MPLS tag header have MPLS ethertype, they missed
      the rule and ended up hitting the default filters.
      Such behavior prevented from MPLS packets to undergo inbound traffic
      load balancing flows (if such were defined by configuring RSS) to
      achieve higher throughput - the way that non-MPLS IP packets performed.
      
      Since our device is able to look past the MPLS tag and identify the
      next protocol we introduce this solution which replaces Ethertype
      matching by the device's capability to perform IP version parsing
      and matching in order to distinguish between IPv4 and IPv6.
      Therefore, whenever a flow with IP spec is added and device support IP
      version matching, driver will implicitly add IP version matching to the
      rule (Based on the IP spec type) without Ethertype matching which will
      cause relevant MPLS tagged packets to hit this rule as well.
      Otherwise (device doesn't support IP version matching), we fall back to
      setting Ethertype matching.
      
      If the user's filters specify an L2 ethertype and an IP spec
      the rule will then match both the ethertype and the IP version.
      
      The device's support for IP version matching is reported by the
      device via dedicated capability bit in query_device_cap and named
      outer/inner_ip_version.
      Signed-off-by: NAriel Levkovich <lariel@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leon@kernel.org>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      19cc7524
    • A
      IB/mlx5: Add inner spec and IPv6 validation in user's flow attribute list · 0f750966
      Ariel Levkovich 提交于
      This change fixes an incomplete validation of the user's
      flow attributes list.
      
      Previous implementation validated only matching of IPv4 Ethertype
      to IPv4 spec of outer headers (in case both Ethernet with specified
      Ethertype and IP specs were present) and lacked the validation of:
      1. Matching of IPv6 Ethertype in Ethernet spec (if such exists) to an
         IPv6 protocol spec (if such exists).
      2. Validation of Ethertype to IP protocol matching on inner headers specs.
      Which could cause some combinations of unmatching Ethernet and IP
      protocols to pass validation and apply on the device.
      
      The fix adds validation of IPv6 Ethertype and IP spec as well as
      performing the scan on both outer and inner attributes.
      
      Fixes: 038d2ef8 ("Add flow steering support")
      Signed-off-by: NAriel Levkovich <lariel@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leon@kernel.org>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      0f750966
    • M
      IB/mlx5: Enlarge autogroup flow table · 00b7c2ab
      Maor Gottlieb 提交于
      In order to enlarge the flow group size to 8k, we decrease
      the number of flow group types to 6 and increase the flow
      table size to 64k.
      
      Flow group size is calculated as follow:
        group_size = table_size / (#group_types + 1)
      
      Fixes: 038d2ef8 ('IB/mlx5: Add flow steering support')
      Signed-off-by: NMaor Gottlieb <maorg@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leon@kernel.org>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      00b7c2ab
    • M
      IB/mlx5: Check supported flow table size · dac388ef
      Maor Gottlieb 提交于
      Check that the required flow table size is supported
      by device. Return ENOMEM error if no space left.
      
      In addition change the create flow table routine
      to return ENOMEM instead of ENOSPC.
      
      Fixes: 038d2ef8 ('IB/mlx5: Add flow steering support')
      Signed-off-by: NMaor Gottlieb <maorg@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leon@kernel.org>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      dac388ef
    • M
      IB/mlx5: Change vma from shared to private · 13776612
      Maor Gottlieb 提交于
      Anonymous VMA (->vm_ops == NULL) cannot be shared, otherwise
      it would lead to SIGBUS.
      
      Remove the shared flags from the vma after we change it to be
      anonymous.
      
      This is easily reproduced by doing modprobe -r while running a
      user-space application such as raw_ethernet_bw.
      
      Fixes: 7c2344c3 ('IB/mlx5: Implements disassociate_ucontext API')
      Signed-off-by: NMaor Gottlieb <maorg@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leon@kernel.org>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      13776612
    • M
      IB/mlx5: Take write semaphore when changing the vma struct · ecc7d83b
      Maor Gottlieb 提交于
      When the driver disassociate user context, it changes the vma to
      anonymous by setting the vm_ops to null and zap the vma ptes.
      
      In order to avoid race in the kernel, we need to take write lock
      before we change the vma entries.
      
      Fixes: 7c2344c3 ('IB/mlx5: Implements disassociate_ucontext API')
      Signed-off-by: NMaor Gottlieb <maorg@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leon@kernel.org>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      ecc7d83b
  2. 02 3月, 2017 2 次提交
  3. 15 2月, 2017 6 次提交
  4. 14 2月, 2017 6 次提交
  5. 25 1月, 2017 2 次提交
  6. 20 1月, 2017 1 次提交
  7. 10 1月, 2017 3 次提交
  8. 08 1月, 2017 2 次提交
  9. 03 1月, 2017 3 次提交
  10. 15 12月, 2016 1 次提交
  11. 14 12月, 2016 8 次提交