1. 28 4月, 2018 16 次提交
  2. 27 4月, 2018 11 次提交
  3. 24 4月, 2018 3 次提交
    • P
      IB/core: Fix deleting default GIDs when changing mac adddress · dc5640f2
      Parav Pandit 提交于
      Before [1], When MAC address of the netdevice is changed, default GID is
      supposed to get deleted and added back which affects the node and/or port
      GUID in below sequence.
      
      netdevice_event()
      -> NETDEV_CHANGEADDR
         default_del_cmd()
            del_netdev_default_ips()
                bond_delete_netdev_default_gids()
                    ib_cache_gid_set_default_gid()
                        ib_cache_gid_del()
         add_cmd()
         [..]
      
      However, ib_cache_gid_del() was not getting invoked in non bonding
      scenarios because event_ndev and rdma_ndev are same.
      Therefore, fix such condition to ignore checking upper device when event
      ndev and rdma_dev are same; similar to bond_set_netdev_default_gids().
      
      Which this fix ib_cache_gid_del() is invoked correctly; however
      ib_cache_gid_del() doesn't find the default GID for deletion because
      find_gid() was given default_gid = false with
      GID_ATTR_FIND_MASK_DEFAULT set.
      But it was getting overwritten by ib_cache_gid_set_default_gid() later
      on as part of add_cmd().
      Therefore, mac address change used to work for default GID.
      
      With refactor series [1], this incorrect behavior is detected.
      
      Therefore,
      when deleting default GID, set default_gid and set MASK flag.
      when deleting IP based GID, clear default_gid and set MASK flag.
      
      [1] https://patchwork.kernel.org/patch/10319151/
      
      Fixes: 238fdf48 ("IB/core: Add RoCE table bonding support")
      Fixes: 598ff6ba ("IB/core: Refactor GID modify code for RoCE")
      Signed-off-by: NParav Pandit <parav@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      dc5640f2
    • P
      IB/core: Fix to avoid deleting IPv6 look alike default GIDs · 22c01ee4
      Parav Pandit 提交于
      When IPv6 link local address is removed, if it matches with the default
      GID, default GID(s)s gets removed which may not be a desired behavior.
      This behavior is introduced by refactor work in Fixes tag.
      
      When IPv6 link address is removed, removing its equivalent RoCEv2 GID
      which exactly matches with default RoCEv2 GID, is right thing to do.
      However achieving it correctly requires lot more changes, likely in
      roce_gid_mgmt.c and core/cache.c. This should be done as independent
      patch.
      
      Therefore, this patch preserves behavior of not deleteing default GIDs.
      This is done by providing explicit hint to consider default GID property
      using mask and default_gid; similar to add_gid().
      
      Fixes: 598ff6ba ("IB/core: Refactor GID modify code for RoCE")
      Signed-off-by: NParav Pandit <parav@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      22c01ee4
    • P
      IB/core: Don't allow default GID addition at non reseved slots · a66ed149
      Parav Pandit 提交于
      Default GIDs are marked reserved at the start of the GID table at index
      0 and 1 by gid_table_reserve_default().  Currently when default GID is
      requested, it can still allocates an empty slot which was not marked as
      RESERVED for default GID, which is incorrect.
      
      At least in current code flow of roce_gid_mgmt.c, in theory we can
      still request to allocate more than one/two default GIDs depending
      on how upper devices are setup.
      
      Therefore, it is better for cache layer to only allow our reserved slots
      to be used by default GID allocation requests.
      
      Fixes: 598ff6ba ("IB/core: Refactor GID modify code for RoCE")
      Signed-off-by: NParav Pandit <parav@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      a66ed149
  4. 23 4月, 2018 2 次提交
  5. 20 4月, 2018 1 次提交
  6. 18 4月, 2018 2 次提交
    • G
      IB/uverbs: Add missing braces in anonymous union initializers · e33514f2
      Geert Uytterhoeven 提交于
      With gcc-4.1.2:
      
          drivers/infiniband/core/uverbs_std_types_flow_action.c:366: error: unknown field ‘ptr’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:367: error: unknown field ‘type’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:367: warning: missing braces around initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:367: warning: (near initialization for ‘uverbs_flow_action_esp_keymat[0].<anonymous>.<anonymous>’)
          drivers/infiniband/core/uverbs_std_types_flow_action.c:368: error: unknown field ‘min_len’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:368: warning: excess elements in union initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:368: warning: (near initialization for ‘uverbs_flow_action_esp_keymat[0].<anonymous>’)
          drivers/infiniband/core/uverbs_std_types_flow_action.c:368: error: unknown field ‘len’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:368: warning: excess elements in union initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:368: warning: (near initialization for ‘uverbs_flow_action_esp_keymat[0].<anonymous>’)
          drivers/infiniband/core/uverbs_std_types_flow_action.c:369: error: unknown field ‘flags’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:369: warning: excess elements in union initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:369: warning: (near initialization for ‘uverbs_flow_action_esp_keymat[0].<anonymous>’)
          drivers/infiniband/core/uverbs_std_types_flow_action.c:376: error: unknown field ‘ptr’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:377: error: unknown field ‘type’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:377: warning: missing braces around initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:377: warning: (near initialization for ‘uverbs_flow_action_esp_replay[0].<anonymous>.<anonymous>’)
          drivers/infiniband/core/uverbs_std_types_flow_action.c:379: error: unknown field ‘len’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:379: warning: excess elements in union initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:379: warning: (near initialization for ‘uverbs_flow_action_esp_replay[0].<anonymous>’)
          drivers/infiniband/core/uverbs_std_types_flow_action.c:383: error: unknown field ‘ptr’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:384: error: unknown field ‘type’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:385: error: unknown field ‘min_len’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:385: warning: excess elements in union initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:385: warning: (near initialization for ‘uverbs_flow_action_esp_replay[1].<anonymous>’)
          drivers/infiniband/core/uverbs_std_types_flow_action.c:385: error: unknown field ‘len’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:385: warning: excess elements in union initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:385: warning: (near initialization for ‘uverbs_flow_action_esp_replay[1].<anonymous>’)
          drivers/infiniband/core/uverbs_std_types_flow_action.c:386: error: unknown field ‘flags’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:386: warning: excess elements in union initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:386: warning: (near initialization for ‘uverbs_flow_action_esp_replay[1].<anonymous>’)
      
      Add the missing braces to fix this.
      
      Fixes: 2eb9beae ("IB/uverbs: Add flow_action create and destroy verbs")
      Fixes: 7d12f8d5 ("IB/uverbs: Add modify ESP flow_action")
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      e33514f2
    • R
      infiniband: mlx5: fix build errors when INFINIBAND_USER_ACCESS=m · b3fe6c62
      Randy Dunlap 提交于
      Fix build errors when INFINIBAND_USER_ACCESS=m and MLX5_INFINIBAND=y.
      The build error occurs when the mlx5 driver code attempts to use
      USER_ACCESS interfaces, which are built as a loadable module.
      
      Fixes these build errors:
      
      drivers/infiniband/hw/mlx5/main.o: In function `populate_specs_root':
      ../drivers/infiniband/hw/mlx5/main.c:4982: undefined reference to `uverbs_default_get_objects'
      ../drivers/infiniband/hw/mlx5/main.c:4994: undefined reference to `uverbs_alloc_spec_tree'
      drivers/infiniband/hw/mlx5/main.o: In function `depopulate_specs_root':
      ../drivers/infiniband/hw/mlx5/main.c:5001: undefined reference to `uverbs_free_spec_tree'
      
      Build-tested with multiple config combinations.
      
      Fixes: 8c84660b ("IB/mlx5: Initialize the parsing tree root without the help of uverbs")
      Cc: stable@vger.kernel.org # reported against 4.16
      Reported-by: Nkbuild test robot <lkp@intel.com>
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      b3fe6c62
  7. 17 4月, 2018 1 次提交
  8. 16 4月, 2018 4 次提交